• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

forzagreen / n2words / 32524202169
99%

Build:
DEFAULT BRANCH: main
Ran 21 Aug 2026 08:34PM UTC
Jobs 1
Files 80
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 Aug 2026 08:33PM UTC coverage: 98.422%. Remained the same
32524202169

push

github

forzagreen
build(esm): emit one bundle per form so a CDN page pays for what it uses

A dist bundle is a prebuilt file fetched from a CDN, so whatever it contains
is what the page downloads — there is no bundler on the other end to prune
the forms it didn't ask for. dist/en-US.js carries all three, which is most
of its weight for a page that only spells prices.

Adds dist/{langCode}/{form}.js alongside it, built from a virtual entry that
re-exports the single form so Rollup drops the other two and everything only
they reach — the currency vocabulary for a cardinal bundle, the scale tables
for a currency one:

  dist/en-US.js            7,778 B   all three forms
  dist/en-US/cardinal.js   4,293 B   -45%
  dist/en-US/ordinal.js    3,815 B   -51%
  dist/en-US/currency.js   3,827 B   -51%

Only for forms a language actually exports, read from the module's real
exports via getExportedForms — a language without toOrdinal gets no
ordinal.js rather than an empty bundle. 216 new files for the current 72
languages.

ESM only. UMD is the legacy path, its globals are already namespaced by form
(n2words.currency.enUS), and splitting it would double the file count for the
consumers least likely to be counting bytes.

npm consumers are unaffected and need nothing: src/{lang}.js already exports
the three forms independently and the package is sideEffects-free, so
`import { toCurrency } from 'n2words/en-US'` has always tree-shaken cardinals
and ordinals away. This closes the gap for the one consumer that couldn't.

FORM_EXPORTS moves from module-private to exported in language-helpers.js so
rollup.config.js uses the same form -> export-name mapping instead of
declaring a second copy that could drift.

6352 of 6642 branches covered (95.63%)

Branch coverage included in aggregate %.

31570 of 31888 relevant lines covered (99.0%)

1218.59 hits per line

Jobs
ID Job ID Ran Files Coverage
1 32524202169.1 21 Aug 2026 08:34PM UTC 80
98.42
GitHub Action Run
Source Files on build 32524202169
  • Tree
  • List 80
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #32524202169
  • 87829955 on github
  • Prev Build on main (#31753460098)
  • Next Build on main (#32524568067)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc