Updates values based on map function.
npm install @extra-array/map.minUpdates values based on map function.
:package:
:smiley_cat:
:running:
:vhs:
:moon:
:scroll:
:newspaper:
:blue_book:
> Alternatives: [map], [map$].
> Similar: [map], [filter], [reject], [reduce], [accumulate].
> This is part of package [extra-array].
[extra-array]: https://www.npmjs.com/package/extra-array
> This is browserified, minified version of [@extra-array/map].
> It is exported as global variable array_map.
> CDN: [unpkg], [jsDelivr].
[@extra-array/map]: https://www.npmjs.com/package/@extra-array/map
[unpkg]: https://unpkg.com/@extra-array/map.min
[jsDelivr]: https://cdn.jsdelivr.net/npm/@extra-array/map.min
``javascript`
array.map(x, fm);
// x: an array
// fm: map function (v, i, x)
`javascript
const array = require("extra-array");
var x = [1, 2, 3, 4];
array.map(x, v => v * 2);
// [ 2, 4, 6, 8 ]
``
- Data.List.map: Haskell
- Array.prototype.map: MDN web docs
- array_map: PHP
- Array.map: sugarjs
- filter-collection: @dimd13
[map]: https://github.com/nodef/extra-array/wiki/map
[map$]: https://github.com/nodef/extra-array/wiki/map$
[filter]: https://github.com/nodef/extra-array/wiki/filter
[reduce]: https://github.com/nodef/extra-array/wiki/reduce
[accumulate]: https://github.com/nodef/extra-array/wiki/accumulate
[reject]: https://github.com/nodef/extra-array/wiki/reject