{"id":28855941,"url":"https://github.com/brianfunk/numberstring","last_synced_at":"2026-04-28T01:32:13.363Z","repository":{"id":57312385,"uuid":"68474569","full_name":"brianfunk/numberstring","owner":"brianfunk","description":"numberstring - # \" \"","archived":false,"fork":false,"pushed_at":"2026-02-08T14:31:31.000Z","size":197,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2026-02-08T20:41:24.018Z","etag":null,"topics":["npm","number","numberstring","string"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brianfunk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-17T19:44:51.000Z","updated_at":"2026-02-08T14:25:57.000Z","dependencies_parsed_at":"2022-09-16T01:43:35.119Z","dependency_job_id":null,"html_url":"https://github.com/brianfunk/numberstring","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/brianfunk/numberstring","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianfunk%2Fnumberstring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianfunk%2Fnumberstring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianfunk%2Fnumberstring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianfunk%2Fnumberstring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brianfunk","download_url":"https://codeload.github.com/brianfunk/numberstring/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianfunk%2Fnumberstring/sbom","scorecard":{"id":253143,"data":{"date":"2025-08-11","repo":{"name":"github.com/brianfunk/numberstring","commit":"a2e27423d847593277e38da29bf90644b5e4ad97"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/10 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during GetBranch(master): error during branchesHandler.query: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 19 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T08:58:13.434Z","repository_id":57312385,"created_at":"2025-08-17T08:58:13.434Z","updated_at":"2025-08-17T08:58:13.434Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32362781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["npm","number","numberstring","string"],"created_at":"2025-06-20T00:09:32.585Z","updated_at":"2026-04-28T01:32:13.357Z","avatar_url":"https://github.com/brianfunk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![numberstring](https://img.shields.io/badge/numberstring-%23%20%22%20%22-brightgreen.svg)](https://github.com/brianfunk/numberstring)\n[![npm version](https://img.shields.io/npm/v/numberstring.svg)](https://www.npmjs.com/package/numberstring)\n[![npm downloads](https://img.shields.io/npm/dm/numberstring.svg)](https://www.npmjs.com/package/numberstring)\n[![CI](https://github.com/brianfunk/numberstring/actions/workflows/ci.yml/badge.svg)](https://github.com/brianfunk/numberstring/actions/workflows/ci.yml)\n[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/ellerbrock/open-source-badge/)\n[![Semver](https://img.shields.io/badge/SemVer-2.0-blue.svg)](http://semver.org/spec/v2.0.0.html)\n[![License](https://img.shields.io/github/license/mashape/apistatus.svg)](https://opensource.org/licenses/MIT)\n[![LinkedIn](https://img.shields.io/badge/Linked-In-blue.svg)](https://www.linkedin.com/in/brianrandyfunk)\n\n# numberstring\n\n\u003e Number One Way to Makes Words from Numbers\n\nTransform any number into beautiful words. From `42` to `\"forty-two\"`, from `1000000` to `\"one million\"`. Supports **22 languages**, ordinals, currency, Roman numerals, and more!\n\n## Why numberstring?\n\n- **Zero dependencies** - Lightweight and fast\n- **22 languages** - English, Spanish, French, German, Danish, Chinese, Hindi, Russian, Portuguese, Japanese, Korean, Arabic, Italian, Dutch, Turkish, Polish, Swedish, Indonesian, Thai, Norwegian, Finnish, Icelandic\n- **Huge range** - Supports 0 to decillions (10^36) with BigInt\n- **Feature-rich** - Ordinals, decimals, currency, fractions, years, phone numbers\n- **Roman numerals** - Convert to and from Roman numerals\n- **Well tested** - 265 tests with 90%+ coverage\n- **Modern ES modules** - Tree-shakeable, TypeScript-friendly\n\n## Installation\n\n```bash\nnpm install numberstring\n```\n\n## Quick Start\n\n```javascript\nimport numberstring from 'numberstring';\n\nnumberstring(42);                    // 'forty-two'\nnumberstring(1000000);               // 'one million'\nnumberstring(10n ** 18n);            // 'one quintillion' (BigInt!)\nnumberstring(123, { cap: 'title' }); // 'One Hundred Twenty-Three'\n```\n\n## API Reference\n\n### Core Functions\n\n#### `numberstring(n, [options])`\n\nConvert a number to English words.\n\n```javascript\nnumberstring(42);                    // 'forty-two'\nnumberstring(100, { cap: 'title' }); // 'One Hundred'\nnumberstring(100, { punc: '!' });    // 'one hundred!'\n```\n\n#### `ordinal(n, [options])`\n\nConvert to ordinal words (first, second, etc.).\n\n```javascript\nimport { ordinal } from 'numberstring';\n\nordinal(1);   // 'first'\nordinal(2);   // 'second'\nordinal(21);  // 'twenty-first'\nordinal(100); // 'one hundredth'\n```\n\n#### `decimal(n, [options])`\n\nConvert decimal numbers to words.\n\n```javascript\nimport { decimal } from 'numberstring';\n\ndecimal(3.14);   // 'three point one four'\ndecimal(0.5);    // 'zero point five'\ndecimal(-3.14);  // 'negative three point one four'\n```\n\n#### `currency(amount, [options])`\n\nConvert currency amounts to words.\n\n```javascript\nimport { currency } from 'numberstring';\n\ncurrency('$123.45');  // 'one hundred twenty-three dollars and forty-five cents'\ncurrency('€50');      // 'fifty euros'\ncurrency('£1.01');    // 'one pound and one penny'\ncurrency('¥1000');    // 'one thousand yen'\ncurrency('₹100.50');  // 'one hundred rupees and fifty paise'\n```\n\nSupported currencies: `$` `€` `£` `¥` `₹` `元` (USD, EUR, GBP, JPY, INR, CNY)\n\n#### `roman(n, [options])`\n\nConvert to Roman numerals.\n\n```javascript\nimport { roman } from 'numberstring';\n\nroman(42);                   // 'XLII'\nroman(1999);                 // 'MCMXCIX'\nroman(4, { lower: true });   // 'iv'\n```\n\n#### `parse(str)`\n\nParse English words back to a number.\n\n```javascript\nimport { parse } from 'numberstring';\n\nparse('forty-two');        // 42\nparse('one thousand');     // 1000\nparse('one quintillion');  // 1000000000000000000n (BigInt)\n```\n\n### Utility Functions\n\n#### `negative(n, [options])`\n\nHandle negative numbers.\n\n```javascript\nimport { negative } from 'numberstring';\n\nnegative(-42);  // 'negative forty-two'\nnegative(42);   // 'forty-two'\n```\n\n#### `fraction(numerator, denominator, [options])`\n\nConvert fractions to words.\n\n```javascript\nimport { fraction } from 'numberstring';\n\nfraction(1, 2);  // 'one half'\nfraction(3, 4);  // 'three quarters'\nfraction(5, 8);  // 'five eighths'\n```\n\n#### `year(y, [options])`\n\nConvert years to spoken form.\n\n```javascript\nimport { year } from 'numberstring';\n\nyear(1984);  // 'nineteen eighty-four'\nyear(2000);  // 'two thousand'\nyear(2024);  // 'twenty twenty-four'\n```\n\n#### `telephone(phone, [options])`\n\nConvert phone numbers to words.\n\n```javascript\nimport { telephone } from 'numberstring';\n\ntelephone('555-1234');  // 'five five five one two three four'\ntelephone(8675309);     // 'eight six seven five three zero nine'\n```\n\n#### `percent(pct, [options])`\n\nConvert percentages to words.\n\n```javascript\nimport { percent } from 'numberstring';\n\npercent(50);     // 'fifty percent'\npercent('25%');  // 'twenty-five percent'\npercent(3.5);    // 'three point five percent'\n```\n\n#### `comma(n)`\n\nFormat a number with comma separators.\n\n```javascript\nimport { comma } from 'numberstring';\n\ncomma(1234567);  // '1,234,567'\n```\n\n## Multi-Language Support\n\nnumberstring supports 22 languages! Each language is in a separate file for easy tree-shaking.\n\n```javascript\nimport { toWords } from 'numberstring';\n\n// Using toWords with lang option\ntoWords(42, { lang: 'es' });  // 'cuarenta y dos'\ntoWords(42, { lang: 'fr' });  // 'quarante-deux'\ntoWords(42, { lang: 'de' });  // 'zweiundvierzig'\ntoWords(42, { lang: 'da' });  // 'toogfyrre'\ntoWords(42, { lang: 'zh' });  // '四十二'\ntoWords(42, { lang: 'hi' });  // 'बयालीस'\ntoWords(42, { lang: 'ru' });  // 'сорок два'\ntoWords(42, { lang: 'pt' });  // 'quarenta e dois'\ntoWords(42, { lang: 'ja' });  // '四十二'\ntoWords(42, { lang: 'ko' });  // '사십이'\ntoWords(42, { lang: 'ar' });  // 'اثنان وأربعون'\ntoWords(42, { lang: 'it' });  // 'quarantadue'\ntoWords(42, { lang: 'nl' });  // 'tweeënveertig'\ntoWords(42, { lang: 'tr' });  // 'kırk iki'\ntoWords(42, { lang: 'pl' });  // 'czterdzieści dwa'\ntoWords(42, { lang: 'sv' });  // 'fyrtiotvå'\ntoWords(42, { lang: 'id' });  // 'empat puluh dua'\ntoWords(42, { lang: 'th' });  // 'สี่สิบสอง'\ntoWords(42, { lang: 'no' });  // 'førtito'\ntoWords(42, { lang: 'fi' });  // 'neljäkymmentäkaksi'\ntoWords(42, { lang: 'is' });  // 'fjörutíu og tveir'\n```\n\n### Supported Languages\n\n| Code | Language | Example (42) |\n|------|----------|-------------|\n| `en` | English | forty-two |\n| `es` | Spanish | cuarenta y dos |\n| `fr` | French | quarante-deux |\n| `de` | German | zweiundvierzig |\n| `da` | Danish | toogfyrre |\n| `zh` | Chinese | 四十二 |\n| `hi` | Hindi | बयालीस |\n| `ru` | Russian | сорок два |\n| `pt` | Portuguese | quarenta e dois |\n| `ja` | Japanese | 四十二 |\n| `ko` | Korean | 사십이 |\n| `ar` | Arabic | اثنان وأربعون |\n| `it` | Italian | quarantadue |\n| `nl` | Dutch | tweeënveertig |\n| `tr` | Turkish | kırk iki |\n| `pl` | Polish | czterdzieści dwa |\n| `sv` | Swedish | fyrtiotvå |\n| `id` | Indonesian | empat puluh dua |\n| `th` | Thai | สี่สิบสอง |\n| `no` | Norwegian | førtito |\n| `fi` | Finnish | neljäkymmentäkaksi |\n| `is` | Icelandic | fjörutíu og tveir |\n\n### Adding a New Language\n\nLanguages are modular! To add a new language:\n\n1. Create `languages/xx.js` following the pattern in `languages/en.js`\n2. Export your conversion function\n3. Add to `languages/index.js`\n4. Submit a PR!\n\n## Options\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `cap` | `string` | Capitalization: `'title'`, `'upper'`, or `'lower'` |\n| `punc` | `string` | Punctuation: `'!'`, `'?'`, or `'.'` |\n| `lang` | `string` | Language code for `toWords()` |\n| `point` | `string` | Word for decimal point (default: `'point'`) |\n| `lower` | `boolean` | Lowercase Roman numerals |\n\n## Supported Scales\n\n| Scale | Power | Example |\n|-------|-------|---------|\n| Ones | 10^0 | `five` |\n| Thousands | 10^3 | `five thousand` |\n| Millions | 10^6 | `five million` |\n| Billions | 10^9 | `five billion` |\n| Trillions | 10^12 | `five trillion` |\n| Quadrillions | 10^15 | `five quadrillion` |\n| **Quintillions** | 10^18 | `five quintillion` *(BigInt)* |\n| **Sextillions** | 10^21 | `five sextillion` *(BigInt)* |\n| **Septillions** | 10^24 | `five septillion` *(BigInt)* |\n| **Octillions** | 10^27 | `five octillion` *(BigInt)* |\n| **Nonillions** | 10^30 | `five nonillion` *(BigInt)* |\n| **Decillions** | 10^33 | `five decillion` *(BigInt)* |\n\n## REST API Server\n\nnumberstring includes a ready-to-use REST API server!\n\n```bash\ncd server\nnpm install\nnpm start\n# Server running at http://localhost:3456\n```\n\n### Endpoints\n\n| Endpoint | Description | Example |\n|----------|-------------|---------|\n| `GET /convert/:n` | Number to words | `/convert/42` → `\"forty-two\"` |\n| `GET /convert/:n?lang=es` | Multi-language | `/convert/42?lang=es` → `\"cuarenta y dos\"` |\n| `GET /ordinal/:n` | Ordinal words | `/ordinal/3` → `\"third\"` |\n| `GET /decimal/:n` | Decimal words | `/decimal/3.14` → `\"three point one four\"` |\n| `GET /currency/:amt` | Currency words | `/currency/$99.99` → `\"ninety-nine dollars...\"` |\n| `GET /roman/:n` | Roman numerals | `/roman/2024` → `\"MMXXIV\"` |\n| `GET /parse/:words` | Words to number | `/parse/forty-two` → `42` |\n| `GET /comma/:n` | Format with commas | `/comma/1000000` → `\"1,000,000\"` |\n| `GET /languages` | List languages | Returns supported language codes |\n\n### Example\n\n```bash\ncurl http://localhost:3456/convert/1000000000000000\n# {\"input\":\"1000000000000000\",\"output\":\"one quadrillion\",\"lang\":\"en\"}\n\ncurl \"http://localhost:3456/convert/42?lang=fr\"\n# {\"input\":\"42\",\"output\":\"quarante-deux\",\"lang\":\"fr\"}\n```\n\n## Development\n\n```bash\nnpm install        # Install dependencies\nnpm test           # Run tests\nnpm run lint       # Run linter\nnpm run test:coverage  # Test with coverage\n```\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for details on the process for submitting pull requests.\n\nWe especially welcome contributions for new languages! See the Contributing guide for details.\n\n## Versioning\n\nThis project uses [Semantic Versioning 2.0](http://semver.org/spec/v2.0.0.html).\n\n## Requirements\n\n- Node.js 18+\n- ES modules (`import`/`export`)\n\n## License\n\nMIT\n\n### # \" \"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianfunk%2Fnumberstring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrianfunk%2Fnumberstring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianfunk%2Fnumberstring/lists"}