mafintosh / duplexify

Turn a writable and readable stream into a streams2 duplex stream with support for async initialization and streams1/streams2 input
MIT License
190 stars 36 forks source link

Support `objectMode` for one side only #14

Open ip opened 7 years ago

ip commented 7 years ago

Should respect readableObjectMode and writableObjectMode options:

https://nodejs.org/dist/latest-v8.x/docs/api/stream.html#stream_object_mode_duplex_streams

IronSavior commented 6 years ago

I think this is already supported by virtue of this line.

freddi301 commented 2 years ago
const duplex = duplexify(encoder, decoder, {
  objectMode: true,
  writableObjectMode: true,
  readableObjectMode: true,
})
duplex.writableObjectMode // is undefined
duplex.readableObjectMode // is undefined