UNPKG

@codibre/fluent-iterable

Version:

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

17 lines (16 loc) 609 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.toChainRecipeFactory = toChainRecipeFactory; exports.toObjectChainRecipe = toObjectChainRecipe; const to_object_chain_reduce_recipe_1 = require("./to-object-chain-reduce-recipe"); function toChainRecipeFactory(base) { return function (...keys) { return base.call(this, () => [], (acc, x) => { acc.push(x); return acc; }, ...keys); }; } function toObjectChainRecipe(ing) { return toChainRecipeFactory((0, to_object_chain_reduce_recipe_1.toObjectChainReduceRecipe)(ing)); }