2.5.22 • Published 4 years ago
@extra-iterable/has-path v2.5.22
Checks if nested iterable has a path. :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:
Alternatives: hasValue, hasPrefix, hasInfix, hasSuffix, hasSubsequence, hasPath. Similar: hasPath, getPath.
This is part of package extra-iterable.
iterable.hasPath(x, p);
// x: a nested iterable
// p: path
const iterable = require("extra-iterable");
var x = [[2, 4], 6, 8];
iterable.hasPath(x, [1]);
// true
iterable.hasPath(x, [0, 1]);
// true
iterable.hasPath(x, [0, 1, 2]);
// false