UNPKG

itertools-ts

Version:

Extended itertools port for TypeScript and JavaScript. Provides a huge set of functions for working with iterable collections (including async ones)

8 lines 290 B
export function createPipe(...operations) { const result = (input) => { return operations.reduce((prevResult, operation) => operation(prevResult), input); }; result.add = (operation) => createPipe(result, operation); return result; } //# sourceMappingURL=pipe.js.map