Sha256: c5dafc73426c5056a92074ee339544f7385536c325c5770a811a4044913a24a3
Contents?: true
Size: 553 Bytes
Versions: 153
Compression:
Stored size: 553 Bytes
Contents
/** * A specialized version of `_.map` for arrays without support for callback * shorthands and `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
153 entries across 80 versions & 8 rubygems