Get the name of a number, even if it's stupidly big.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

11 line
249 B

  1. import NAMES from '../../names.json'
  2. interface Ones {
  3. (kiloOnes: number, special: boolean): string
  4. }
  5. const ones: Ones = (kiloOnes, special = false) =>
  6. special ? NAMES.kiloSpecialUnits[kiloOnes] : NAMES.kiloUnits[kiloOnes]
  7. export default ones