@codibre/fluent-iterable
Version:
Provides LINQ-like fluent api operations for iterables and async iterables (ES2018+).
22 lines (21 loc) • 1.01 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isDistinctAsync = exports.distinctAsync = void 0;
const recipes_1 = require("../recipes");
const all_async_1 = require("./all-async");
const filter_async_1 = require("./filter-async");
const has_less_or_exactly_async_1 = require("./has-less-or-exactly-async");
const basic_ingredients_async_1 = require("./basic-ingredients-async");
const partition_async_1 = require("./partition-async");
const reduce_async_1 = require("./reduce-async");
function distinctAsyncRecipe(filterOrAll) {
return (0, recipes_1.distinctRecipe)({
...basic_ingredients_async_1.basicAsync,
partition: partition_async_1.partitionAsync,
filterOrAll,
hasLessOrExactly: has_less_or_exactly_async_1.hasLessOrExactlyAsync,
reduce: reduce_async_1.reduceAsync,
});
}
exports.distinctAsync = distinctAsyncRecipe(filter_async_1.filterAsync);
exports.isDistinctAsync = distinctAsyncRecipe(all_async_1.allAsync);