sushi
sushi copied to clipboard
Add KWD to the list of currencies
Hey @j2p9 , this project uses numbro internally...
If you can add the currency on numbro that would be better. https://github.com/BenjaminVanRyseghem/numbro/tree/develop/languages
but i can also add the language config within the project if you send me config. here's a reference for the config json.
{
languageTag: 'fil-PH',
delimiters: {
thousands: ',',
decimal: '.',
},
abbreviations: {
thousand: 'k',
million: 'm',
billion: 'b',
trillion: 't',
},
ordinal: (number) => {
let b = number % 10;
// eslint-disable-next-line no-bitwise
return ~~((number % 100) / 10) === 1
? 'th'
: b === 1
? 'st'
: b === 2
? 'nd'
: b === 3
? 'rd'
: 'th';
},
currency: {
position: 'prefix',
symbol: '₱',
code: 'PHP',
},
currencyFormat: {
thousandSeparated: true,
totalLength: 4,
spaceSeparated: true,
spaceSeparatedCurrency: true,
average: true,
},
formats: {
fourDigits: {
totalLength: 4,
spaceSeparated: true,
average: true,
},
fullWithTwoDecimals: {
thousandSeparated: true,
mantissa: 2,
},
fullWithTwoDecimalsNoCurrency: {
mantissa: 2,
thousandSeparated: true,
},
fullWithNoDecimals: {
output: 'currency',
thousandSeparated: true,
mantissa: 0,
},
},
}
Closing this for now, will wait for updates on numbro core lib.