Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

refactor(Angular) Use Object.keys instead of manually constructing an array. - #9704

Closed
realityking wants to merge 1 commit into
angular:masterfrom
realityking:keys
Closed

realityking wants to merge 1 commit into
angular:masterfrom
realityking:keys

Conversation

@realityking

Copy link
Copy Markdown
Contributor

No performance degradation: http://jsperf.com/get-all-keys-from-object

@caitp

caitp commented Oct 20, 2014

Copy link
Copy Markdown
Contributor

Object.keys has a specific sort order which is a bit different from the one used previously. So this results in a bit of a functional change, but I'm not sure if it would ball anybody

@realityking

Copy link
Copy Markdown
Contributor Author

Since the result is sorted using Array.prototype.sort before it's returned, that doesn't make a difference, does it?

@caitp

caitp commented Oct 20, 2014

Copy link
Copy Markdown
Contributor

Oh I thought you removed the sort. Reading code on a phone is hard :) should be ok then

@caitp caitp closed this in 37790e9 Oct 22, 2014
@realityking
realityking deleted the keys branch October 22, 2014 22:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants