Skip to content

Accept fn for lazy sequential streams #27

@richardscarrott

Description

@richardscarrott

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions