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
/** | |
* Separate a large number into commas | |
* @param {Number} num The number to split up | |
* @param {Object|String} opts Options, for now it's just joiner is the possible joiner, if you'd like to use dots instead of commas or something. | |
* @example | |
* commas(12345678) // returns 12,345,678 | |
* @example | |
* commas(211409200504011, {joiner:"."}) // returns 211.409.200.504.011 | |
*/ | |
function commas(num, opts) { |
NewerOlder