- From: Nidhi Jaju <notifications@github.com>
- Date: Tue, 27 Oct 2020 18:53:47 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 28 October 2020 01:53:59 UTC
@nidhijaju commented on this pull request.
> - .then(buffer => console.log("The first 1024 bytes:", buffer))
- .catch(e => console.error("Something went wrong!", e));
-
- function readInto(buffer, offset = 0) {
- if (offset === buffer.byteLength) {
- return Promise.resolve(buffer);
- }
+ const buffer = await readInto(startingAB);
+ console.log("The first 1024 bytes: ", buffer);
+
+ async function readInto(buffer) {
+ let offset = 0;
+ let view;
+ let done;
+
+ do {
That's a good point! I've just changed it to that in the last commit. Thank you!
--
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/pull/1080#discussion_r513132803
Received on Wednesday, 28 October 2020 01:53:59 UTC