-
Notifications
You must be signed in to change notification settings - Fork 0
concat
Subhajit Sahu edited this page Jun 17, 2020
·
14 revisions
Appends entries from maps, preferring last. 🏃 [:vhs:] 📦 🌔 📒
entries.concat(...xs);
// xs: n entries
const entries = require('extra-entries');
var x = [['a', 1], ['b', 2]];
var y = [['c', 3], ['d', 4]];
[...entries.concat(x, y)];
// [ [ 'a', 1 ], [ 'b', 2 ], [ 'c', 3 ], [ 'd', 4 ] ]
var z = [['d', 40], ['e', 50]];
[...entries.concat(x, y, z)];
// [ [ 'a', 1 ], [ 'b', 2 ], [ 'c', 3 ], [ 'd', 40 ], [ 'e', 50 ] ]