Skip to content
This repository has been archived by the owner. It is now read-only.

objectMode option in writable stream not documented #5377

Closed
curvedmark opened this issue Apr 28, 2013 · 2 comments
Closed

objectMode option in writable stream not documented #5377

curvedmark opened this issue Apr 28, 2013 · 2 comments

Comments

@curvedmark
Copy link

@curvedmark curvedmark commented Apr 28, 2013

Yet the code suggests it's supported.

And since both writable & readable streams use the objectMode option, how do I make a transform stream that has an objectMode writable end and a non-objectMode readable end?

@isaacs
Copy link

@isaacs isaacs commented Apr 29, 2013

function MyTransform(options) {
  Transform.call(this, options);
  this._readableState.objectMode = true;
  this._writableState.objectMode = false;
}

@isaacs isaacs closed this Apr 29, 2013
@mkleehammer
Copy link

@mkleehammer mkleehammer commented Aug 17, 2014

Perhaps options like readObjects and writeObjects could be added that supersede objectMode. If objectMode is passed, it can be the default for the other two.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants