Skip to content

Commit 1d6d21c

Browse files
committed
doc
1 parent 0e45d26 commit 1d6d21c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ npm install @msgpack/msgpack
4444

4545
### `encode(data: unknown, options?: EncodeOptions): Uint8Array`
4646

47-
It encodes `data` and returns a byte array as `Uint8Array`.
47+
It encodes `data` and returns a byte array as `Uint8Array`, throwing errors if `data` is, or includes, a non-serializable object such as `function` or a `symbol`.
4848

4949
#### EncodeOptions
5050

@@ -99,11 +99,11 @@ if (contentType && contentType.startsWith(MSGPACK_TYPE) && response.body != null
9999

100100
It is alike to `decodeAsync()`, but only accepts an array of items as the input `stream`, and emits the decoded item one by one.
101101

102-
It throws errors when the input is not an array.
102+
It throws errors when the input is not an array-family.
103103

104104
### `decodeStream(stream: AsyncIterable<ArrayLike<number>> | ReadableStream<ArrayLike<number>>, options?: DecodeAsyncOptions): AsyncIterable<unknown>`
105105

106-
It is like to `decodeAsync()` and `decodeArrayStream()`, but the input `stream` consists of independent MessagePack items.
106+
It is alike to `decodeAsync()` and `decodeArrayStream()`, but the input `stream` consists of independent MessagePack items.
107107

108108
In other words, it decodes an unlimited stream and emits an item one by one.
109109

0 commit comments

Comments
 (0)