Get the name of a number, even if it's stupidly big.
Du kan inte välja fler än 25 ämnen
Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
Den här utvecklingskatalogen är arkiverad. Du kan se filer och klona katalogen, men inte öppna ärenden eller genomföra push- eller pull-förfrågningar.
|
- import { Digit } from '../../../common'
- import NAMES from '../names'
-
- interface HundredTimes {
- (x100: Digit): 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
|