Get the name of a number, even if it's stupidly big.
選択できるのは25トピックまでです。
トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
このリポジトリはアーカイブされています。 ファイルの閲覧とクローンは可能ですが、プッシュや、課題・プルリクエストのオープンはできません。
|
- 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) =>
- Number(x100) === 0 ? NAMES.units[0] : [NAMES.units[x100], NAMES.hundred].join('')
-
- export default hundredTimes
|