Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

array-map

ljharb2.1mMIT0.0.1

[].map(f) for older browsers

array, map, browser, es5, shim, ie6, ie7, ie8

readme

array-map Version Badge

github actions coverage License Downloads

npm badge

[].map(f) for older browsers

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

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

v0.0.1 - 2022-10-12

Commits

  • [eslint] fix indentation 8048dba
  • [readme] rename, add badges 0ab0a1f
  • [eslint] add eslint 3909421
  • [actions] add reusable workflows 83cac41
  • [meta] add auto-changelog 8a61987
  • [meta] create FUNDING.yml; add funding in package.json 2854c0d
  • [Dev Deps] update tape 0aec614
  • [meta] use npmignore to autogenerate an npmignore file c5b8638
  • Only apps should have lockfiles cb91b96
  • [meta] update URLs 46f3a20
  • [meta] add safe-publish-latest 540233d
  • [Tests] add aud in posttest 4f9efa2

v0.0.0 - 2013-12-24

Commits

  • package.json etc 550a7f5
  • example, docs 133eab6
  • passing test for elements and indexes, failing test for holes 91346e2
  • testling and travis badges 8ac5ee1
  • passing sparse map tests 1c0012d
  • full coverage way of writing the ignore holes tests fc31999
  • cripple() function for 100% code coverage 5ee30ea
  • passing test 6da4e50
  • hole test passes b60365f