Skip to content

Commit b6cf31d

Browse files
committed
polyfill: Update readme, remove obsolete limitations section
1 parent 5236b32 commit b6cf31d

File tree

4 files changed

+5
-17
lines changed

4 files changed

+5
-17
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"name": "proposal-array-from-async",
4-
"version": "1.0.4",
4+
"version": "1.0.5",
55
"description": "A TC39 proposal and specification for an Array.fromAsync method.",
66
"author": "J. S. Choi <[email protected]> (https://jschoi.org/)",
77
"license": "MIT",

polyfill/README.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,3 @@ Like `Array.from`, `Array.fromAsync` is a **generic factory method**.
6363
It does not require that its `this` value be the `Array` constructor,
6464
and it can be transferred to or inherited by any other constructors
6565
that may be called with a single numeric argument.
66-
67-
## Polyfill limitations
68-
The polyfill cannot exactly match the spec in one way.
69-
If it is attached to a **non-constructor function**
70-
(i.e., arrow functions or `class` methods),
71-
then `fromAsync` will incorrectly throw a TypeError,
72-
rather than correctly creating an array.
73-
74-
This is because there is [no current way
75-
to test whether a function is not a constructor][no isConstructor].
76-
77-
[no isConstructor]: https://stackoverflow.com/a/40922715

polyfill/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "array-from-async",
3-
"version": "1.0.4",
3+
"version": "1.0.5",
44
"description": "A polyfill for Array.fromAsync, which dumps an async iterator into an array.",
55
"type": "module",
66
"main": "index.mjs",

0 commit comments

Comments
 (0)