-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Implementing Object.values and Object.entries #171
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
Conversation
Hi @akroshg, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
TTYL, MSBOT; |
LGTM from a compliance angle :-) |
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.
Assume we have a non-enumerable property when this call is made. Between here and the IsEnumerable
call on line 1134, it looks like it's possible to make the property enumerable. Wouldn't it be excluded from the result?
I see that we have tests for the opposite direction (i.e., enumerable -> non-enumerable), but we're missing this case.
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.
Good catch - the spec says that the list of existing own keys is fixed at the initial call, but that means a preexisting own key's enumerability can change in either direction during enumeration.
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.
@goyakin, I'll get back to you on this. It is good test case to add.
@goyakin Yes there was issue in making non-enumerable to enumerable while iteration. I have fixed that and added the test cases. |
Merge pull request #171 from akroshg:values 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.
( ゚◡゚)/ |
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.