Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0a0d052

Browse files
authored
Merge pull request #47 from msgpack/releng-1.3.0
releng for v1.3.0
2 parents 8d59417 + 20ed989 commit 0a0d052

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

‎CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
This is the revision history of @msgpack/msgpack
22

3+
## v1.3.0 2019年05月29日
4+
5+
https://github.com/msgpack/msgpack-javascript/compare/v1.2.3...v1.3.0
6+
7+
* Add `decodeArrayStream()` to decode an array and returns `AsyncIterable<unknown>` [#42](https://github.com/msgpack/msgpack-javascript/pull/42)
8+
* Add `decodeStream()` to decode an unlimited data stream [#46](https://github.com/msgpack/msgpack-javascript/pull/46)
9+
* Let `decodeAsync()` and `decodeArrayStream()` to take `ReadalbeStream<Uint8Array | ArrayLike<number>>` (whatwg-streams) [#43](https://github.com/msgpack/msgpack-javascript/pull/46)
10+
311
## v1.2.3 2019年05月29日
412

513
https://github.com/msgpack/msgpack-javascript/compare/v1.2.2...v1.2.3

‎README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,24 @@ maxExtLength | number | `4_294_967_295` (UINT32_MAX)
6363

6464
You can use `max${Type}Length` to limit the length of each type decoded.
6565

66-
### `decodeAsync(stream: AsyncIterable<ArrayLike<number> | Uint8Array>, options?: DecodeAsyncOptions): Promise<unknown>`
66+
### `decodeAsync(stream: AsyncIterable<Uint8Array | ArrayLike<number>> | ReadableStream<Uint8Array | ArrayLike<number>>, options?: DecodeAsyncOptions): Promise<unknown>`
6767

6868
It decodes `stream` in an async iterable of byte arrays and returns decoded data as `uknown` wrapped in `Promise`. This function works asyncronously.
6969

7070
Note that `decodeAsync()` acceps the same options as `decode()`.
7171

72+
### `decodeArrayStream(stream: AsyncIterable<Uint8Array | ArrayLike<number>> | ReadableStream<Uint8Array | ArrayLike<number>>, options?: DecodeAsyncOptions): AsyncIterable<unknown>`
73+
74+
It is alike to `decodeAsync()`, but only accepts an array of items as the input `stream`, and emits the decoded item one by one.
75+
76+
It throws errors when the input is not an array.
77+
78+
### `decodeStream(stream: AsyncIterable<Uint8Array | ArrayLike<number>> | ReadableStream<Uint8Array | ArrayLike<number>>, options?: DecodeAsyncOptions): AsyncIterable<unknown>`
79+
80+
It is like to `decodeAsync()` and `decodeArrayStream()`, but the input `stream` consists of independent MessagePack items.
81+
82+
In other words, it decodes an unlimited stream and emits an item one by one.
83+
7284
### Extension Types
7385

7486
To handle [MessagePack Extension Types](https://github.com/msgpack/msgpack/blob/master/spec.md#extension-types), this library provides `ExtensionCodec` class.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /