-
-
Notifications
You must be signed in to change notification settings - Fork 419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Array.of #1116
Implement Array.of #1116
Conversation
Test262 conformance changes:
|
Codecov Report
@@ Coverage Diff @@
## master #1116 +/- ##
=======================================
Coverage 58.64% 58.64%
=======================================
Files 176 176
Lines 12523 12534 +11
=======================================
+ Hits 7344 7351 +7
- Misses 5179 5183 +4
Continue to review full report at Codecov.
|
Benchmark for 4442fb3Click to view benchmark
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Current implementation is not spec compliant, we should be able to use other constructors.
Try to follow the spec and add a comment before each step identifying it. (Some steps can be ignored, for example 6
isn't important, you should instead iterate with args.iter().enumerate()
).
If you need any help you can write here in the PR or talk in the Discord.
An ugly example that can be added as a test.
let a = Array.of.call(Date, "a", undefined, 3);
// check all of the following values
a instanceof Date // true
a[0] // "a"
a[1] // undefined
a[2] // 3
This Pull Request checks off part of #36.
It changes the following: