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

Commit 37790e9

Browse files
realitykingcaitp
authored andcommitted
refactor(Angular) use Object.keys instead of manually constructing array
Shrink dat coed ;u Closes #9704
1 parent 531a8de commit 37790e9

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

Diff for: src/Angular.js

+1-7
Original file line numberDiff line numberDiff line change
@@ -272,13 +272,7 @@ function forEach(obj, iterator, context) {
272272
}
273273

274274
function sortedKeys(obj) {
275-
var keys = [];
276-
for (var key in obj) {
277-
if (obj.hasOwnProperty(key)) {
278-
keys.push(key);
279-
}
280-
}
281-
return keys.sort();
275+
return Object.keys(obj).sort();
282276
}
283277

284278
function forEachSorted(obj, iterator, context) {

0 commit comments

Comments
 (0)