Skip to content
Subhajit Sahu edited this page Dec 5, 2022 · 19 revisions

Convert entries to map.

Alternatives: from, from$.
Similar: from, fromLists, fromKeys, fromValues.


function from(x)
// x: entries
const map = require('extra-map');

var es = [['a', 1], ['b', 2], ['c', 3]];
map.from(es);
// → Map(3) { 'a' => 1, 'b' => 2, 'c' => 3 }


References

Clone this wiki locally