convert M to 1000000
This commit is contained in:
parent
c8c5f3d60c
commit
6f682aadaf
1 changed files with 5 additions and 1 deletions
|
@ -350,7 +350,11 @@ function haveTrillions(number) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function convertToNumber(string) {
|
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) {
|
function trillions(number) {
|
||||||
|
|
Loading…
Reference in a new issue