Nearsighted Paramecium Multiverse
Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

@extra-entries/map

1.1.1 • Public • Published

Map values in entries to new values, like Array.map().

const map = require('@extra-entries/map');
// map(<entries>, <map function>, [this], [begin=0], [end], [target=[]], [at])
// - <map function>(<value>, <key>, <entries>)
// -> <target>
 
map(['WorldWideWeb', 'Mosaic', 'Netscape Navigator'].entries(), (v) => v.toLowerCase());
// [[0, 'worldwideweb'], [1, 'mosaic'], [2, 'netscape navigator']]
map(new Set().add('Internet Explorer').add('Opera').entries(), (v, k, ent) => v.toLowerCase());
// [['Internet Explorer', 'internet explorer'], ['Opera', 'opera']]
map(new Map().set(2002, 'Mozilla Navigator').set(2003, 'Safari').entries(), (v, k, ent) => v.toLowerCase());
// [[2002, 'mozilla navigator'], [2003, 'safari']]

extra-entries

install

npm i @extra-entries/map

Downloadsweekly downloads

2

version

1.1.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability