How do I get 1M instead of 1m using numeral.js?

Author Source
 import numeral from 'numeral'
        formatNumber (x) {
         return numeral(rawOnlineTotal).format('0a');
        }
formatNumber(10000000);  

expected output: 1M  
Actual Output: 1m

formatNumber(1000);
expected output: 1K Actual Output: 1k

javascriptnumeral.js

Answers

comments powered by Disqus