@yar.ua/numerals
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

Ukrainian Numbers Spellout

This library allows to convert the numbers into numerals

Supported Features

  • [x] Number spellout – converting numbers into text (numerals)
  • [x] Numeral inflection - modifying grammatical form of numerals to match required grammatical characteristics
  • [x] Agreement - setting grammatical forms of compound numerals to produce grammatically and syntactically correct text
  • [x] Stress
  • [x] Cardinal numbers in range [0...1×1027)1, 2
  • [x] Ordinal numbers in range [0...1×1027)1
  • [x] Fractional numbers with whole, each element in range [0...1×1027)
  • [x] Decimal numbers in range (0...1×1027) with precision up to 1×10-27 3

1 Numbers outside of the range will be spelled out digit-wise and inflected only last digit

2 1×1027 is 1 000 000 000 000 000 000 000 000 000

3 1×10-27 is 0.000 000 000 000 000 000 000 000 001

Future Features

  • [ ] Negative numbers
  • [ ] Contracted ordinal numbers (e.g. "1-й", "1000-на")
  • [ ] Scientific notation of exponential numbers (e.g. "1e5")

Supported Grammatical Attributes

  • cases: nominative, genitive, dative, accusative, instrumental, locative, vocative
  • gender: masculine, feminine, neuter
  • number: singular, plural
  • animacy: inanimate, animate

/@yar.ua/numerals/

    Package Sidebar

    Install

    npm i @yar.ua/numerals

    Homepage

    yar.org.ua

    Weekly Downloads

    0

    Version

    1.0.6

    License

    MIT-0

    Unpacked Size

    234 kB

    Total Files

    41

    Last publish

    Collaborators

    • team-yar
    • teivaz