UNPKG

@codibre/fluent-iterable

Version:

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

14 lines (13 loc) 655 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isAnyFluentIterable = isAnyFluentIterable; const fluent_async_class_1 = require("./fluent-async-class"); const fluent_class_1 = require("./fluent-class"); /** * Return true when the informed value is an fluent iterable, and false otherwise * @param value the value to be analyzed * @returns The return is also a type guard, ie, inside an if with that function, the value will be considered an fluent iterable */ function isAnyFluentIterable(value) { return value instanceof fluent_class_1.FluentClass || value instanceof fluent_async_class_1.FluentAsyncClass; }