@@ 11953-11953 (lines=1) @@ | ||
11950 | } |
|
11951 | }; |
|
11952 | ||
11953 | Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { |
|
11954 | // node::ParseEncoding() requires lower case. |
|
11955 | if (typeof encoding === 'string') encoding = encoding.toLowerCase(); |
|
11956 | if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); |
@@ 356-356 (lines=1) @@ | ||
353 | } |
|
354 | }; |
|
355 | ||
356 | Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { |
|
357 | // node::ParseEncoding() requires lower case. |
|
358 | if (typeof encoding === 'string') encoding = encoding.toLowerCase(); |
|
359 | if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); |