Skip to content

Commit

Permalink
doc: update writable streams default encoding
Browse files Browse the repository at this point in the history
Setting the default encoding for a writable stream does
not return a boolean (true if successful or false if not)
as the docs indicate. Instead, if the operation is successful
nothing is returned and the method throws an error when
something goes wrong.

This stems from a contribution that was tweaked but the
docs were never updated accordingly.

PR-URL: #502
Reviewed-By: Rod Vagg <[email protected]>
  • Loading branch information
Johnny Ray Austin authored and rvagg committed Jan 27, 2015
1 parent 1855267 commit 84b05d4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions doc/api/stream.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -567,10 +567,8 @@ Flush all data, buffered since `.cork()` call.
#### writable.setDefaultEncoding(encoding)

* `encoding` {String} The new default encoding
* Return: `Boolean`

Sets the default encoding for a writable stream. Returns `true` if the encoding
is valid and is set. Otherwise returns `false`.
Sets the default encoding for a writable stream.

#### writable.end([chunk][, encoding][, callback])

Expand Down

0 comments on commit 84b05d4

Please sign in to comment.