gaojunlong 0b996e41aa 2025-03-04-1 2 月之前
..
example 0b996e41aa 2025-03-04-1 2 月之前
test 0b996e41aa 2025-03-04-1 2 月之前
.travis.yml 0b996e41aa 2025-03-04-1 2 月之前
LICENSE 0b996e41aa 2025-03-04-1 2 月之前
index.js 0b996e41aa 2025-03-04-1 2 月之前
package.json 0b996e41aa 2025-03-04-1 2 月之前
readme.markdown 0b996e41aa 2025-03-04-1 2 月之前

readme.markdown

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