Skip to content

Commit

Permalink
doc: fix a wrong expression about decodeStrings in stream
Browse files Browse the repository at this point in the history
When decodeStrings is false and given data is string, _write() function
receives the string data not `Buffer`.
  • Loading branch information
fmy committed Dec 23, 2016
1 parent e03ee71 commit 1c62ac3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -1273,8 +1273,8 @@ If the `decodeStrings` property is set in the constructor options, then
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 always be a
`Buffer`.
the `encoding` argument can be safely ignored, and `chunk` will remain the same
object that is passed to `.write()`.

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
Expand Down

0 comments on commit 1c62ac3

Please sign in to comment.