turn getCommandsThatCount into a map

This commit is contained in:
Siddharth Agarwal 2013-07-31 01:06:35 -07:00
parent 54414925fa
commit 9821df3bb7
3 changed files with 21 additions and 18 deletions

View file

@ -62,12 +62,12 @@ var commands = {
* which commands count for the git golf game
*/
getCommandsThatCount: function() {
var counted = [];
this.loop(function(config, name) {
var counted = {'git': {}};
this.loop(function(config, name, vcs) {
if (config.dontCountForGolf) {
return;
}
counted.push(name);
counted[vcs][name] = config.regex;
});
return counted;
},