1
0
Fork 0

convert M to 1000000

This commit is contained in:
Andrew Tomaka 2016-05-17 16:16:37 -04:00
parent c8c5f3d60c
commit 6f682aadaf
1 changed files with 5 additions and 1 deletions

View File

@ -350,7 +350,11 @@ function haveTrillions(number) {
}
function convertToNumber(string) {
return Number(string.replace(/[^0-9\.]+/g, ''));
if(string.indexOf('M') > -1) {
return Number(string.replace(/[^0-9\.]+/g, '')) * 1000000;
} else {
return Number(string.replace(/[^0-9\.]+/g, ''));
}
}
function trillions(number) {