First off, thanks for taking the time to contribute!
- Check if the bug has already been reported in Issues
- If not, open a new issue with a clear title and description
- Include code samples and expected vs actual behavior
- Open an issue describing the feature
- Explain why it would be useful
We'd love help adding more languages! Here's how:
- Create a new file in
languages/(e.g.,pt.jsfor Portuguese) - Follow the pattern in
languages/en.js - Export a default function that converts non-negative integers to words
- Add your language and its aliases to
languages/index.js, re-export it fromindex.js, and add it to thetoWordsswitch - Add a row to the spot-check table in
test/languages.test.jsand a named export inindex.d.ts - Update README.md (feature list, language table, direct exports) and CHANGELOG.md
- Submit a PR against
dev
- Fork the repo and create your branch from
dev(PRs targetdev;masteris the release branch) - Run
npm installto install dependencies - Make your changes
- Run
npm testto ensure tests pass - Run
npm run lintto check code style - Update documentation if needed
- Submit your PR!
- Add the function to
index.js(ornumerals.jsfor glyph-based systems) with JSDoc and an@example - Return
falsefor input you cannot convert; never throw - Add it to the export block,
index.d.ts, the README at-a-glance table and API section, and CHANGELOG.md - Add tests in
test/extras.test.js - Add a row to the playground in
site/app.jsif it is worth seeing
- ES2022+ syntax (const/let, arrow functions, template literals)
- ESM modules only
- Zero runtime dependencies. Dev dependencies only.
- Add JSDoc comments for public functions
- Maintain test coverage (
npm run test:coverage) - Unicode output must render with macOS system fonts out of the box
Be respectful and inclusive. We welcome contributors of all backgrounds and experience levels.