1 | import { AsyncIterableX } from './asynciterablex';
|
2 | import { from } from './from';
|
3 | export function pipe(source, ...operations) {
|
4 | if (operations.length === 0) {
|
5 | return source instanceof AsyncIterableX ? source : from(source);
|
6 | }
|
7 | const piped = (input) => {
|
8 | return operations.reduce((prev, fn) => fn(prev), input);
|
9 | };
|
10 | return piped(source);
|
11 | }
|
12 |
|
13 | //# sourceMappingURL=pipe.mjs.map
|