numbro
Version:
Format and manipulate numbers.
58 lines (56 loc) • 1.27 kB
JavaScript
/*!
* numbro.js language configuration
* language : Portuguese
* locale : Brazil
* author : Ramiro letandas Jr : https://github.com/ramirovjr
*/
module.exports = {
languageTag: "pt-BR",
delimiters: {
thousands: ".",
decimal: ","
},
abbreviations: {
thousand: "mil",
million: "milhões",
billion: "b",
trillion: "t"
},
ordinal: function() {
return "º";
},
currency: {
symbol: "R$",
position: "prefix",
code: "BRL"
},
currencyFormat: {
thousandSeparated: true,
totalLength: 4,
spaceSeparated: true,
average: true
},
formats: {
fourDigits: {
totalLength: 4,
spaceSeparated: true,
average: true
},
fullWithTwoDecimals: {
output: "currency",
mantissa: 2,
spaceSeparated: true,
thousandSeparated: true
},
fullWithTwoDecimalsNoCurrency: {
mantissa: 2,
thousandSeparated: true
},
fullWithNoDecimals: {
output: "currency",
spaceSeparated: true,
thousandSeparated: true,
mantissa: 0
}
}
};