code: public Object[] getArgumentArray(int idx) {
      Object o = idx < 0 ? arguments : getArgument(idx);
      if (o != null) {
        return o.getClass().isArray() ? (Object[]) o : new Object[] {o};
      } else if (idx == 0) {
        return arguments;
      }
      return new Object[0];
    }
docs: Utility method for safety getting an array present at a certain
  position in the list of arguments.
  
  Useful for Deferred chains where result of each resolved
  promise is set as an array in the arguments list.
  
  Always returns an array.