convert M to 1000000

This commit is contained in:
Andrew Tomaka 2016-05-17 16:16:37 -04:00
parent c8c5f3d60c
commit 6f682aadaf

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) {