array-fromentries

Create array from entries.

Usage no npm install needed!

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

README

array-fromentries

NOTE: array-fromentries was renamed to @extra-array/from-entries. NPM

Create array from entries.

const fromEntries = require('array-fromentries');
// fromEntries(<entries>, [map function], [this])

fromEntries([3, 1, 5, 19, 1, 18].entries());
// [3, 1, 5, 19, 1, 18]
fromEntries(['c', 'a', 'e', 's', 'e', 'r'].entries());
// ['c', 'a', 'e', 's', 'a', 'r']
fromEntries([[0, 'g'], [1, 'o']], (v, i, ent) => v==='g'? 'n':v);
// ['n', 'o']