Gets the name of a number, even if it's stupidly big. Supersedes TheoryOfNekomata/number-name.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
TheoryOfNekomata fa9c981c07 Update documentation, types il y a 8 mois
packages Update documentation, types il y a 8 mois
.editorconfig Rewrite package il y a 8 mois
.gitignore Rewrite package il y a 8 mois
README.md Update documentation, types il y a 8 mois
TODO.md Update documentation, types il y a 8 mois
pnpm-lock.yaml Update packages il y a 8 mois
pnpm-workspace.yaml Rewrite package il y a 8 mois

README.md

numerica

Get the name of a number, even if it’s stupidly big.

References

Features

  • Stringify/parse numbers and names in American/British short count (e.g. “million”, “billion”, “trillion”), or European (e.g. “million”, “milliard”, “billion”, “billiard”, “trillion”, “trilliard”).
  • Support for exponential notation, even if in non-standard form (e.g. 123.45e+5).
  • Support for negative numbers.

See TODO.md for a list of features that are planned for implementation.

Limitations

  • Can only stringify and parse numbers and names that resolve to integer values.
  • Exponents x in values are limited to Number.MAX_SAFE_INTEGER >~ x >~ Number.MIN_SAFE_INTEGER. Values may exceed extremes such as Number.MAX_SAFE_INTEGER and Number.EPSILON in which loss of precision may occur.
  • No support for arbitrary number names such as “googol”.
  • No support for fractional number names such as “half”, “quarter”, “third”, “tenth”, etc.
  • Supports only native types (bigint, string, number).