-
Notifications
You must be signed in to change notification settings - Fork 1
fromLists
Subhajit Sahu edited this page Dec 5, 2022
·
18 revisions
Convert lists to map.
Similar: from, fromLists, fromKeys, fromValues.
function fromLists(x)
// x: lists, i.e. [keys, values]
const map = require('extra-map');
var ls = [['a', 'b', 'c'], [1, 2, 3]];
map.fromLists(ls);
// → Map(3) { 'a' => 1, 'b' => 2, 'c' => 3 }