@extra-map/set

Sets value at key.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@extra-map/set
312.2.152 years ago2 years agoMinified + gzip package size for @extra-map/set in KB

Readme

Sets value at key. :package: :smileycat: :running: :vhs: :moon: :scroll: :newspaper: :bluebook:
Alternatives: set, set$, setPath$.
Similar: get, set, remove.

This is part of package extra-map.



map.set(x, k, v);
// x: a map
// k: key
// v: value

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

var x = new Map([["a", 2], ["b", 4], ["c", 6], ["d", 8]]);
map.set(x, "b", 40);
// Map(4) { "a" => 2, "b" => 40, "c" => 6, "d" => 8 }

map.set(x, "d", 80);
// Map(4) { "a" => 2, "b" => 4, "c" => 6, "d" => 80 }



References