Public flag for ObjectMode #5064

Open
ForbesLindesay opened this Issue Mar 18, 2013 · 2 comments

Projects

None yet

5 participants

@ForbesLindesay

I want to be able to tell whether an arbitrary stream is in Object Mode, as it affects how I choose to handle the stream.

stream._readableState.objectMode

seems to do the trick, but I was wondering if it could be made public. It also could be nicer if it was exposed as stream.objectMode or similar.

@ForbesLindesay ForbesLindesay referenced this issue in substack/stream-handbook Mar 18, 2013
Closed

Object Streams #22

@mkleehammer

If this is done, consider making readsObjects and writesObjects so transform streams that read on type but emit the other can be handled properly.

@mk-pmb
mk-pmb commented Mar 9, 2015

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment