@extra-array/from-lists

1.1.7 • Public • Published

Create array from lists of keys and values.

const fromLists = require('@extra-array/from-lists');
// fromLists(<lists>, [map function], [this])

a = ['care', 'hospital', 'hitech'];
fromLists([a.keys(), a]);
// ['care', 'hospital', 'hitech']
fromLists([[0, 2, 1], a]);
// ['care', 'hitech', 'hospital']
fromLists([[0, 2, 1], a], (v, i, lst) => v.substr(1));
// ['are', 'itech', 'ospital']

With extra-array try Array.fromLists() instead.


extra-array

Package Sidebar

Install

npm i @extra-array/from-lists

Weekly Downloads

0

Version

1.1.7

License

MIT

Unpacked Size

2.72 kB

Total Files

4

Last publish

Collaborators

  • wolfram77