2.2.15 • Published 4 years ago

@extra-map/has-entry v2.2.15

Weekly downloads
18
License
MIT
Repository
github
Last release
4 years ago

Checks if map has an entry. :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:

Alternatives: has, hasValue, hasEntry, hasSubset, hasPath. Similar: entry, entries, hasEntry.

This is part of package extra-map.

map.hasEntry(x, e, [fc], [fm]);
// x:  a map
// e:  entry?
// fc: compare function (a, b)
// fm: map function (v, k, x)
const map = require("extra-map");

var x = new Map([["a", 1], ["b", 2], ["c", -3]]);
map.hasEntry(x, ["c", 3]);
// false

map.hasEntry(x, ["c", 3], (a, b) => Math.abs(a) - Math.abs(b));
// true

map.hasEntry(x, ["c", 3], null, v => Math.abs(v));
// true

References

2.2.15

4 years ago

2.2.14

4 years ago

2.2.13

4 years ago

2.2.12

4 years ago

2.2.11

4 years ago

2.2.10

4 years ago

2.2.8

5 years ago

2.2.7

5 years ago

2.2.6

5 years ago

2.2.5

5 years ago

2.2.4

5 years ago

2.2.3

5 years ago

2.2.2

5 years ago

2.2.1

5 years ago