2.2.10 • Published 4 years ago

@extra-lists/has-path v2.2.10

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

Checks if nested lists has a path. :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:

Alternatives: has, hasValue, hasEntry, hasSubset, hasPath. Similar: hasPath, getPath.

This is part of package extra-lists.

lists.hasPath(x, p);
// x: nested lists
// p: path
const lists = require('extra-lists');

var x = [['a', 'b', 'c'], [2, 4, 6]];
var y = [['x', 'e', 'f'], [x, 10, 12]];
lists.hasPath(y, ['e']);
// true

lists.hasPath(y, ['x', 'b']);
// true

lists.hasPath(y, ['x', 'b', 'c']);
// false

References

2.2.10

4 years ago

2.2.9

4 years ago

2.2.7

4 years ago

2.2.8

4 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.0

5 years ago

2.1.8

5 years ago

2.1.7

5 years ago

2.1.6

5 years ago