This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/array-map
2019-08-11 20:48:02 +02:00
..
example Update Framework 2019-08-11 20:48:02 +02:00
test Update Framework 2019-08-11 20:48:02 +02:00
.travis.yml Update Framework 2019-08-11 20:48:02 +02:00
index.js Update Framework 2019-08-11 20:48:02 +02:00
LICENSE Update Framework 2019-08-11 20:48:02 +02:00
package.json Update Framework 2019-08-11 20:48:02 +02:00
readme.markdown Update Framework 2019-08-11 20:48:02 +02:00

array-map

[].map(f) for older browsers

testling badge

build status

example

var map = require('array-map');
var letters = map([97,98,99], function (c) {
    return String.fromCharCode(c);
});
console.log(letters.join(''));

output:

abc

methods

var map = require('array-map')

var ys = map(xs, f)

Create a new array ys by applying f(xs[i], i, xs) to each element in xs at index i.

install

With npm do:

npm install array-map

license

MIT