UNPKG

iteragain

Version:

Javascript Iterable/Iterator/Generator-function utilities.

14 lines 389 B
import toIterator from './toIterator'; export function some(...args) { if (args.length === 1) return it => some(it, args[0]); const it = toIterator(args[0]); const predicate = args[1]; let next; while (!(next = it.next()).done) if (predicate(next.value)) return true; return false; } export default some; //# sourceMappingURL=some.js.map