collection.js
function array(obj) {
  if ('array' === type(obj)) return obj;
  if ('arguments' === type(obj)) return Array.prototype.slice.call(obj, 0);

  return obj  // Only transform objects in to an array when they exist.
    ? [obj]
    : [];
}
function array(obj) {
  if ('array' === type(obj)) return obj;
  if ('arguments' === type(obj)) return Array.prototype.slice.call(obj, 0);

  return obj  // Only transform objects in to an array when they exist.
    ? [obj]
    : [];
}
function array ( obj ) { if ( 'array' === type ( obj ) ) return obj ; if ( 'arguments' === type ( obj ) ) return Array . prototype . slice . call ( obj , 0 ) ; return obj // Only transform objects in to an array when they exist. ? [ obj ] : [ ] ; }
Wrap the given object in an array if it's not an array already.

@param {Mixed} obj The thing we might need to wrap.
@returns {Array} We promise!
@api public
Wrap the given object in an array if it s not an array already .