How to use the numbro.setCulture function in numbro

To help you get started, we’ve selected a few numbro examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DeviaVir / zenbot / 3x / utils / format_currency.js View on Github external
module.exports = function (val, currency) {
  var culture = n.culture()
  var ret
  switch (currency) {
    case 'USD': n.setCulture('en-US'); break;
    case 'EUR': n.setCulture('fr-FR'); break;
    case 'CNY': n.setCulture('zh-CN'); break;
    case 'BTC': return n(val).format('0.00000000')
    default: return n(val).format('0.000');
  }
  ret = n(val).formatCurrency('$,0.00')
  n.setCulture(culture)
  return ret
}
github DeviaVir / zenbot / 3x / utils / format_currency.js View on Github external
module.exports = function (val, currency) {
  var culture = n.culture()
  var ret
  switch (currency) {
    case 'USD': n.setCulture('en-US'); break;
    case 'EUR': n.setCulture('fr-FR'); break;
    case 'CNY': n.setCulture('zh-CN'); break;
    case 'BTC': return n(val).format('0.00000000')
    default: return n(val).format('0.000');
  }
  ret = n(val).formatCurrency('$,0.00')
  n.setCulture(culture)
  return ret
}
github DeviaVir / zenbot / 3x / utils / format_currency.js View on Github external
module.exports = function (val, currency) {
  var culture = n.culture()
  var ret
  switch (currency) {
    case 'USD': n.setCulture('en-US'); break;
    case 'EUR': n.setCulture('fr-FR'); break;
    case 'CNY': n.setCulture('zh-CN'); break;
    case 'BTC': return n(val).format('0.00000000')
    default: return n(val).format('0.000');
  }
  ret = n(val).formatCurrency('$,0.00')
  n.setCulture(culture)
  return ret
}
github DeviaVir / zenbot / 3x / utils / format_currency.js View on Github external
module.exports = function (val, currency) {
  var culture = n.culture()
  var ret
  switch (currency) {
    case 'USD': n.setCulture('en-US'); break;
    case 'EUR': n.setCulture('fr-FR'); break;
    case 'CNY': n.setCulture('zh-CN'); break;
    case 'BTC': return n(val).format('0.00000000')
    default: return n(val).format('0.000');
  }
  ret = n(val).formatCurrency('$,0.00')
  n.setCulture(culture)
  return ret
}