Skip to content
Subhajit Sahu edited this page May 10, 2020 · 15 revisions

Checks if iterable starts with a prefix. 🏃 📼 📦 🌔

Alternatives: [is], [isList], [isIterator], isOnce, isMany.
Similar: isOnce, isMany, many.

iterable.isPrefix(x, y, [fn]);
// x:  an iterable
// y:  prefix?
// fn: compare function (a, b)
const iterable = require('extra-iterable');

var x = [1, 2, 3, 4];
iterable.isOnce(x);
// false

iterable.isOnce(x.values());
// true
Clone this wiki locally