Content-Length: 208144 | pFad | http://github.com/tc39/proposal-record-tuple/issues/385

73 Tuple.fromAsync? · Issue #385 · tc39/proposal-record-tuple · GitHub
Skip to content
This repository was archived by the owner on Apr 15, 2025. It is now read-only.

Tuple.fromAsync? #385

Open
js-choi opened this issue Dec 2, 2023 · 0 comments
Open

Tuple.fromAsync? #385

js-choi opened this issue Dec 2, 2023 · 0 comments

Comments

@js-choi
Copy link

js-choi commented Dec 2, 2023

This proposal’s spec defines a Tuple.from method akin to Array.from. #250 (see #369) also added support for proposal-iterator-helpers’s Iterator.from and proposal-async-iterator-helpers’s AsyncIterator.from. proposal-iterator-helpers is at Stage 3 and proposal-async-iterator-helpers is at Stage 2.

proposal-array-from-async is also at Stage 3 (conditional on editor review). Its Array.fromAsync is meant to coexist with AsyncIterator.from like how Array.from coexists with Iterator.from.

Should this proposal add a parallel Tuple.fromAsync?

let tup = #[];
for await (const v of asyncIter) {
  tup = #[ ...tup, v ];
}
let tup = await Tuple.fromAsync(asyncIter);
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/tc39/proposal-record-tuple/issues/385

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy