Skip to content

Need a way to detect end of stream on custom Writable Streams implementing _write #2994

Description

@GeorgeBailey

It seems that _write should be called with null as the data, when the end of stream is reached.

The problem I am having is that I need to add additional data to the end of the stream, and the finish event should not be emitted until after that is completed. I need a way to control this, so I'm thinking a new _end function with a callback, or perhaps a callback on _write(null) would do the trick.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues requesting new Node.js features.streamIssues and PRs related to Node.js streams.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions