Provides fluent api operations on iterators, async iterators and promise iterators.
The library provides the common transformation, filtering and aggregation operations on iterators, async iterators and promise iterators.
Install from Node Package Manager: npm i ts-fluent-iterators
Add the following code to your index file:
import { iterator, Generators } from 'ts-fluent-iterators';
const iter = iterator(Generators.range());
console.log(
`The first five even numbers are: ${iter
.filter(n => n % 2 === 0)
.take(5)
.collect()}`
);
-
Item-by-item transformations:
-
Group transformations like
-
Extending operations like
-
Narrowing operations like
-
Aggregating operations:
-
Logical aggregating operations:
-
Execution operations:
-
Promise specific operations:
Click here for the Full API Reference.
Licensed under MIT.