Skip to content

fromEntries

Subhajit Sahu edited this page Jun 19, 2020 · 5 revisions

Creates map from entries. 🏃 📼 📦 🌔 📒

Alternatives: from, from$, fromLists.

map.from(es);
// es: entries
const lists = require('extra-lists');

var es = [['a', 1], ['b', 2], ['c', 3]];
lists.fromEntries(es).map(c => [...c]);
// [ [ 'a', 'b', 'c' ], [ 1, 2, 3 ] ]

references

Clone this wiki locally