Replace the hand-rolled English-only converter with the actively
maintained `to-words` package (v5.6.1), which supports 132 locales.
Changes per maintainer feedback (iib0011):
- Import `toWords` from `to-words` instead of custom conversion logic
- Auto-detect locale from localStorage (same pattern as crontab-guru)
- Map omni-tools' 10 supported languages to to-words locale codes
- Output now matches the user's selected UI language automatically
- Renamed `includeAnd` option to `useAnd` to match to-words API
- Updated all 20 tests to match to-words output format
- Updated i18n keys and example cards
Co-authored-by: rebelroot <262209644+rebelroot@users.noreply.github.com>
Normalize edge-case decimal inputs so '.25' is read as 'zero point two
five' and '5.' as 'five'. A lone '.' is still rejected. Adds 3 tests.
Co-authored-by: rebelroot <262209644+rebelroot@users.noreply.github.com>
Add a new number tool that converts numbers into their English word
representation. Supports integers up to trillions, decimal fractions
(read digit-by-digit after 'point'), and negative values.
Options:
- Uppercase output (cheque/legal document style)
- Include 'and' between hundreds and tens (e.g. 'one hundred and twenty')
Processes one number per line, preserving line structure. Includes 17
unit tests covering edge cases (zero, teens, hyphenated tens, zero
groups within large numbers, trailing fractional zeros, non-numeric
input, empty lines).
Co-authored-by: rebelroot <262209644+rebelroot@users.noreply.github.com>
Unique generation validated capacity with the integer formula max-min+1
even for decimals, and built the decimal pool by adding min..max inclusive
each with 0.00-0.99, so valid decimal counts were rejected while drawn
values could exceed the inclusive maximum. Both the capacity check and the
pool now share one bounded hundredths domain over [min, max].