diff options
author | Ryusei Yamaguchi <mandel59@gmail.com> | 2018-04-02 23:08:48 +0900 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2018-04-10 00:59:16 +0200 |
commit | 87880466b1392c8e0e6d1abb8838d447eceaa981 (patch) | |
tree | 6397561c54385f34544f38fe13982f717bf3253b /doc | |
parent | 7bc5151d5ec819001d40c4b34f6921d5a7242ba8 (diff) | |
download | node-new-87880466b1392c8e0e6d1abb8838d447eceaa981.tar.gz |
doc: fix about `decodeStrings` property of `stream.Writable`
This fixes negation ommitted in a former commit.
It also simplifies the text in general.
PR-URL: https://github.com/nodejs/node/pull/19752
Refs: https://github.com/nodejs/node/commit/80ea0c5a64fe673011e8b1025de23a0ea7f3f7f8
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/stream.md | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/doc/api/stream.md b/doc/api/stream.md index 8ad93c09d1..6406e49fa8 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -1520,13 +1520,12 @@ buffered. When the `callback` is invoked, the stream might emit a [`'drain'`][] event. If a stream implementation is capable of processing multiple chunks of data at once, the `writable._writev()` method should be implemented. -If the `decodeStrings` property is set in the constructor options, then -`chunk` may be a string rather than a Buffer, and `encoding` will -indicate the character encoding of the string. This is to support -implementations that have an optimized handling for certain string -data encodings. If the `decodeStrings` property is explicitly set to `false`, -the `encoding` argument can be safely ignored, and `chunk` will remain the same -object that is passed to `.write()`. +If the `decodeStrings` property is explicitly set to `false` in the constructor +options, then `chunk` will remain the same object that is passed to `.write()`, +and may be a string rather than a `Buffer`. This is to support implementations +that have an optimized handling for certain string data encodings. In that case, +the `encoding` argument will indicate the character encoding of the string. +Otherwise, the `encoding` argument can be safely ignored. The `writable._write()` method is prefixed with an underscore because it is internal to the class that defines it, and should never be called directly by |