Skip to content

fromEntries

Subhajit Sahu edited this page Dec 28, 2022 · 5 revisions

Convert lists to entries.


function fromEntries(x)
// x: entries
const xlists = require('extra-lists');

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


References

Clone this wiki locally