Get the name of a number, even if it's stupidly big.
Nie możesz wybrać więcej, niż 25 tematów
Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
To repozytorium jest zarchiwizowane. Możesz wyświetlać pliki i je sklonować, ale nie możesz do niego przepychać zmian lub otwierać zgłoszeń/Pull Requestów.
|
- import NAMES from '../names.json'
-
- interface HundredTimes {
- (x100: number): string
- }
-
- /**
- * Get the name of some number in the hundreds place.
- * @param {number} x100 - The number in the hundreds place.
- * @returns {string} The name of the number in the hundreds place.
- */
- const hundredTimes: HundredTimes = (x100) =>
- x100 === 0 ? NAMES.units[0] : [NAMES.units[x100], NAMES.hundred].join(' ')
-
- export default hundredTimes
|