UNPKG

@tsdotnet/linq

Version:

A familiar set of functions that operate on JavaScript iterables (ES2015+) in a similar way to .NET's LINQ does with enumerables.

17 lines (15 loc) 376 B
function where(predicate) { return function (sequence) { return { *[Symbol.iterator]() { let i = 0; for (const e of sequence) { if (predicate(e, i++)) yield e; } } }; }; } export { where as default }; //# sourceMappingURL=where.js.map