Apply a function to a each element of a collection and return a new array of results.
npm install @ndhoule/mapApply a function to a each element of a collection and return a new array of results.
``sh`
$ component install ndhoule/map
$ npm install @ndhoule/map
Produce a new array by passing each value in the input collection through an iterator function and accumulating the results. The iterator is passed three arguments: (value, index, collection).
`javascript
var square = function(x) { return x * x; };
map(square, [1, 2, 3]);
//=> [1, 4, 9]
``
Released under the MIT license.
[ci-link]: https://travis-ci.org/ndhoule/map
[ci-badge]: https://travis-ci.org/ndhoule/map.svg?branch=master