★ wanayoo — archive 1999 https://github.com/nodejs/node/commit/01e8a3a8d5Nouvelle recherche | Portail wanayoo
Skip to content
Permalink
Browse files
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: #24247
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
jeswcollins authored and rvagg committed Nov 28, 2018
1 parent 415340f commit 01e8a3a8d53a08e3838a0ab11122e8ead0d0a886
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/_stream_writable.js
@@ -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;

0 comments on commit 01e8a3a

Please sign in to comment.