Skip to content
This repository has been archived by the owner on Oct 16, 2021. It is now read-only.

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 <[email protected]>
PR-URL: nodejs#25591
  • Loading branch information
chrisneave authored and jBarz committed Nov 4, 2016
1 parent 026c079 commit 4f59dd3
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 4f59dd3

Please sign in to comment.