Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept fn for lazy sequential streams #27

Open
richardscarrott opened this issue Jan 9, 2020 · 0 comments
Open

Accept fn for lazy sequential streams #27

richardscarrott opened this issue Jan 9, 2020 · 0 comments

Comments

@richardscarrott
Copy link

richardscarrott commented Jan 9, 2020

I haven't looked into the implementation of merge2 yet but wondered whether it would be possible to accept a function (() => Stream), allowing streams to be lazy, e.g.

const pipeline1 = () => readable1.pipe(transform1); // Lazy
const pipeline2 = () => readable2.pipe(transform2); // Lazy
merge(pipeline1, pipeline2).pipe(writable); // `readable2` is not read from until `pipeline1` is finished
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant