There was an error while loading. Please reload this page.
Convert entries to map.
Alternatives: from, from$. Similar: from, fromLists, fromKeys, fromValues.
function from$(x) // x: entries (updateable is map!)
const map = require('extra-map'); var es = [['a', 1], ['b', 2], ['c', 3]]; map.from$(es); // → Map(3) { 'a' => 1, 'b' => 2, 'c' => 3 } var x = new Map(es); var a = map.from$(x); // a === x (map is reused) a.set('a', 10); x; // → Map(3) { 'a' => 10, 'b' => 2, 'c' => 3 }