dist/async-iterable/operators.js
/** True if at least one item in a sequence matches the given predicate */
True if at least one item in a sequence matches the given predicate
True if at least one item in a sequence matches the given predicate
function some(predicate) {
    return async (it) => {
        var e_22, _a;
        let index = 0;
        try {
            for (var it_3 = __asyncValues(it), it_3_1; it_3_1 = await it_3.next(), !it_3_1.done;) {
                const item = it_3_1.value;
                if (await predicate(item, index)) {
                    return true;
                }
                index = index + 1;
            }
        }
        catch (e_22_1) { e_22 = { error: e_22_1 }; }
        finally {
            try {
                if (it_3_1 && !it_3_1.done && (_a = it_3.return)) await _a.call(it_3);
            }
            finally { if (e_22) throw e_22.error; }
        }
        return false;
    };
}
function some ( predicate ) { return async ( it ) => { var e_22 , _a ; let index = 0 ; try { for ( var it_3 = __asyncValues ( it ) , it_3_1 ; it_3_1 = await it_3 . next ( ) , ! it_3_1 . done ; ) { const item = it_3_1 . value ; if ( await predicate ( item , index ) ) { return true ; } index = index + 1 ; } } catch ( e_22_1 ) { e_22 = { error : e_22_1 } ; } finally { try { if ( it_3_1 && ! it_3_1 . done && ( _a = it_3 . return ) ) await _a . call ( it_3 ) ; } finally { if ( e_22 ) throw e_22 . error ; } } return false ; } ; }
True if at least one item in a sequence matches the given predicate
True if at least one item in a sequence matches the given predicate