UNPKG

@codibre/fluent-iterable

Version:

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

12 lines (11 loc) 443 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.flatMergeRecipe = flatMergeRecipe; const merging_1 = require("../async-base/merging"); function flatMergeRecipe({ resolver, toArray }) { return function (callback) { return resolver(toArray.call(this), callback ? (x) => (0, merging_1.mergeIterables)(callback, ...x) : (x) => (0, merging_1.mergeIterables)(...x)); }; }