@extra-map/concat-update.min

Appends entries from maps, preferring last.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@extra-map/concat-update.min
312.2.152 years ago2 years agoMinified + gzip package size for @extra-map/concat-update.min in KB

Readme

Appends entries from maps, preferring last. :package: :smileycat: :running: :vhs: :moon: :scroll: :newspaper: :bluebook:
Alternatives: concat, concat$.

This is part of package extra-map.

This is browserified, minified version of @extra-map/concat-update.
It is exported as global variable mapconcat$.
CDN: unpkg
, jsDelivr.



map.concat$(x, ...ys);
// x:  a maps (updated)
// ys: other maps
// → x

const map = require("extra-map");

var x = new Map([["a", 1], ["b", 2]]);
var y = new Map([["c", 3], ["d", 4]]);
map.concat$(x, y);
// Map(4) { "a" => 1, "b" => 2, "c" => 3, "d" => 4 }

x;
// Map(4) { "a" => 1, "b" => 2, "c" => 3, "d" => 4 }

var x = new Map([["a", 1], ["b", 2]]);
var z = new Map([["d", 40], ["e", 50]]);
map.concat$(x, y, z);
// Map(5) { "a" => 1, "b" => 2, "c" => 3, "d" => 40, "e" => 50 }



References