Skip to content

Commit

Permalink
Merge pull request #424 from KleeGroup/init-numeral
Browse files Browse the repository at this point in the history
Formatter number : changing from object to two strings
  • Loading branch information
Hartorn authored Nov 8, 2017
2 parents 90deb29 + fd84fdf commit b8b1f26
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/definition/formatter/number.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ function format(number, format) {
}

/**
* Initialize numeral locale and default format
* Initialize numeral locale and default format.
*
* @param {any} { format = DEFAULT_FORMAT, locale = 'fr' }
* @param {string} [format='0,0'] format to use
* @param {string} [locale='fr'] locale to use
*/
function init({ format = DEFAULT_FORMAT, locale = 'fr' }) {
function init(format = DEFAULT_FORMAT, locale = 'fr') {
numeral.locale(locale);
numeral.defaultFormat(format);
}
Expand Down

0 comments on commit b8b1f26

Please sign in to comment.