UNPKG

fast-iterable

Version:

Provides LINQ-like fluent api operations for iterables and async iterables (ES2018+).

11 lines (10 loc) 307 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.withIndexRecipe = void 0; function withIndexRecipe(map) { return function () { let idx = 0; return map.call(this, (t) => ({ idx: idx++, value: t })); }; } exports.withIndexRecipe = withIndexRecipe;