Created
October 2, 2020 13:07
-
-
Save bearkfear/b3a24e83aec9b0650de983d94ba811c7 to your computer and use it in GitHub Desktop.
This file contains 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
humanFormat: function(number) { | |
if (isNaN(number)) { | |
number = ""; | |
} else { | |
// number = Number(number).toLocaleString(this.options.locale, {maximumFractionDigits: 2, minimumFractionDigits: 2, style: 'currency', currency: 'BRL'}); | |
number = Number(number).toLocaleString(this.options.locale, { | |
maximumFractionDigits: this.options.precision, | |
minimumFractionDigits: this.options.precision, | |
}); | |
} | |
return number; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment