summaryrefslogtreecommitdiff
path: root/doc/api/string_decoder.md
diff options
context:
space:
mode:
authorBenjamin Chen <benjaminlchen@gmail.com>2018-08-28 01:51:00 -0400
committerAnna Henningsen <anna@addaleax.net>2018-09-17 17:48:44 +0200
commite2325bcc0415a86a77faf06a8e85503db9f6618f (patch)
treeda86baac51b5e8d0ec8331bf76d8920744809b1a /doc/api/string_decoder.md
parent1b92214d097358040efb7d3ec5dff1736f364bc0 (diff)
downloadandroid-node-v8-e2325bcc0415a86a77faf06a8e85503db9f6618f.tar.gz
android-node-v8-e2325bcc0415a86a77faf06a8e85503db9f6618f.tar.bz2
android-node-v8-e2325bcc0415a86a77faf06a8e85503db9f6618f.zip
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 'doc/api/string_decoder.md')
-rw-r--r--doc/api/string_decoder.md12
1 files changed, 7 insertions, 5 deletions
diff --git a/doc/api/string_decoder.md b/doc/api/string_decoder.md
index 1311f37255..c2e5434ac7 100644
--- a/doc/api/string_decoder.md
+++ b/doc/api/string_decoder.md
@@ -59,7 +59,8 @@ Creates a new `StringDecoder` instance.
added: v0.9.3
-->
-* `buffer` {Buffer} A `Buffer` containing the bytes to decode.
+* `buffer` {Buffer|TypedArray|DataView} A `Buffer`, or `TypedArray`, or
+ `DataView` containing the bytes to decode.
* Returns: {string}
Returns any remaining input stored in the internal buffer as a string. Bytes
@@ -79,10 +80,11 @@ changes:
character instead of one for each individual byte.
-->
-* `buffer` {Buffer} A `Buffer` containing the bytes to decode.
+* `buffer` {Buffer|TypedArray|DataView} A `Buffer`, or `TypedArray`, or
+ `DataView` containing the bytes to decode.
* Returns: {string}
Returns a decoded string, ensuring that any incomplete multibyte characters at
-the end of the `Buffer` are omitted from the returned string and stored in an
-internal buffer for the next call to `stringDecoder.write()` or
-`stringDecoder.end()`.
+ the end of the `Buffer`, or `TypedArray`, or `DataView` are omitted from the
+ returned string and stored in an internal buffer for the next call to
+ `stringDecoder.write()` or `stringDecoder.end()`.