Get the name of a number, even if it's stupidly big.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
Repozitorijs ir arhivēts. Tam var aplūkot failus un to var klonēt, bet nevar iesūtīt jaunas izmaiņas, kā arī atvērt jaunas problēmas/izmaiņu pieprasījumus.

17 rindas
416 B

  1. import { GetKiloCount } from '../../NumberSystem'
  2. import constructTens from './construct/tens'
  3. import hundredTimes from './base/hundredTimes'
  4. const getKiloCount: GetKiloCount = (x100, x10, x1) => {
  5. if (x100 < 1) {
  6. return constructTens(x10, x1)
  7. }
  8. if (x10 === 0 && x1 === 0) {
  9. return hundredTimes(x100)
  10. }
  11. return [hundredTimes(x100), constructTens(x10, x1)].join(' ')
  12. }
  13. export default getKiloCount