diff options
author | Benjamin Chen <benjaminlchen@gmail.com> | 2018-08-28 01:51:00 -0400 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2018-09-17 17:48:44 +0200 |
commit | e2325bcc0415a86a77faf06a8e85503db9f6618f (patch) | |
tree | da86baac51b5e8d0ec8331bf76d8920744809b1a /lib/string_decoder.js | |
parent | 1b92214d097358040efb7d3ec5dff1736f364bc0 (diff) | |
download | node-new-e2325bcc0415a86a77faf06a8e85503db9f6618f.tar.gz |
string_decoder: support typed array or data view
Refs: https://github.com/nodejs/node/issues/1826
PR-URL: https://github.com/nodejs/node/pull/22562
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'lib/string_decoder.js')
-rw-r--r-- | lib/string_decoder.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/string_decoder.js b/lib/string_decoder.js index b32249ad9e..e5f396cab3 100644 --- a/lib/string_decoder.js +++ b/lib/string_decoder.js @@ -73,7 +73,7 @@ StringDecoder.prototype.write = function write(buf) { return buf; if (!ArrayBuffer.isView(buf)) throw new ERR_INVALID_ARG_TYPE('buf', - ['Buffer', 'Uint8Array', 'ArrayBufferView'], + ['Buffer', 'TypedArray', 'DataView'], buf); return decode(this[kNativeDecoder], buf); }; |