-
Notifications
You must be signed in to change notification settings - Fork 1
hasPath
Subhajit Sahu edited this page Jun 28, 2020
·
7 revisions
Gets value at index. [:running:] [:vhs:] [:package:] [:moon:] [:ledger:]
Alternatives: [get], [getAll], [getPath].
Similar: [hasPath], [getPath].
iterable.get(x, i);
// x: an iterable
// i: index
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