All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- 13 New Languages - Japanese (
ja), Korean (ko), Arabic (ar), Italian (it), Dutch (nl), Turkish (tr), Polish (pl), Swedish (sv), Indonesian (id), Thai (th), Norwegian (no), Finnish (fi), Icelandic (is)- Total language support now at 22 languages
- Full Scandinavian coverage: Danish, Swedish, Norwegian, Finnish, Icelandic
- All new languages support BigInt up to 10^36
- 49 new tests for all new languages (265 total)
- Node.js 18+ required - Dropped support for older Node.js versions
- ESM only - Package now uses ES modules (
import/export). Useimport numberstring from 'numberstring'instead ofrequire('numberstring') - Quadrillion bug fix - Numbers ≥10^15 now correctly output "quadrillion" instead of skipping directly to "quintillion". This changes output for numbers in the quadrillion range.
- 9 Language Support - English, Spanish, French, German, Danish, Chinese, Hindi, Russian, Portuguese
- Modular language files in
languages/folder for easy community contributions toWords(n, { lang: 'es' })for multi-language conversion
- Modular language files in
- New Functions
ordinal(n)- Convert to ordinal words (first, second, twenty-first)decimal(n)- Convert decimals (3.14 → "three point one four")currency(amount)- Currency to words ($123.45 → "one hundred twenty-three dollars...")roman(n)- Convert to Roman numerals (42 → "XLII")parse(str)- Parse words back to numbers ("forty-two" → 42)negative(n)- Handle negative numbersfraction(num, denom)- Convert fractions (1/2 → "one half")year(y)- Year formatting (1984 → "nineteen eighty-four")telephone(phone)- Phone numbers to wordspercent(pct)- Percentages to words
- BigInt support - Handle numbers up to decillions (10^36)!
- Full JSDoc documentation with TypeScript-compatible types
- GitHub Actions CI (replaces Travis CI)
- Vitest test framework with 174 tests
- ESLint 9 with flat config
- PR and issue templates
- Added missing "quadrillion" to number scale (was skipping from trillion to quintillion)
punc()no longer crashes when passednullorundefined- Fixed
ordinal()function - now uses word replacement instead of broken string slicing
- Complete ES2022+ rewrite (const/let, arrow functions, template literals)
- Migrated from Mocha/Chai to Vitest
- Updated all development dependencies
- Travis CI configuration
- CodeClimate, Codacy, and BitHound integrations
- codecov.yml
- npm-shrinkwrap.json
- CommonJS support (
require())
- Initial public release