UNPKG

numbro

Version:

Format and manipulate numbers.

60 lines (58 loc) 1.44 kB
/*! * numbro.js language configuration * language : Spanish * locale: Puerto Rico * author : Gwyn Judd : https://github.com/gwynjudd */ module.exports = { languageTag: "es-PR", delimiters: { thousands: ",", decimal: "." }, abbreviations: { thousand: "k", million: "mm", billion: "b", trillion: "t" }, ordinal: (number) => { let b = number % 10; return (b === 1 || b === 3) ? "er" : (b === 2) ? "do" : (b === 7 || b === 0) ? "mo" : (b === 8) ? "vo" : (b === 9) ? "no" : "to"; }, currency: { symbol: "$", position: "prefix", code: "USD" }, currencyFormat: { thousandSeparated: true, totalLength: 4, spaceSeparated: true, spaceSeparatedCurrency: 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 } } };