@extra-array/from-lists
v1.1.7
Published
Create array from lists of keys and values.
Downloads
77
Maintainers
Readme
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.