Sha256: 61abb935f795366bf63c0d14af2db67b5ad8b010e40a5bb1513694d2fd9abeef
Contents?: true
Size: 574 Bytes
Versions: 14
Compression:
Stored size: 574 Bytes
Contents
var baseEach = require('./baseEach'); /** * The base implementation of `_.map` without support for callback shorthands * or `this` binding. * * @private * @param {Array|Object|string} collection The collection to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function baseMap(collection, iteratee) { var result = []; baseEach(collection, function(value, key, collection) { result.push(iteratee(value, key, collection)); }); return result; } module.exports = baseMap;
Version data entries
14 entries across 7 versions & 1 rubygems