From f5c97439f4761c94293dff0bf7798f7559086b61 Mon Sep 17 00:00:00 2001 From: Tyler Vigario Date: Thu, 7 May 2026 20:23:48 -0700 Subject: [PATCH 1/2] docs(core): refresh stale figures in README The "~2.4 KB gzipped" claim and "~87% global coverage" figure both drifted out of sync with reality: - Average gzipped per-language ESM bundle is now ~2.2 KB across the 72 languages (range 1.7-2.9 KB). - caniuse data for `defaults and supports bigint` is now ~85.5%, no longer ~87%. Replace both with rough phrasing ("~2 KB", "any browser with BigInt support") so future caniuse drift doesn't restale the docs. Co-Authored-By: Claude Opus 4.7 (1M context) --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 42ff24bb..592e0954 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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). @@ -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) From 1648bab42491cbe64e4aa620bdbf12d0b0bc1766 Mon Sep 17 00:00:00 2001 From: Tyler Vigario Date: Thu, 7 May 2026 20:34:30 -0700 Subject: [PATCH 2/2] docs(core): drop precise coverage figures from comments too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Same drift fix as the README change: .browserslistrc cited "~87%" and rollup.config.js cited "~85.9%" — both stale, and they didn't even agree with each other. Replace both with prose that points readers to `npx browserslist --coverage` if they want the current number. Co-Authored-By: Claude Opus 4.7 (1M context) --- .browserslistrc | 3 ++- rollup.config.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.browserslistrc b/.browserslistrc index 396b862f..eb715052 100644 --- a/.browserslistrc +++ b/.browserslistrc @@ -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) diff --git a/rollup.config.js b/rollup.config.js index 9b3ad703..94077371 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -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