UNPKG

iter-tools-es

Version:
25 lines (20 loc) 637 B
const { asyncIterableCurry, asyncEnsureIterable } = require('../../internal/async-iterable.js'); const { __asyncStartsWithAnySeq } = require('../$starts-with-any-seq/async-starts-with-any-seq.js'); function __asyncStartsWithSeq(iterable, seq, same = Object.is) { return __asyncStartsWithAnySeq(iterable, [seq], same); } exports.__asyncStartsWithSeq = __asyncStartsWithSeq; const asyncStartsWithSeq = /*#__PURE__*/asyncIterableCurry(__asyncStartsWithSeq, { minArgs: 1, maxArgs: 2, reduces: true, validateArgs(args) { args[1] = asyncEnsureIterable(args[1]); } }); exports.asyncStartsWithSeq = asyncStartsWithSeq;