Skip to content

Commit

Permalink
stream: change comment on duplex stream options
Browse files Browse the repository at this point in the history
'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: #24247
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
jeswcollins authored and codebytere committed Jan 12, 2019
1 parent 585db59 commit 965098a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/_stream_writable.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,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;

Expand Down

0 comments on commit 965098a

Please sign in to comment.