*Summary*: In Bug 1795816 I intend to ship Array.fromAsync as part of
Firefox Nightly 115 and let it ride the trains to release.
As a reminder, `Array.fromAsync` is a TC39 proposal [1] at Stage 3 of the
TC39 standardization process [2]. It is the async sibling to `Array.from`,
adapted to handle async iterators and promise-returning functions.
It allows the construction of an array of results from an async iterator,
returning a promise for this array. Thus,
```
array = []
for await (x of asyncIter) {
array.push(await x);
}
```
can be simplified to `array = await Array.asyncFrom(asyncIter)`.
We expect some editorial changes to the specification, but no user visible
changes.
Meta Bug: [
https://bugzilla.mozilla.org/show_bug.cgi?id=1746209](https://bugzilla.mozilla.org/show_bug.cgi?id=1746209)
Specification: [
https://tc39.es/proposal-array-from-async/](https://tc39.es/proposal-array-from-async/)
Platform Coverage: All
Documentation:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fromAsync
Other Browsers: Safari Technical Preview has shipped; Chrome has a flagged
implementation.
Testing: Tested through our tests as well as the ECMAScript standard test
suite test262.
--
You received this message because you are subscribed to the Google Groups
"[email protected]" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/CAK1KXSYHNDPRAoRPM4FEt1gWkEFZvrNZ9SiJaiD23JwjAwRDRA%40mail.gmail.com.