Skip to content
This repository has been archived by the owner on Jul 30, 2019. It is now read-only.

Commit

Permalink
Merge pull request #459 from 18F/winners-page-tests
Browse files Browse the repository at this point in the history
Winners page tests
  • Loading branch information
jessieay committed Apr 29, 2016
2 parents 3b7033d + eda5c0c commit d6659e6
Show file tree
Hide file tree
Showing 11 changed files with 770 additions and 252 deletions.
10 changes: 7 additions & 3 deletions app/assets/javascripts/utility.js
Expand Up @@ -55,14 +55,18 @@
};

microp.format.removeGitPrefix = function(str) {
return str.split('https://github.com/').join('');
return str.includes('https')
? str.split("https://github.com/").join("")
: str;
};

microp.format.transformDollars = function(str) {
str = String(str);
if (str.charAt(0) === '-') {
str = '-' + str.substr(1);
return '-$' + str.substr(1, str.length);
} else {
return '$' + str;
}
return '$' + str;
};

microp.format.commaSeparatedDollars = microp.format.transform(
Expand Down

0 comments on commit d6659e6

Please sign in to comment.