UNPKG

@reactivex/ix-esnext-esm

Version:

The Interactive Extensions for JavaScript

13 lines (11 loc) 278 B
export async function last(source, predicate = async () => true) { let i = 0; let result; for await (const item of source) { if (await predicate(item, i++)) { result = item; } } return result; } //# sourceMappingURL=last.mjs.map