Skip to content

Commit

Permalink
docs: Fix default options for fs.createWriteStream()
Browse files Browse the repository at this point in the history
The documentation for createWriteStream() references an
'encoding' property that has a default value of null. However,
this property is never referenced by createWriteStream() or
WritableState(). Instead a 'defaultEncoding' property is
referenced in WritableState() with a default of 'utf8' if no value
is supplied.

This fix updates the documentation to rename the 'encoding'
property to 'defaultEncoding' and indicate its default value of
'utf8'.

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs#25565
  • Loading branch information
chrisneave authored and jasnell committed Jun 29, 2015
1 parent e9bf57e commit 8c357a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/fs.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ Returns a new WriteStream object (See `Writable Stream`).
`options` is an object with the following defaults:

{ flags: 'w',
encoding: null,
defaultEncoding: 'utf8',
fd: null,
mode: 0666 }

Expand Down

0 comments on commit 8c357a6

Please sign in to comment.