Skip to content

fromLists

Subhajit Sahu edited this page Dec 22, 2022 · 14 revisions

Convert lists to entries.


function fromLists(x)
// x: lists, i.e. [keys, values]
const entries = require('extra-entries');

var x = [["a", "b", "c"], [1, 2, 3]];
[...entries.fromLists(x)];
// → [ [ "a", 1 ], [ "b", 2 ], [ "c", 3 ] ]


References

Clone this wiki locally