Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .browserslistrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
# "defaults" = > 0.5% usage, last 2 versions, Firefox ESR, not dead
# Filtering by "supports bigint" excludes KaiOS 2.5 and Opera Mini (can't run BigInt)
#
# This query targets ~87% of global users (all in-use browsers with BigInt support).
# This query targets all in-use browsers with BigInt support. Run
# `npx browserslist --coverage` to see the current global-coverage percentage.
# See: https://github.com/browserslist/browserslist#queries

# Target all in-use browsers that can run BigInt (non-polyfillable)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

- **Pure Functions** — Each language exports standalone functions. No classes, no configuration, no side effects.
- **Tree-Shakeable** — Import only what you need. Unused exports are eliminated by modern bundlers.
- **Tiny Bundles** — ~2.4 KB gzipped per language (with all forms). No bloat.
- **Tiny Bundles** — ~2 KB gzipped per language (with all forms). No bloat.
- **Multiple Forms** — Cardinal ("forty-two"), ordinal ("forty-second"), and currency ("forty-two dollars")
- **70+ Languages** — European, Asian, Middle Eastern, African, and regional variants
- **Zero Dependencies** — Works everywhere: Node.js, browsers, Deno, Bun
Expand Down Expand Up @@ -93,7 +93,7 @@ Highlights: Arabic, Chinese (Simplified/Traditional), English, French, German, H
## Compatibility

- **Node.js**: 22+
- **Browsers**: Chrome 67+, Firefox 68+, Safari 14+, Edge 79+ (~87% global coverage)
- **Browsers**: Chrome 67+, Firefox 68+, Safari 14+, Edge 79+ — any browser with BigInt support
- **Runtimes**: Deno, Bun, Cloudflare Workers

Requires BigInt support (cannot be polyfilled).
Expand All @@ -102,7 +102,7 @@ Requires BigInt support (cannot be polyfilled).

n2words is optimized for both size and speed:

- ~2.4 KB gzipped per language (includes all forms)
- ~2 KB gzipped per language (includes all forms)
- Individual language imports enable tree-shaking
- No runtime dependencies
- BigInt modulo operations (no string manipulation)
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const currencyLanguages = getCurrencyLanguages()
* 1. Source (src/): Modern ES2022+ code with BigInt, optional chaining
* 2. Babel: Transpiles ES2022+ features down while preserving BigInt support
* 3. Terser: Minifies using ES2020 syntax (safe for BigInt-supporting browsers)
* 4. Target: ~85.9% global coverage via .browserslistrc ("defaults and supports bigint")
* 4. Target: in-use browsers with BigInt support, via .browserslistrc ("defaults and supports bigint")
*
* Generates:
* - Individual ESM bundles (dist/{langCode}.js): One per language, for browsers
Expand Down