- From: Jake Archibald <notifications@github.com>
- Date: Tue, 18 Feb 2020 00:59:05 -0800
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 18 February 2020 08:59:17 UTC
Actually, thinking about it more:
```js
ReadableStream.from(uint8Array);
```
Seems a bit odd that this creates a stream of numbers. Maybe we should special-case buffer source types, which would create a readable byte stream. Or have an opt-in like @MattiasBuelens suggests.
```js
ReadableStream.from(uint8Array, { type: 'bytes' });
```
Or, since the option impacts both the accepted input and produced output:
```js
ReadableStream.fromBytes(uint8Array);
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/1018#issuecomment-587350179
Received on Tuesday, 18 February 2020 08:59:17 UTC