simplified the sort function
Thomas Aylott committed
Nov 18, 2013 at 16:03 UTC
5ae152cdcf301738b837bfa09cabd1473b95b72f
1 file changed
+2
-7
grunt/tasks/coverage-parse.js
+2
-7
@@ -15,14 +15,9 @@ module.exports = function(){
15
16
Object.keys(results)
17
.sort(function(a, b){
18
- if (results[a].length > results[b].length) {
19
- return -1;
20
- }
21
- if (results[a].length < results[b].length) {
22
- return 1;
23
- }
24
- return 0;
18
+ return results[a].length - results[b].length;
19
})
20
+ .reverse()
21
.forEach(function(path){
22
if (results[path].length === 0) {
23
return;