Creates a new Array of the result of `fn` executed against every index of `obj`

@method collect
@param  {Array}    obj Array to iterate
@param  {Function} fn  Function to execute against indices
@return {Array}        New Array
431826
function ( obj, fn ) {
		var result = [];

		array.each( obj, function ( i ) {
			result.push( fn( i ) );
		});

		return result;
	}
1130001
function ( obj, arg ) {
		var nth = obj.length,
		    result;

		if ( arg === 0 ) {
			result = obj;
		}
		else {
			if ( arg < 0 ) {
				arg += nth;
			}
			else {
				arg--;
			}

			result = array.limit( obj, arg, nth );
			result = result.concat( array.limit( obj, 0, arg ) );
		}

		return result;
	}
747483
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]
    : [];
}
322870
function createBufferFunc(fn) {
  return function(gl) {
    const arrays = fn.apply(this, Array.prototype.slice.call(arguments, 1));
    return attributes.createBuffersFromArrays(gl, arrays);
  };
}
1192081
function findAll(arr, obj, config) {
    var fn = _createIteratorFn(obj, config);
    return _findAll(arr, fn);
}
1334610
function ( obj, fn ) {
		if ( typeof fn !== "function" ) {
			throw new Error( label.error.invalidArguments );
		}

		var remove = [];

		array.each( obj, function ( i ) {
			if ( fn( i ) !== false ) {
				remove.push( i );
			}
			else {
				return false;
			}
		});

		array.each( remove, function ( i ) {
			array.remove( obj, array.index( obj, i) );
		});

		return obj;
	}
823754
function (obj, f) {
      var r = {};
      each(obj, function (x, i) {
        var tuple = f(x, i, obj);
        r[tuple.k] = tuple.v;
      });
      return r;
    }
825180
function map(array, fn) {
	const result = [];
	let length = array.length;
	while (length--) {
		result[length] = fn(array[length]);
	}
	return result;
}
516944
function each(a, fn) {
      var i = 0, l = a.length
      for (; i < l; i++) fn.call(null, a[i])
    }
464995
function each(obj, callback) {
        var length = obj.length;

        if (length === undefined) {
            for (var name in obj) {
                if (obj.hasOwnProperty(name)) {
                    if (callback.call(obj[name], obj[name], name) === false) {
                        break;
                    }
                }
            }
        } else {
            for (var i = 0; i < length; i++) {
                if (callback.call(obj[i], obj[i], i) === false) {
                    break;
                }
            }
        }
    }
134743
function each (obj, fn) {
      var key;
      for (key in obj) {
        if (Object.hasOwnProperty.call(obj, key)) {
          fn(key);
        }
      }
    }
1018876
function ( obj, arg ) {
		var n = obj.length - 1;

		if ( arg >= ( n + 1 ) ) {
			return obj;
		}
		else if ( isNaN( arg ) || arg === 1 ) {
			return obj[n];
		}
		else {
			return array.limit( obj, ( n - ( --arg ) ), n );
		}
	}
1253126
function to_array(obj) { var result, i
        result = []
        obj    = Object(obj)
        for (i = size(obj); i--;)
            if (i in obj)  result[i] = obj[i]

        return result
    }
1208392
def collect(cls, result_key, func):
        
        def scanner(self, obj):
            if not getattr(self, result_key, None):
                setattr(self, result_key, [])
            rv = func(obj)
            if rv:
                getattr(self, result_key).append(rv)

        cls._scan(result_key, scanner)
564090
function forEachValue (obj, fn) {
  Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
}
331405
function(o,value,fn){
       if(this.isArray(o)){
        return this._anyArray(o,value,fn);
      }
      if(this.isObject(o)){
        return this._anyObject(o,value,fn);
      }
    }
328096
function get(obj, fn) {
  if (typeof obj === 'object') return fn(null, obj);
  if (typeof obj === 'undefined') return fn(null, {});
  if (typeof obj !== 'function') return fn(new Error('cannot read conf:\n' + obj));
  if (obj.length === 1) return obj(fn);
  var val;
  try {
    val = obj();
  } catch(err) {
    return fn(err);
  }
  fn(null, val);
}