UNPKG

iter-tools-es

Version:
21 lines (17 loc) 411 B
const { asyncIterableCurry } = require('../../internal/async-iterable.js'); async function __asyncSome(iterable, func) { let c = 0; for await (const value of iterable) { if (await func(value, c++)) { return true; } } return false; } exports.__asyncSome = __asyncSome; const asyncSome = /*#__PURE__*/asyncIterableCurry(__asyncSome, { reduces: true }); exports.asyncSome = asyncSome;