mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
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:
1 parent
70dd13f88d
commit
b7229debbe
1 file changed
+1
-1
+1
-1
@@ -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 }
|
||||
|
||||
|
||||
Reference in new issue
Block a user