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