UNPKG

238 BJavaScriptView Raw
1export async function some(source, predicate) {
2 let i = 0;
3 for await (let item of source) {
4 if (await predicate(item, i++)) {
5 return true;
6 }
7 }
8 return false;
9}
10
11//# sourceMappingURL=some.mjs.map