UNPKG

iter-tools-es

Version:
25 lines (20 loc) 560 B
const { iterableCurry, ensureIterable } = require('../../internal/iterable.js'); const { __startsWithAnySeq } = require('../$starts-with-any-seq/starts-with-any-seq.js'); function __startsWithSeq(iterable, seq, same = Object.is) { return __startsWithAnySeq(iterable, [seq], same); } exports.__startsWithSeq = __startsWithSeq; const startsWithSeq = /*#__PURE__*/iterableCurry(__startsWithSeq, { minArgs: 1, maxArgs: 2, reduces: true, validateArgs(args) { args[1] = ensureIterable(args[1]); } }); exports.startsWithSeq = startsWithSeq;