docs: Fix default options for fs.createWriteStream()

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: https://github.com/joyent/node/pull/25591
This commit is contained in:
Chris Neave authored and James M Snell committed 2015-08-03 20:44:39 -07:00
1 parent 70dd13f88d
commit b7229debbe
1 file changed
+1 -1
+1 -1
View File
@@ -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 }