Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const pluralIdResult: string = i18n.plural('pluralId', {
value: count,
0: 'no books',
one: '# book',
other: '# books'
});
const selectOrdinalResult: string = i18n.selectOrdinal({
value: count,
0: 'Zeroth book',
one: '#st book',
two: '#nd book',
few: '#rd book',
other: '#th book'
});
const selectOrdinalIdResult: string = i18n.selectOrdinal('selectOrdinalId', {
value: count,
0: 'Zeroth book',
one: '#st book',
two: '#nd book',
few: '#rd book',
other: '#th book'
});
const gender = 'female';
const numOfGuests = 2;
const host = 'Amy';
const guest = 'Bob';
const selectResult = i18n.select({
value: gender,
female: i18n.plural({
value: numOfGuests,
const count = 42;
const pluralResult: string = i18n.plural({
value: count,
0: 'no books',
one: '# book',
other: '# books'
});
const pluralIdResult: string = i18n.plural('pluralId', {
value: count,
0: 'no books',
one: '# book',
other: '# books'
});
const selectOrdinalResult: string = i18n.selectOrdinal({
value: count,
0: 'Zeroth book',
one: '#st book',
two: '#nd book',
few: '#rd book',
other: '#th book'
});
const selectOrdinalIdResult: string = i18n.selectOrdinal('selectOrdinalId', {
value: count,
0: 'Zeroth book',
one: '#st book',
two: '#nd book',
few: '#rd book',
other: '#th book'
});