2.2.15 • Published 3 years ago

@extra-map/get-path.min v2.2.15

Weekly downloads
25
License
MIT
Repository
github
Last release
3 years ago

Gets value at path in a nested map. :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:

Alternatives: get, getAll, getPath. Similar: hasPath, getPath, setPath$, removePath$. Similar: get, set, remove.

This is part of package extra-map.

This is browserified, minified version of @extra-map/get-path. It is exported as global variable map_getPath. CDN: unpkg, jsDelivr.

map.getPath(x, p);
// x: a nested map
// p: path
const map = require("extra-map");

var x = new Map([["a", 2], ["b", 4], ["c", 6]]);
var y = new Map([["x", x], ["e", 10], ["f", 12]]);
map.getPath(y, ["e"]);
// 10

map.getPath(y, ["x", "b"]);
// 4

map.getPath(y, ["x", "b", "c"]);
// undefined

References

2.2.15

3 years ago

2.2.13

3 years ago

2.2.14

3 years ago

2.2.12

3 years ago

2.2.11

3 years ago

2.2.10

3 years ago

2.2.8

3 years ago

2.2.7

4 years ago

2.2.6

4 years ago

2.2.5

4 years ago

2.2.4

4 years ago

2.2.3

4 years ago

2.2.2

4 years ago

2.2.1

4 years ago

2.2.0

4 years ago

2.1.43

4 years ago

2.1.42

4 years ago

2.1.41

4 years ago

2.1.40

4 years ago