Kevin Gibbons
Kevin Gibbons
> just figured if this could be part of something like [iterator helpers](https://github.com/alkihis/iterator-helper) As mentioned above, iterator helpers have a `.toArray` method, and async iterator helpers will have the same....
Can I suggest instead having a `.bytes()` method which gives you a Uint8Array? See https://github.com/w3ctag/design-principles/issues/463, https://github.com/whatwg/fetch/issues/1724#issuecomment-1814626681, etc. My [proposal for base64 support in JS](https://github.com/tc39/proposal-arraybuffer-base64) also operates on Uint8Arrays.
I would guess that something like `Uint8Array.fromAsync` would be unlikely to be optimized well: that is, it would probably end actually allocating and reifying each chunk of bytes as a...
> As a sidenote, are there plans for `BodyMixin` / `Response` / `Request` & `Blob` to get a `bytes()`? I have https://github.com/whatwg/fetch/issues/1732 but there's no expressed implementer interest yet.
In example 2, if `C[@@asyncDispose]()` completes normally and so is `await`'d, I wouldn't expect another `await` to be necessary for `B`. We've already done an `await`, and we haven't done...
I originally wrote it this way because it's more consistent with a general philosophy of "validate the input, then process it", but it does seem wasteful to require a second...
PR: https://github.com/tc39/proposal-arraybuffer-base64/pull/58
Upstream issue: https://github.com/mlc-ai/web-llm/issues/282
That example "uploads" the model to IndexDB, which means it creates a copy of the whole thing on disk instead of merely reading it into memory. For large models that's...
WFM, thanks for the feedback. I'll get that pushed up later today. Any opinions on `isSubsetOf` and friends? If not I'll default to making them generic, following point 2, even...