-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Implementing Object.values and Object.entries #41
Conversation
Hi @akroshg, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
TTYL, MSBOT; |
@abchatra - could you reviews this? thanks, |
Assert(propertyId != Constants::NoProperty); | ||
|
||
Var value = JavascriptOperators::GetProperty(object, propertyId, scriptContext); | ||
if (!valuesToReturn) |
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.
i don't see anywhere you're checking enumerability in the loop (in either function) - if, during iteration, an unvisited property is deleted or made non-enumerable, it should be skipped. See tc39/test262#453 for the test262 tests.
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.
Having properties deleted and their attributes changed during enumeration would be an excellent unit test to add.
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.
@dotnet-bot test this please |
How's this one coming? |
@ljharb Akrosh is out of office and will be back next week to complete this PR. |
I am creating new PR for this one (as my fork was created on the private branch). please see #171. |
Migrated to #171 |
These ES7 features are implemented as per the ES7 proposal https://github.com/tc39/proposal-object-values-entries/blob/master/spec.md.
The implementation is predominantly based on the result of the Object.keys.
unittest is added for more information about the usage.