From 4f59dd376c18edf7ae5f6826383cdff2762c96f4 Mon Sep 17 00:00:00 2001 From: Chris Neave Date: Sat, 23 May 2015 21:24:49 +0100 Subject: [PATCH] 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 PR-URL: https://github.com/joyent/node/pull/25591 --- doc/api/fs.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/fs.markdown b/doc/api/fs.markdown index 6898a9e1bdee..9da32d376387 100644 --- a/doc/api/fs.markdown +++ b/doc/api/fs.markdown @@ -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 }