stream: change comment on duplex stream options

'options.XXX' did not convey to me how to use camelCase for different
readable and writable options on a duplex stream. Give an example
instead.

PR-URL: https://github.com/nodejs/node/pull/24247
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Jesse W. Collins 2018-11-08 08:55:28 -05:00 committed by Rich Trott
parent 9b2ffff62c
commit d4653d5a7d

View File

@ -57,8 +57,8 @@ function WritableState(options, stream, isDuplex) {
// Duplex streams are both readable and writable, but share
// the same options object.
// However, some cases require setting options to different
// values for the readable and the writable sides of the duplex stream.
// These options can be provided separately as readableXXX and writableXXX.
// values for the readable and the writable sides of the duplex stream,
// e.g. options.readableObjectMode vs. options.writableObjectMode, etc.
if (typeof isDuplex !== 'boolean')
isDuplex = stream instanceof Stream.Duplex;