Skip to content

Commit b7229de

Browse files
chrisneavejasnell
authored andcommitted
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: nodejs/node-v0.x-archive#25591
1 parent 70dd13f commit b7229de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/fs.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ Returns a new WriteStream object (See `Writable Stream`).
823823
`options` is an object with the following defaults:
824824

825825
{ flags: 'w',
826-
encoding: null,
826+
defaultEncoding: 'utf8',
827827
fd: null,
828828
mode: 0666 }
829829

0 commit comments

Comments
 (0)