{"_id":"@codeshumon/number-to-words","_rev":"3-14e246c57879e7926b78bce8ed7a54eb","name":"@codeshumon/number-to-words","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@codeshumon/number-to-words","version":"1.0.0","keywords":["num2text","currency-number-to-text","currency-number-to-words","currency-to-text","numbers","words","text","number-to-words","currency-to-words","number-converter","money-words","amount-in-words","numeric-to-text","multi-currency","localization-number","number-spelling","word-conversion","currency-translation","amount-to-text"],"author":{"name":"codeshumon"},"license":"MIT","_id":"@codeshumon/number-to-words@1.0.0","maintainers":[{"name":"codeshumon","email":"codeshumon.shumonkhan@gmail.com"}],"homepage":"https://github.com/codeshumon/number-to-words#readme","bugs":{"url":"https://github.com/codeshumon/number-to-words/issues"},"dist":{"shasum":"e4318f1ced671439ef8840b4b2380c29d2742115","tarball":"https://registry.npmjs.org/@codeshumon/number-to-words/-/number-to-words-1.0.0.tgz","fileCount":7,"integrity":"sha512-0IpdpvmUpTVFUmotw/Ba9XO+U/AJY1W5lfhh5cblPOA0GHavMIyrK4/DCNnz7jkW1nbF20AARa3JDDEGenm9xg==","signatures":[{"sig":"MEUCIQD8MDWsUg7jwS1M4hazJzRBzX9GOZ/M8/9a/eGBvZh5gwIgCAM12YKJmyO5+tIpJoJcZTWXUWA63udC5RtbFiEMx7Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":104691},"main":"./dist/index.js","type":"commonjs","types":"./dist/index.d.ts","module":"./dist/index.mjs","browser":"./dist/index.global.js","gitHead":"0e3e3e996f1656f9b9940ee1a0711a4f177a642f","scripts":{"build":"tsup"},"_npmUser":{"name":"codeshumon","email":"codeshumon.shumonkhan@gmail.com"},"repository":{"url":"git+https://github.com/codeshumon/number-to-words.git","type":"git"},"_npmVersion":"11.4.2","description":"Convert numbers to spoken words with accurate currency formatting for over 100 countries","directories":{},"_nodeVersion":"22.15.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.8.3"},"_npmOperationalInternal":{"tmp":"tmp/number-to-words_1.0.0_1752842478267_0.7579992301512355","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@codeshumon/number-to-words","version":"1.0.2","keywords":["num2text","currency-number-to-text","currency-number-to-words","currency-to-text","numbers","words","text","number-to-words","currency-to-words","number-converter","money-words","amount-in-words","numeric-to-text","multi-currency","localization-number","number-spelling","word-conversion","currency-translation","amount-to-text"],"author":{"name":"codeshumon"},"license":"MIT","_id":"@codeshumon/number-to-words@1.0.2","maintainers":[{"name":"codeshumon","email":"codeshumon.shumonkhan@gmail.com"}],"homepage":"https://github.com/codewithshumon/number-to-words#readme","bugs":{"url":"https://github.com/codewithshumon/number-to-words/issues"},"dist":{"shasum":"30f4959b66b79420f6725ea19831382cd741ee27","tarball":"https://registry.npmjs.org/@codeshumon/number-to-words/-/number-to-words-1.0.2.tgz","fileCount":14,"integrity":"sha512-IsNhJO+Wnp0t+iN4od2tWae9eqaEjnmUB2BB1rKL2CUNWvMb4QVchUgBLK2JMtR7gmRhaeQLoR4Ld+x40B3veQ==","signatures":[{"sig":"MEUCIQCvod3ijLr43W6fjLlUtsj4FGOegs2hrTSB5A9kw5kH5QIgdu9qJfvqQ874Gpx5m4v0fMI9Yi3ZEOe4l2grVr1/GqM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":83351},"main":"./dist/cjs/index.js","types":"./dist/esm/index.d.ts","module":"./dist/esm/index.js","browser":"./dist/esm/index.js","exports":{".":{"types":"./dist/esm/index.d.ts","import":"./dist/esm/index.js","browser":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"gitHead":"afaaccabd8a51d71f92d26fa28c112cb3d162972","scripts":{"build":"npm run clean && npm run build:esm && npm run build:cjs","clean":"rm -rf dist","build:cjs":"tsc -p tsconfig.cjs.json","build:esm":"tsc -p tsconfig.esm.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"codeshumon","email":"codeshumon.shumonkhan@gmail.com"},"repository":{"url":"git+https://github.com/codewithshumon/number-to-words.git","type":"git"},"_npmVersion":"11.6.0","description":"Convert numbers to spoken words with accurate currency formatting for over 100 countries","directories":{},"_nodeVersion":"22.15.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/number-to-words_1.0.2_1757258039488_0.5913343826886919","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@codeshumon/number-to-words","version":"1.0.3","description":"Convert numbers to spoken words with accurate currency formatting for over 100 countries","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/esm/index.d.ts","browser":"./dist/esm/index.js","scripts":{"clean":"rm -rf dist","build:esm":"tsc -p tsconfig.esm.json","build:cjs":"tsc -p tsconfig.cjs.json","build":"npm run clean && npm run build:esm && npm run build:cjs","prepublishOnly":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/codewithshumon/number-to-words.git"},"keywords":["num2text","currency-number-to-text","currency-number-to-words","currency-to-text","numbers","words","text","number-to-words","currency-to-words","number-converter","money-words","amount-in-words","numeric-to-text","multi-currency","localization-number","number-spelling","word-conversion","currency-translation","amount-to-text"],"author":{"name":"codeshumon"},"license":"MIT","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js","browser":"./dist/esm/index.js","types":"./dist/esm/index.d.ts"}},"bugs":{"url":"https://github.com/codewithshumon/number-to-words/issues"},"homepage":"https://github.com/codewithshumon/number-to-words#readme","devDependencies":{"@types/node":"^20.0.0","typescript":"^5.0.0"},"_id":"@codeshumon/number-to-words@1.0.3","gitHead":"0038e3142b87bbe67aea87ca7b23da823beee9bc","_nodeVersion":"22.15.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-Kvv5IzudomsFDDLIkETpWntiA8nabhpdesZKjW4AA1DcHbQK0Oy5d3+o5f+oZNfu5jalBmr7IkbBm/Jb8vzSdg==","shasum":"1c80097a616f35b0dc68ef28f1da622cc9e3ce66","tarball":"https://registry.npmjs.org/@codeshumon/number-to-words/-/number-to-words-1.0.3.tgz","fileCount":14,"unpackedSize":84310,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEknA2yKaq657gWFwumNQFOlZeEMGuDtiOthQH9Dz/gsAiEAxqcda5B9SRgwB9ul0hdSWxU4wFu4zlR2BR9lE9k51jQ="}]},"_npmUser":{"name":"codeshumon","email":"codeshumon.shumonkhan@gmail.com"},"directories":{},"maintainers":[{"name":"codeshumon","email":"codeshumon.shumonkhan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/number-to-words_1.0.3_1757258152949_0.8174127028807876"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-18T12:41:18.155Z","modified":"2025-09-07T15:15:53.313Z","1.0.0":"2025-07-18T12:41:18.440Z","1.0.2":"2025-09-07T15:13:59.661Z","1.0.3":"2025-09-07T15:15:53.135Z"},"bugs":{"url":"https://github.com/codewithshumon/number-to-words/issues"},"author":{"name":"codeshumon"},"license":"MIT","homepage":"https://github.com/codewithshumon/number-to-words#readme","keywords":["num2text","currency-number-to-text","currency-number-to-words","currency-to-text","numbers","words","text","number-to-words","currency-to-words","number-converter","money-words","amount-in-words","numeric-to-text","multi-currency","localization-number","number-spelling","word-conversion","currency-translation","amount-to-text"],"repository":{"type":"git","url":"git+https://github.com/codewithshumon/number-to-words.git"},"description":"Convert numbers to spoken words with accurate currency formatting for over 100 countries","maintainers":[{"name":"codeshumon","email":"codeshumon.shumonkhan@gmail.com"}],"readme":"<h1 align=\"center\">@codeshumon/number-to-words</h1>\r\n\r\n<h1 align=\"center\">Convert Number to Words | Number to Words Converter Including Currency Format ➡️🔠</h1>\r\n\r\n<p align=\"center\">\r\nConvert numbers to words with currency formatting for 130+ countries. Perfect for invoices, checks, and financial applications.\r\n</p>\r\n\r\n<p>\r\n<a href=\"https://www.npmjs.com/package/@codeshumon/number-to-words\">\r\n<img src=\"https://img.shields.io/npm/v/@codeshumon/number-to-words.svg\" alt=\"npm version\">\r\n</a>\r\n<a href=\"https://opensource.org/licenses/MIT\">\r\n<img src=\"https://img.shields.io/badge/License-MIT-blue.svg\" alt=\"License: MIT\">\r\n</a>\r\n</p>\r\n\r\nTable of Contents\r\n\r\n<ul>\r\n<li><a href=\"#features-\">Features ✨</a></li>\r\n<li><a href=\"#installation-\">Installation 📦</a></li>\r\n<li><a href=\"#basic-usage-\">Basic Usage 🔢</a></li>\r\n<li><a href=\"#advanced-usage-\">Advanced Usage 🛠️</a></li>\r\n<li><a href=\"#api-reference--options-\">API Reference & Options 📚</a></li>\r\n<li><a href=\"#supported-countries-\">Supported Countries 🌎</a></li>\r\n<li><a href=\"#typescript-support-\">TypeScript Support ✅</a></li>\r\n<li><a href=\"#benchmarks-\">Benchmarks ⚡</a></li>\r\n<li><a href=\"#browser-compatibility-\">Browser Compatibility 🌐</a></li>\r\n<li><a href=\"#contributing-\">Contributing 🤝</a></li>\r\n<li><a href=\"#license-\">License 📄</a></li>\r\n</ul>\r\n\r\nFeatures ✨\r\n\r\n<ul>\r\n<li>🔢 Convert numbers to words (e.g., <code>123</code> → \"One Hundred Twenty Three\")</li>\r\n<li>💰 Currency formatting for 130+ countries</li>\r\n<li>🔣 Supports both integer and decimal numbers</li>\r\n<li>🔧 TypeScript and JavaScript compatible</li>\r\n<li>📦 Lightweight (zero dependencies)</li>\r\n<li>🌍 Supports negative and large numbers up to Trillion</li>\r\n</ul>\r\n\r\nInstallation 📦\r\n\r\n<pre><code class=\"language-bash\">npm install @codeshumon/number-to-words\r\n\r\nor\r\n\r\nyarn add @codeshumon/number-to-words\r\n</code></pre>\r\n\r\nBasic Usage 🔢\r\n\r\nConvert Numbers to Words (Node.js CommonJS - main field)\r\n\r\n<pre><code class=\"language-javascript\">const { toWords } = require('@codeshumon/number-to-words');\r\n\r\nconsole.log(toWords(125.55));\r\n// Output: \"One Hundred Twenty Five and Point Five Five\"\r\n\r\nconsole.log(toWords(588532654484815));\r\n// Output: \"Five Hundred Eighty Eight Trillion Five Hundred Thirty Two Billion Six Hundred Fifty Four Million Four Hundred Eighty Four Thousand Eight Hundred Fifteen\"\r\n</code></pre>\r\n\r\nConvert Number to Currency Words 💰\r\n\r\n<pre><code class=\"language-javascript\">const { toCurrencyWords } = require('@codeshumon/number-to-words');\r\n\r\n// US Dollars\r\nconsole.log(toCurrencyWords(1234.56, 'US'));\r\n// \"One Thousand Two Hundred Thirty Four Dollars and Fifty Six Cents Only\"\r\n\r\n// British Pounds\r\nconsole.log(toCurrencyWords(789.12, 'GB'));\r\n// \"Seven Hundred Eighty Nine Pounds and Twelve Pence Only\"\r\n\r\n// Indian Rupees\r\nconsole.log(toCurrencyWords(4567.89, 'IN'));\r\n// \"Four Thousand Five Hundred Sixty Seven Rupees and Eighty Nine Paise Only\"\r\n</code></pre>\r\n\r\nES Module Usage (via module field)\r\n\r\n<pre><code class=\"language-javascript\">import { toWords, toCurrencyWords } from '@codeshumon/number-to-words';\r\n\r\nconsole.log(toWords(2023));\r\n// Output: \"Two Thousand Twenty Three\"\r\n\r\nconsole.log(toCurrencyWords(2500.75, 'US'));\r\n// Output: \"Two Thousand Five Hundred Dollars and Seventy Five Cents Only\"\r\n</code></pre>\r\n\r\nBrowser Usage 🌐 (via CDN using browser field)\r\n\r\nUse Directly in HTML\r\n\r\nInclude the script in your HTML:\r\n\r\n<pre><code class=\"language-html\">&lt;script src=\"https://unpkg.com/@codeshumon/number-to-words\"&gt;&lt;/script&gt;\r\n</code></pre>\r\n\r\nThen, you can access the functions globally:\r\n\r\n<pre><code class=\"language-javascript\">const { toWords, toCurrencyWords } = window.NumberToWords;\r\n\r\nconsole.log(toWords(999.99));\r\n// Output: \"Nine Hundred Ninety Nine and Point Nine Nine\"\r\n\r\nconsole.log(toCurrencyWords(999.99, 'US'));\r\n// Output: \"Nine Hundred Ninety Nine Dollars and Ninety Nine Cents Only\"\r\n</code></pre>\r\n\r\nAdvanced Usage 🛠️\r\n\r\nHandling Negative Numbers\r\n\r\n<pre><code class=\"language-javascript\">toCurrencyWords(-100.50, 'US');\r\n// \"Negative One Hundred Dollars and Fifty Cents Only\"\r\n</code></pre>\r\n\r\nLarge Number Support\r\n\r\n<pre><code class=\"language-javascript\">toWords(1000000000000);\r\n// \"One Trillion\"\r\n</code></pre>\r\n\r\nAdvanced toWords Examples\r\n\r\n<pre><code class=\"language-javascript\">const { toWords } = require('@codeshumon/number-to-words');\r\n\r\nconsole.log(toWords(652222225.52226));\r\n// Output: \"Six Hundred Fifty-two Million, Two Hundred Twenty-two Thousand, Two Hundred Twenty-five Point Five Two\"\r\n\r\nconsole.log(toWords('4322222225.52226', { noHypen: true }));\r\n// Output: \"Four Billion, Three Hundred Twenty Two Million, Two Hundred Twenty Two Thousand, Two Hundred Twenty Five Point Five Two\"\r\n\r\nconsole.log(toWords('4322222225.52226', { noComa: true }));\r\n// Output: \"Four Billion Three Hundred Twenty-two Million Two Hundred Twenty-two Thousand Two Hundred Twenty-five Point Five Two\"\r\n\r\nconsole.log(toWords(2522222225.52226, {isAnd : true }));\r\n// Output: \"Two Billion and Five Hundred Twenty-two Million and Two Hundred Twenty-two Thousand and Two Hundred Twenty-five Point Five Two\"\r\n\r\nconsole.log(toWords('9222222225.8226', {titleCase : true}));\r\n// Output: \"Nine Billion, Two Hundred Twenty-Two Million, Two Hundred Twenty-Two Thousand, Two Hundred Twenty-Five Point Eight Two\"\r\n\r\nconsole.log(toWords(4022222225.6226, { titleCase : true, isAnd : true, noHypen: true }));\r\n// Output: \"Four Billion and Twenty Two Million and Two Hundred Twenty Two Thousand and Two Hundred Twenty Five Point Six Two\"\r\n</code></pre>\r\n\r\nAdvanced toCurrencyWords Examples\r\n\r\n<pre><code class=\"language-javascript\">const { toCurrencyWords } = require('@codeshumon/number-to-words');\r\n\r\n// Default (assuming 'US' if no currency provided or unrecognized)\r\nconsole.log(toCurrencyWords('115255500015.58780'));\r\n// Output: \"One Hundred Fifteen Billion, Two Hundred Fifty-five Million, Five Hundred Thousand, Fifteen Dollars and Fifty-nine Cents only\"\r\n\r\nconsole.log(toCurrencyWords('5552111111115.2500', 'GB',));\r\n// Output: \"Five Trillion, Five Hundred Fifty-two Billion, One Hundred Eleven Million, One Hundred Eleven Thousand, One Hundred Fifteen Pounds and Twenty-five Pence only\"\r\n\r\nconsole.log(toCurrencyWords('5552111111115.5500', 'GB', {noHypen: true}));\r\n// Output: \"Five Trillion, Five Hundred Fifty Two Billion, One Hundred Eleven Million, One Hundred Eleven Thousand, One Hundred Fifteen Pounds and Fifty Five Pence only\"\r\n\r\nconsole.log(toCurrencyWords('5552111111115.5500', 'GB', {noComa: true}));\r\n// Output: \"Five Trillion Five Hundred Fifty-two Billion One Hundred Eleven Million One Hundred Eleven Thousand One Hundred Fifteen Pounds and Fifty-five Pence only\"\r\n\r\nconsole.log(toCurrencyWords(5552111111115.6500, 'GB', {isAnd : true }));\r\n// Output: \"Five Trillion and Five Hundred Fifty-two Billion and One Hundred Eleven Million and One Hundred Eleven Thousand and One Hundred Fifteen Pounds and Sixty-five Pence only\"\r\n\r\nconsole.log(toCurrencyWords(5552111111115.9500, 'GB', {titleCase : true}));\r\n// Output: \"Five Trillion, Five Hundred Fifty-Two Billion, One Hundred Eleven Million, One Hundred Eleven Thousand, One Hundred Fifteen Pounds and Ninety-Five Pence only\"\r\n\r\nconsole.log(toCurrencyWords(5552111111115.750, 'GB', { titleCase : true, isAnd : true, noHypen: true }));\r\n// Output: \"Five Trillion and Five Hundred Fifty Two Billion and One Hundred Eleven Million and One Hundred Eleven Thousand and One Hundred Fifteen Pounds and Seventy Five Pence only\"\r\n</code></pre>\r\n\r\nES Module Usage (via module field)\r\n\r\n<pre><code class=\"language-javascript\">import { toWords, toCurrencyWords } from '@codeshumon/number-to-words';\r\n\r\nconsole.log(toWords(2023));\r\n// Output: \"Two Thousand Twenty Three\"\r\n\r\nconsole.log(toCurrencyWords(2500.75, 'US'));\r\n// Output: \"Two Thousand Five Hundred Dollars and Seventy Five Cents Only\"\r\n\r\nconsole.log(toWords(652222225.52226));\r\n// Output: \"Six Hundred Fifty-two Million, Two Hundred Twenty-two Thousand, Two Hundred Twenty-five Point Five Two\"\r\n\r\nconsole.log(toCurrencyWords('5552111111115.2500', 'GB',));\r\n// Output: \"Five Trillion, Five Hundred Fifty-two Billion, One Hundred Eleven Million, One Hundred Eleven Thousand, One Hundred Fifteen Pounds and Twenty-five Pence only\"\r\n</code></pre>\r\n\r\nBrowser Usage 🌐 (via CDN using browser field)\r\n\r\nUse Directly in HTML\r\n\r\n<p>Include the script in your HTML:</p>\r\n\r\n<pre><code class=\"language-html\">&lt;script src=\"https://unpkg.com/@codeshumon/number-to-words\"&gt;&lt;/script&gt;\r\n</code></pre>\r\n\r\n<p>Then, you can access the functions globally:</p>\r\n\r\n<pre><code class=\"language-javascript\">const { toWords, toCurrencyWords } = window.NumberToWords;\r\n\r\nconsole.log(toWords(999.99));\r\n// Output: \"Nine Hundred Ninety Nine and Point Nine Nine\"\r\n\r\nconsole.log(toCurrencyWords(999.99, 'US'));\r\n// Output: \"Nine Hundred Ninety Nine Dollars and Ninety Nine Cents Only\"\r\n\r\nconsole.log(toCurrencyWords('115255500015.58780'));\r\n// Output: \"One Hundred Fifteen Billion, Two Hundred Fifty-five Million, Five Hundred Thousand, Fifteen Dollars and Fifty-nine Cents only\"\r\n\r\nconsole.log(toCurrencyWords('5552111111115.2500', 'GB',));\r\n// Output: \"Five Trillion, Five Hundred Fifty-two Billion, One Hundred Eleven Million, One Hundred Eleven Thousand, One Hundred Fifteen Pounds and Twenty-five Pence only\"\r\n\r\nconsole.log(toCurrencyWords('5552111111115.5500', 'GB', {noHypen: true}));\r\n// Output: \"Five Trillion, Five Hundred Fifty Two Billion, One Hundred Eleven Million, One Hundred Eleven Thousand, One Hundred Fifteen Pounds and Fifty Five Pence only\"\r\n\r\nconsole.log(toCurrencyWords('5552111111115.5500', 'GB', {noComa: true}));\r\n// Output: \"Five Trillion Five Hundred Fifty-two Billion One Hundred Eleven Million One Hundred Eleven Thousand One Hundred Fifteen Pounds and Fifty-five Pence only\"\r\n\r\nconsole.log(toCurrencyWords(5552111111115.6500, 'GB', {isAnd : true }));\r\n// Output: \"Five Trillion and Five Hundred Fifty-two Billion and One Hundred Eleven Million and One Hundred Eleven Thousand and One Hundred Fifteen Pounds and Sixty-five Pence only\"\r\n\r\nconsole.log(toCurrencyWords(5552111111115.9500, 'GB', {titleCase : true}));\r\n// Output: \"Five Trillion, Five Hundred Fifty-Two Billion, One Hundred Eleven Million, One Hundred Eleven Thousand, One Hundred Fifteen Pounds and Ninety-Five Pence only\"\r\n\r\nconsole.log(toCurrencyWords(5552111111115.750, 'GB', { titleCase : true, isAnd : true, noHypen: true }));\r\n// Output: \"Five Trillion and Five Hundred Fifty Two Billion and One Hundred Eleven Million and One Hundred Eleven Thousand and One Hundred Fifteen Pounds and Seventy Five Pence only\"\r\n\r\nconsole.log(toWords(652222225.52226));\r\n// Output: \"Six Hundred Fifty-two Million, Two Hundred Twenty-two Thousand, Two Hundred Twenty-five Point Five Two\"\r\n\r\nconsole.log(toWords('4322222225.52226', { noHypen: true }));\r\n// Output: \"Four Billion, Three Hundred Twenty Two Million, Two Hundred Twenty Two Thousand, Two Hundred Twenty Five Point Five Two\"\r\n\r\nconsole.log(toWords('4322222225.52226', { noComa: true }));\r\n// Output: \"Four Billion Three Hundred Twenty-two Million Two Hundred Twenty-two Thousand Two Hundred Twenty-five Point Five Two\"\r\n\r\nconsole.log(toWords(2522222225.52226, {isAnd : true }));\r\n// Output: \"Two Billion and Five Hundred Twenty-two Million and Two Hundred Twenty-two Thousand and Two Hundred Twenty-five Point Five Two\"\r\n\r\nconsole.log(toWords('9222222225.8226', {titleCase : true}));\r\n// Output: \"Nine Billion, Two Hundred Twenty-Two Million, Two Hundred Twenty-Two Thousand, Two Hundred Twenty-Five Point Eight Two\"\r\n\r\nconsole.log(toWords(4022222225.6226, { titleCase : true, isAnd : true, noHypen: true }));\r\n// Output: \"Four Billion and Twenty Two Million and Two Hundred Twenty Two Thousand and Two Hundred Twenty Five Point Six Two\"\r\n</code></pre>\r\n\r\nAPI Reference & Options 📚\r\n\r\nOptions for toWords & toCurrencyWords\r\n\r\n<table>\r\n    <thead>\r\n        <tr>\r\n            <th>Option</th>\r\n            <th>Type</th>\r\n            <th>Default</th>\r\n            <th>Description</th>\r\n            <th>Effect Example</th>\r\n        </tr>\r\n    </thead>\r\n    <tbody>\r\n        <tr>\r\n            <td><code>noComa</code></td>\r\n            <td>boolean</td>\r\n            <td>false</td>\r\n            <td>Include or exclude commas between large number groups.</td>\r\n            <td>\r\n                <strong>false:</strong> \"One Million, Two Hundred Thousand\"<br />\r\n                <strong>true:</strong> \"One Million Two Hundred Thousand\"\r\n            </td>\r\n        </tr>\r\n        <tr>\r\n            <td><code>isAnd</code></td>\r\n            <td>boolean</td>\r\n            <td>false</td>\r\n            <td>Insert the word <code>and</code> between number groups for formal reading.</td>\r\n            <td>\r\n                <strong>false:</strong> \"One Million Two Hundred Thousand\"<br />\r\n                <strong>true:</strong> \"One Million and Two Hundred Thousand\"\r\n            </td>\r\n        </tr>\r\n        <tr>\r\n            <td><code>noHypen</code></td>\r\n            <td>boolean</td>\r\n            <td>false</td>\r\n            <td>Remove hyphens in compound numbers (e.g. \"Twenty-Five\" → \"Twenty Five\").</td>\r\n            <td>\r\n                <strong>false:</strong> \"Twenty-Five\"<br />\r\n                <strong>true:</strong> \"Twenty Five\"\r\n            </td>\r\n        </tr>\r\n        <tr>\r\n            <td><code>titleCase</code></td>\r\n            <td>boolean</td>\r\n            <td>false</td>\r\n            <td>Output words in Title Case, capitalizing hyphenated parts as well.</td>\r\n            <td>\r\n                <strong>false:</strong> \"Twenty-five\"<br />\r\n                <strong>true:</strong> \"Twenty-Five\"\r\n            </td>\r\n        </tr>\r\n        <tr> \r\n            <td><code>noDefaultAnd</code></td> \r\n            <td>boolean</td> <td>false</td> \r\n            <td>Remove default \"and\" before decimal points and currency minor units</td> \r\n            <td> \r\n                <strong>false:</strong> \"One Hundred and Point Five\" / \"Dollars and Fifty Cents\"<br /> \r\n                <strong>true:</strong> \"One Hundred Point Five\" / \"Dollars Fifty Cents\" \r\n            </td>\r\n        </tr>\r\n    </tbody>\r\n</table>\r\n\r\n\r\nOption Effects Examples\r\n\r\n<pre><code class=\"language-javascript\">// Input number: 125.55\r\n\r\n// Default\r\ntoWords(125.55);\r\n// Output: \"One Hundred Twenty Five and Point Five Five\"\r\n\r\n// noComa: true\r\ntoWords(125.55, { noComa: true });\r\n// Output: \"One Hundred Twenty Five and Point Five Five\" (no commas)\r\n\r\n// isAnd: true\r\ntoWords(125.55, { isAnd: true });\r\n// Output: \"One Hundred and Twenty Five and Point Five Five\"\r\n\r\n// noHypen: true\r\ntoWords(125.55, { noHypen: true });\r\n// Output: \"One Hundred Twenty Five and Point Five Five\" (no hyphen in \"Twenty Five\")\r\n\r\n// titleCase: true\r\ntoWords(125.55, { titleCase: true });\r\n// Output: \"One Hundred Twenty-Five and Point Five Five\" (capitalized words)\r\n</code></pre>\r\n\r\n🌍 Supported Countries\r\n\r\n<p>This package supports 130+ countries using ISO 3166-1 alpha-2 codes.</p>\r\n<table>\r\n<thead>\r\n<tr>\r\n<th>Country</th>\r\n<th>Code</th>\r\n<th>Country</th>\r\n<th>Code</th>\r\n<th>Country</th>\r\n<th>Code</th>\r\n</tr>\r\n</thead>\r\n<tbody>\r\n<tr><td>Afghanistan</td><td>AF</td><td>Albania</td><td>AL</td><td>Algeria</td><td>DZ</td></tr>\r\n<tr><td>Angola</td><td>AO</td><td>Argentina</td><td>AR</td><td>Armenia</td><td>AM</td></tr>\r\n<tr><td>Australia</td><td>AU</td><td>Austria</td><td>AT</td><td>Azerbaijan</td><td>AZ</td></tr>\r\n<tr><td>Bahrain</td><td>BH</td><td>Bangladesh</td><td>BD</td><td>Belarus</td><td>BY</td></tr>\r\n<tr><td>Belgium</td><td>BE</td><td>Benin</td><td>BJ</td><td>Bolivia</td><td>BO</td></tr>\r\n<tr><td>Bosnia and Herzegovina</td><td>BA</td><td>Brazil</td><td>BR</td><td>Bulgaria</td><td>BG</td></tr>\r\n<tr><td>Burkina Faso</td><td>BF</td><td>Cambodia</td><td>KH</td><td>Cameroon</td><td>CM</td></tr>\r\n<tr><td>Canada</td><td>CA</td><td>Chile</td><td>CL</td><td>China</td><td>CN</td></tr>\r\n<tr><td>Colombia</td><td>CO</td><td>Costa Rica</td><td>CR</td><td>Croatia</td><td>HR</td></tr>\r\n<tr><td>Cuba</td><td>CU</td><td>Czech Republic</td><td>CZ</td><td>DR Congo</td><td>CD</td></tr>\r\n<tr><td>Denmark</td><td>DK</td><td>Ecuador</td><td>EC</td><td>Egypt</td><td>EG</td></tr>\r\n<tr><td>El Salvador</td><td>SV</td><td>Estonia</td><td>EE</td><td>Ethiopia</td><td>ET</td></tr>\r\n<tr><td>Finland</td><td>FI</td><td>France</td><td>FR</td><td>Gabon</td><td>GA</td></tr>\r\n<tr><td>Georgia</td><td>GE</td><td>Germany</td><td>DE</td><td>Ghana</td><td>GH</td></tr>\r\n<tr><td>Greece</td><td>GR</td><td>Guatemala</td><td>GT</td><td>Guinea</td><td>GN</td></tr>\r\n<tr><td>Haiti</td><td>HT</td><td>Honduras</td><td>HN</td><td>Hong Kong</td><td>HK</td></tr>\r\n<tr><td>Hungary</td><td>HU</td><td>India</td><td>IN</td><td>Indonesia</td><td>ID</td></tr>\r\n<tr><td>Iran</td><td>IR</td><td>Iraq</td><td>IQ</td><td>Ireland</td><td>IE</td></tr>\r\n<tr><td>Israel</td><td>IL</td><td>Italy</td><td>IT</td><td>Ivory Coast</td><td>CI</td></tr>\r\n<tr><td>Japan</td><td>JP</td><td>Jordan</td><td>JO</td><td>Kazakhstan</td><td>KZ</td></tr>\r\n<tr><td>Kenya</td><td>KE</td><td>Kuwait</td><td>KW</td><td>Kyrgyzstan</td><td>KG</td></tr>\r\n<tr><td>Laos</td><td>LA</td><td>Latvia</td><td>LV</td><td>Lebanon</td><td>LB</td></tr>\r\n<tr><td>Libya</td><td>LY</td><td>Lithuania</td><td>LT</td><td>Madagascar</td><td>MG</td></tr>\r\n<tr><td>Malawi</td><td>MW</td><td>Malaysia</td><td>MY</td><td>Mali</td><td>ML</td></tr>\r\n<tr><td>Mexico</td><td>MX</td><td>Moldova</td><td>MD</td><td>Morocco</td><td>MA</td></tr>\r\n<tr><td>Mozambique</td><td>MZ</td><td>Myanmar</td><td>MM</td><td>Namibia</td><td>NA</td></tr>\r\n<tr><td>Nepal</td><td>NP</td><td>Netherlands</td><td>NL</td><td>New Zealand</td><td>NZ</td></tr>\r\n<tr><td>Nicaragua</td><td>NI</td><td>Niger</td><td>NE</td><td>Nigeria</td><td>NG</td></tr>\r\n<tr><td>North Macedonia</td><td>MK</td><td>Norway</td><td>NO</td><td>Oman</td><td>OM</td></tr>\r\n<tr><td>Pakistan</td><td>PK</td><td>Palestine</td><td>PS</td><td>Panama</td><td>PA</td></tr>\r\n<tr><td>Paraguay</td><td>PY</td><td>Peru</td><td>PE</td><td>Philippines</td><td>PH</td></tr>\r\n<tr><td>Poland</td><td>PL</td><td>Portugal</td><td>PT</td><td>Qatar</td><td>QA</td></tr>\r\n<tr><td>Romania</td><td>RO</td><td>Russia</td><td>RU</td><td>Rwanda</td><td>RW</td></tr>\r\n<tr><td>Saudi Arabia</td><td>SA</td><td>Senegal</td><td>SN</td><td>Serbia</td><td>RS</td></tr>\r\n<tr><td>Sierra Leone</td><td>SL</td><td>Singapore</td><td>SG</td><td>Slovakia</td><td>SK</td></tr>\r\n<tr><td>Slovenia</td><td>SI</td><td>South Africa</td><td>ZA</td><td>South Korea</td><td>KR</td></tr>\r\n<tr><td>South Sudan</td><td>SS</td><td>Spain</td><td>ES</td><td>Sri Lanka</td><td>LK</td></tr>\r\n<tr><td>Sudan</td><td>SD</td><td>Sweden</td><td>SE</td><td>Switzerland</td><td>CH</td></tr>\r\n<tr><td>Syria</td><td>SY</td><td>Tajikistan</td><td>TJ</td><td>Taiwan</td><td>TW</td></tr>\r\n<tr><td>Tanzania</td><td>TZ</td><td>Thailand</td><td>TH</td><td>Tunisia</td><td>TN</td></tr>\r\n<tr><td>Turkey</td><td>TR</td><td>Turkmenistan</td><td>TM</td><td>Uganda</td><td>UG</td></tr>\r\n<tr><td>Ukraine</td><td>UA</td><td>United Arab Emirates</td><td>AE</td><td>United Kingdom</td><td>GB</td></tr>\r\n<tr><td>United States</td><td>US</td><td>Uruguay</td><td>UY</td><td>Uzbekistan</td><td>UZ</td></tr>\r\n<tr><td>Venezuela</td><td>VE</td><td>Vietnam</td><td>VN</td><td>Yemen</td><td>YE</td></tr>\r\n<tr><td>Zambia</td><td>ZM</td><td>Zimbabwe</td><td>ZW</td><td></td><td></td></tr>\r\n</tbody>\r\n</table>\r\n\r\nTypeScript Support ✅\r\n\r\n<p>This package includes full TypeScript type definitions:</p>\r\n<pre><code class=\"language-typescript\">import { toWords, toCurrencyWords, CountryCode } from 'number-to-words';\r\n\r\nconst amount: string = toCurrencyWords(123.45, 'US' as CountryCode);\r\n</code></pre>\r\n\r\nBenchmarks ⚡\r\n\r\n<ul>\r\n<li>✅ Converts up to quadrillion-range numbers in &lt;1ms</li>\r\n<li>✅ Zero dependencies ensures lightning-fast startup</li>\r\n</ul>\r\n\r\nBrowser Compatibility 🌐\r\n\r\n<p>This library is fully compatible with:</p>\r\n<ul>\r\n<li>✅ Node.js (14+)</li>\r\n<li>✅ All modern browsers</li>\r\n<li>✅ Works with bundlers like Webpack, Vite, and Rollup</li>\r\n<li>✅ Works in serverless functions and frontend apps</li>\r\n</ul>\r\n\r\nContributing 🤝\r\n\r\n<p>Contributions are welcome! Please:</p>\r\n<ul>\r\n<li>Fork the repository</li>\r\n<li>Create a new branch</li>\r\n<li>Submit an issue or feature request</li>\r\n<li>Open a Pull Request</li>\r\n</ul>\r\n\r\nLicense 📄\r\n\r\n<p><a href=\"https://www.npmjs.com/~codeshumon\">MIT © codeshumon</a></p>\r\n<p>See LICENSE for full details.</p>\r\n","readmeFilename":"README.md"}