From 87880466b1392c8e0e6d1abb8838d447eceaa981 Mon Sep 17 00:00:00 2001 From: Ryusei Yamaguchi Date: Mon, 2 Apr 2018 23:08:48 +0900 Subject: [PATCH] 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 Reviewed-By: Luigi Pinca Reviewed-By: Ruben Bridgewater --- doc/api/stream.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index 8ad93c09d1a833..6406e49fa8297c 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