Skip to content

Releases: brianfunk/numberstring

v1.0.1 - 13 New Languages

08 Feb 14:31

Choose a tag to compare

What's New

13 New Languages (22 total!)

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)

Full Scandinavian coverage: Danish, Swedish, Norwegian, Finnish, Icelandic

All new languages support BigInt up to 10^36.

Fixes

  • Italian: handle cento elision before otto/ottanta (e.g. 108 → "centotto", not "centootto")

Stats

  • 266 tests
  • 22 languages supported

Full Changelog: v1.0.0...v1.0.1

v1.0.0

01 Feb 06:08

Choose a tag to compare

Breaking Changes

  • Node.js 18+ required - Dropped support for older Node.js versions
  • ESM only - Package now uses ES modules (import/export). Use import numberstring from 'numberstring' instead of require('numberstring')
  • Quadrillion bug fix - Numbers ≥10^15 now correctly output "quadrillion" instead of skipping directly to "quintillion"

New Features

8 Language Support

  • English, Spanish, French, German, Danish, Chinese, Hindi, Russian
  • Modular language files in languages/ folder for easy community contributions
  • toWords(n, { lang: 'es' }) for multi-language conversion

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 numbers
  • fraction(num, denom) - Convert fractions (1/2 → "one half")
  • year(y) - Year formatting (1984 → "nineteen eighty-four")
  • telephone(phone) - Phone numbers to words
  • percent(pct) - Percentages to words

BigInt Support

  • Handle numbers up to decillions (10^36)!

Other Changes

  • Complete ES2022+ rewrite (const/let, arrow functions, template literals)
  • Migrated from Mocha/Chai to Vitest (174 tests)
  • GitHub Actions CI (replaces Travis CI)
  • ESLint 9 with flat config
  • Full JSDoc documentation

Beta Release v0.2.0

24 Sep 23:47

Choose a tag to compare

Includes options for capitalization and punctuation

Initial Beta Release v0.1.0

18 Sep 03:01

Choose a tag to compare

Merge pull request #2 from brianfunk/dev

initial beta release