Sha256: 938e136a8ef078188eb82d11308d44aaccb036b45c8e9af0ceeecf06b36d5401
Contents?: true
Size: 552 Bytes
Versions: 14
Compression:
Stored size: 552 Bytes
Contents
/** * A specialized version of `_.map` for arrays without support for callback * shorthands or `this` binding. * * @private * @param {Array} array The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function arrayMap(array, iteratee) { var index = -1, length = array.length, result = Array(length); while (++index < length) { result[index] = iteratee(array[index], index, array); } return result; } module.exports = arrayMap;
Version data entries
14 entries across 7 versions & 1 rubygems