We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
writable.setDefaultEncoding()
this
1 parent 0d19853 commit e6c8da4Copy full SHA for e6c8da4
doc/api/stream.md
@@ -695,6 +695,7 @@ file.end('world!');
695
#### writable.setDefaultEncoding(encoding)
696
697
* `encoding` {String} The new default encoding
698
+* Return: `this`
699
700
Sets the default encoding for a writable stream.
701
lib/_stream_writable.js
@@ -251,6 +251,7 @@ Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
251
if (!Buffer.isEncoding(encoding))
252
throw new TypeError('Unknown encoding: ' + encoding);
253
this._writableState.defaultEncoding = encoding;
254
+ return this;
255
};
256
257
function decodeChunk(state, chunk, encoding) {
0 commit comments