Last active
July 24, 2018 03:45
-
-
Save luislobo14rap/e047e2a8e5a59000221c8044c701ac4d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// excelMoneyFormat.js v1.0.1 | |
function excelMoneyFormat(number, prefix = '', suffix = '', toFixedNumber = 2) { | |
return prefix + number.toFixed(toFixedNumber).replace('.', ',') + suffix; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// excelMoneyFormat.min.js v1.0.1 | |
function excelMoneyFormat(a,b='',c='',d=2){return b+a.toFixed(d).replace('.',',')+c} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment