UNPKG

iter-tools-es

Version:
19 lines (15 loc) 433 B
const { asyncIterableCurry } = require('../../internal/async-iterable.js'); async function __asyncTakeLastOr(iterable, whenEmpty) { let _value = whenEmpty; for await (const value of iterable) { _value = value; } return _value; } exports.__asyncTakeLastOr = __asyncTakeLastOr; const asyncTakeLastOr = /*#__PURE__*/asyncIterableCurry(__asyncTakeLastOr, { reduces: true }); exports.asyncTakeLastOr = asyncTakeLastOr;