array-fromlists

Create array from lists of keys and values.

Usage no npm install needed!

<script type="module">
  import arrayFromlists from 'https://cdn.skypack.dev/array-fromlists';
</script>

README

array-fromlists

NOTE: array-fromlists was renamed to @extra-array/from-lists. NPM

Create array from lists of keys and values.

const fromLists = require('array-fromlists');
// 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']