doc: rename defaultEncoding option to encoding#14867
doc: rename defaultEncoding option to encoding#14867azasypkin wants to merge 1 commit intonodejs:masterfrom azasypkin:issue-14611-write-stream-encoding-doc
Conversation
The documentation for `fs.createWriteStream()` references a `defaultEncoding` as possible options property, but in reality `encoding` property is expected and properly handled. This fix updates the documentation to rename the `defaultEncoding` property to `encoding`. Fixes: #14611
|
Welcome @azasypkin, and thank you for the contribution 🥇 |
|
@refack @lpinca looking at this I wondered why things still seem to work with Line 99 in aa011a1 When fs.createWritableStream() creates the new stream.Writable it's just passing along the user provided options.defaultEncoding (if there was one).
The refack: edited formatting to embed reffed line |
IMHO the docs for |
|
/cc @nodejs/streams @nodejs/documentation |
I think it makes sense to include this little change in this PR as well, I'll add it. |
|
@refack @azasypkin I would not add that change here. Ideally, I will remove |
Okay, it's even better :) |
|
Landed in e96c11c |
The documentation for `fs.createWriteStream()` references a `defaultEncoding` as possible options property, but in reality `encoding` property is expected and properly handled. This fix updates the documentation to rename the `defaultEncoding` property to `encoding`. PR-URL: #14867 Fixes: #14611 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]>
|
@azasypkin congratulation on GitHub promoting you from: |
Yay, thanks! |
The documentation for `fs.createWriteStream()` references a `defaultEncoding` as possible options property, but in reality `encoding` property is expected and properly handled. This fix updates the documentation to rename the `defaultEncoding` property to `encoding`. PR-URL: #14867 Fixes: #14611 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]>
The documentation for `fs.createWriteStream()` references a `defaultEncoding` as possible options property, but in reality `encoding` property is expected and properly handled. This fix updates the documentation to rename the `defaultEncoding` property to `encoding`. PR-URL: #14867 Fixes: #14611 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]>


The documentation for
fs.createWriteStream()references adefaultEncodingas possible options property, but in realityencodingproperty is expected and properly handled. This fix updatesthe documentation to rename the
defaultEncodingproperty toencoding.Fixes: #14611
Checklist
Affected core subsystem(s)
doc