{"_id":"@callsy/locale","_rev":"8-9c362bcd7f2d06f872d916694ff4aa91","name":"@callsy/locale","dist-tags":{"latest":"1.3.0"},"versions":{"1.0.0":{"name":"@callsy/locale","version":"1.0.0","author":{"name":"Laimonas Sutkus"},"license":"ISC","_id":"@callsy/locale@1.0.0","maintainers":[{"name":"laimonassutkus","email":"laimonas@callsy.ai"}],"homepage":"https://github.com/CallsyAI/locale#readme","bugs":{"url":"https://github.com/CallsyAI/locale/issues"},"dist":{"shasum":"7c32ee0f0fc69694702272c70de35172b7d66d9e","tarball":"https://registry.npmjs.org/@callsy/locale/-/locale-1.0.0.tgz","fileCount":33,"integrity":"sha512-UrjS7skmTrbmTTKkY1+6M7KcNI1bc6m0+UfJlvt/pHx3N8kBTi7vdKjDUoScbYjkvkkgiVx+obEBPudkC8F+Yw==","signatures":[{"sig":"MEUCIDPQb/4PImrneqbd+Fp7YNIEoRLHvE4D8BAaLgL94z/qAiEA4CCYix59grKssXV6j3VDBnI5jc+GBBJWpkJy/KV1wlw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":85011},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsc","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"laimonassutkus","email":"laimonas@callsy.ai"},"repository":{"url":"git+ssh://git@github.com/CallsyAI/locale.git","type":"git"},"_npmVersion":"11.5.1","description":"Country locale data: from phone numbers to flags.","directories":{},"_nodeVersion":"24.7.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.8","@vitest/ui":"^2.1.8","typescript":"^5.7.2","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/locale_1.0.0_1769118807660_0.0018463696323138823","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@callsy/locale","version":"1.0.1","author":{"name":"Laimonas Sutkus"},"license":"ISC","_id":"@callsy/locale@1.0.1","maintainers":[{"name":"laimonassutkus","email":"laimonas@callsy.ai"}],"homepage":"https://github.com/CallsyAI/locale#readme","bugs":{"url":"https://github.com/CallsyAI/locale/issues"},"dist":{"shasum":"93f8bf548f37b703f39968d65af247cd6f295820","tarball":"https://registry.npmjs.org/@callsy/locale/-/locale-1.0.1.tgz","fileCount":39,"integrity":"sha512-2mre/AKTeU8AX6GcTdEuCZI28SP88mTzoXhrKpjrgFuCIbDElR5SHpOUnciZaBvovq+R/CGEgh0/yI0l/OCaaQ==","signatures":[{"sig":"MEUCIQDjkgGmz1wcpiIHoL0MfO5gpEyxIxmT1Xfb7XkrJR9YsgIgcgmuk8KiWkfzFtMxgh4WGdzxuU58lLn0YW7rrirdrNo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":98027},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsc","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"laimonassutkus","email":"laimonas@callsy.ai"},"repository":{"url":"git+ssh://git@github.com/CallsyAI/locale.git","type":"git"},"_npmVersion":"11.5.1","description":"Country locale data: from phone numbers to flags.","directories":{},"_nodeVersion":"24.7.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.8","@vitest/ui":"^2.1.8","typescript":"^5.7.2","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/locale_1.0.1_1769119803785_0.3837278683554075","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@callsy/locale","version":"1.0.2","author":{"name":"Laimonas Sutkus"},"license":"ISC","_id":"@callsy/locale@1.0.2","maintainers":[{"name":"laimonassutkus","email":"laimonas@callsy.ai"}],"homepage":"https://github.com/CallsyAI/locale#readme","bugs":{"url":"https://github.com/CallsyAI/locale/issues"},"dist":{"shasum":"ffab2baa414aa02591ca6d9f8e30b5b0e4f0143d","tarball":"https://registry.npmjs.org/@callsy/locale/-/locale-1.0.2.tgz","fileCount":39,"integrity":"sha512-OwEVJjZFaiDbPKdLQJIK2yIyJwxLMwK8LUsh6Lm5eRWtTfjVWyG1PH3/z7jo0kNhjBplUI2zlXMhiJU1QB+SpQ==","signatures":[{"sig":"MEYCIQC/IM/XxYMphHt/JDYlRRziFe0ZcEkpe34QUrhDQ4BMTAIhAOLnscu6Y/2WuYSx9PjZf6gw0Xv9cqam8BHT4+Gep+gK","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":98027},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"28f9930bf20ae61deb2c42ac92cd60f2426628ea","scripts":{"test":"vitest run","build":"tsc","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"laimonassutkus","email":"laimonas@callsy.ai"},"repository":{"url":"git+ssh://git@github.com/CallsyAI/locale.git","type":"git"},"_npmVersion":"11.5.1","description":"Country locale data: from phone numbers to flags.","directories":{},"_nodeVersion":"24.7.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.8","@vitest/ui":"^2.1.8","typescript":"^5.7.2","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/locale_1.0.2_1769159950020_0.23774398211529513","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@callsy/locale","version":"1.0.3","author":{"name":"Laimonas Sutkus"},"license":"ISC","_id":"@callsy/locale@1.0.3","maintainers":[{"name":"laimonassutkus","email":"laimonas@callsy.ai"}],"homepage":"https://github.com/CallsyAI/locale#readme","bugs":{"url":"https://github.com/CallsyAI/locale/issues"},"dist":{"shasum":"e60c15518d10059e42fa2c35409b3941a8eb4322","tarball":"https://registry.npmjs.org/@callsy/locale/-/locale-1.0.3.tgz","fileCount":43,"integrity":"sha512-q4pb+PRr1Nu9gX4VuLcKzqk/QKxnwQZ3HrHefpWVOwAy2oEpgZDLC7OGQ0hJbk1F+4Ey3z6mmLrjJ2Qyfh6rsw==","signatures":[{"sig":"MEYCIQCG8/sLDJtJInKVVSByFdwDTwa1ItAEGq6LxqF1y+FDJAIhAKezBfV4DneNqN0GWiUQCJdIs9p7CZa3bgdp3hMIOlB8","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":137886},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"1442b0831fe45d96238a7a81e06fd56d3a3749ef","scripts":{"test":"vitest run","build":"tsc","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"laimonassutkus","email":"laimonas@callsy.ai"},"repository":{"url":"git+ssh://git@github.com/CallsyAI/locale.git","type":"git"},"_npmVersion":"11.5.1","description":"Country locale data: from phone numbers to flags.","directories":{},"_nodeVersion":"24.7.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.8","@vitest/ui":"^2.1.8","typescript":"^5.7.2","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/locale_1.0.3_1769161732831_0.08769253530504506","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@callsy/locale","version":"1.1.0","author":{"name":"Laimonas Sutkus"},"license":"ISC","_id":"@callsy/locale@1.1.0","maintainers":[{"name":"laimonassutkus","email":"laimonas@callsy.ai"}],"homepage":"https://github.com/CallsyAI/locale#readme","bugs":{"url":"https://github.com/CallsyAI/locale/issues"},"dist":{"shasum":"0e0eb35f34422c4176cd2d5e2fb9d59c277b3220","tarball":"https://registry.npmjs.org/@callsy/locale/-/locale-1.1.0.tgz","fileCount":52,"integrity":"sha512-/6tSGUdwHaFtDLQZ7I15yYOD6exP1LdwcZRfpO+uMOyL/yz/rjeSgIG3V89+9+TJ3zDfJ/psFCLdXHu9khWYvg==","signatures":[{"sig":"MEYCIQC48kMyz8XExsO4iSRtHNgdFVVzB/xaAg0yqu0OIPauCwIhALD+awRXOwrjHbUfAOmaEhK/YihEZkvEy6OEJ/WgKR66","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":165826},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"f3f2cdfd04fbd0bf1c966059a4386c0efa1ad9a8","scripts":{"test":"vitest run","build":"tsc","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"laimonassutkus","email":"laimonas@callsy.ai"},"repository":{"url":"git+ssh://git@github.com/CallsyAI/locale.git","type":"git"},"_npmVersion":"11.5.1","description":"Country locale data: from phone numbers to flags.","directories":{},"_nodeVersion":"24.7.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.8","@vitest/ui":"^2.1.8","typescript":"^5.7.2","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/locale_1.1.0_1769172162481_0.45985142558869674","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@callsy/locale","version":"1.1.1","author":{"name":"Laimonas Sutkus"},"license":"ISC","_id":"@callsy/locale@1.1.1","maintainers":[{"name":"laimonassutkus","email":"laimonas@callsy.ai"}],"homepage":"https://github.com/CallsyAI/locale#readme","bugs":{"url":"https://github.com/CallsyAI/locale/issues"},"dist":{"shasum":"ad571349c97d7e58946825135c896eda039ae8af","tarball":"https://registry.npmjs.org/@callsy/locale/-/locale-1.1.1.tgz","fileCount":52,"integrity":"sha512-Xbq17tYNP5dF3xXvJDT/P/AkJ94lg1KDqJmzu3w4ebBSvgPC8rZ5fwBxbudB/dmN8Rpx+Dhe2qzVkIUNBGVp7w==","signatures":[{"sig":"MEQCIGxXQEyYKYFb0KCeqvR8AHwEP6rpT2URXe7ud9n/I6EeAiBNV7F3l1CkL3AeWpEs8xi9W42NrFjiNGejcwQs4+4AJg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":165858},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"7ed3510c90a2d53f3703fad03918b6f042a09594","scripts":{"test":"vitest run","build":"tsc","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"laimonassutkus","email":"laimonas@callsy.ai"},"repository":{"url":"git+ssh://git@github.com/CallsyAI/locale.git","type":"git"},"_npmVersion":"11.5.1","description":"Country locale data: from phone numbers to flags.","directories":{},"_nodeVersion":"24.7.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.8","@vitest/ui":"^2.1.8","typescript":"^5.7.2","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/locale_1.1.1_1770375540443_0.8253205194342048","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@callsy/locale","version":"1.2.0","author":{"name":"Laimonas Sutkus"},"license":"ISC","_id":"@callsy/locale@1.2.0","maintainers":[{"name":"laimonassutkus","email":"laimonas@callsy.ai"}],"homepage":"https://github.com/CallsyAI/locale#readme","bugs":{"url":"https://github.com/CallsyAI/locale/issues"},"dist":{"shasum":"2e471ee24879d0155a48b986826e223c8cae8167","tarball":"https://registry.npmjs.org/@callsy/locale/-/locale-1.2.0.tgz","fileCount":52,"integrity":"sha512-xejft6ISQElNR0EN9Je6zXPu6LcQwIL3m720NvI8xrrtt0CawEEFwkQ6tna4f+x3AnFm0matQh1MI6kkvk5GHQ==","signatures":[{"sig":"MEYCIQClpN/xcZ+QRXxEmbKHcXZrA4+U47C2Wto8DX63mM3QigIhAIw5JywAUeJvcxkb5wtVyec0CZbEnmO1Jl725FuGM+cI","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":166628},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"acf5806943189a9bcf53528ae43a2db5d4a0e12d","scripts":{"test":"vitest run","build":"tsc","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"laimonassutkus","email":"laimonas@callsy.ai"},"repository":{"url":"git+ssh://git@github.com/CallsyAI/locale.git","type":"git"},"_npmVersion":"11.5.1","description":"Country locale data: from phone numbers to flags.","directories":{},"_nodeVersion":"24.7.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.8","@vitest/ui":"^2.1.8","typescript":"^5.7.2","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/locale_1.2.0_1770409691465_0.9986801739311242","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"_id":"@callsy/locale@1.3.0","bugs":{"url":"https://github.com/CallsyAI/locale/issues"},"dist":{"shasum":"e5e7af2fce6f5c088e08fba2d1daa190f1e001f3","tarball":"https://registry.npmjs.org/@callsy/locale/-/locale-1.3.0.tgz","fileCount":62,"integrity":"sha512-+vHWSM9QXxZZxkZNGQ8DGrgFZKCwNo1Hwbsq3gjih0/X9qWtTjzVT88NC7oQj96wNjkVFNf/3jdDfhUUP+RPRQ==","signatures":[{"sig":"MEYCIQC4FzpBICmarLSw+2WiMbCJbK96Zji8eUi9DRVs8mFm6wIhAN+c1s18OGQRxv7anyKs5kin78g93h3vqv3U3DydUbrx","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICRV/NmnDb//KisWyaMIWuTVsm9STd79sdHFqUJWfg1hAiEA42aTsN7NI3G9cxfRdqR8o2t+mWTt8/ENY0pwYOGetIA="}],"unpackedSize":226089},"main":"dist/index.js","name":"@callsy/locale","type":"module","types":"dist/index.d.ts","author":{"name":"Laimonas Sutkus"},"engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"4d7aa7e217e75834b188bc420cbeae018601d27a","license":"ISC","scripts":{"test":"vitest run","build":"tsc","test:watch":"vitest","prepublishOnly":"npm run build"},"version":"1.3.0","_npmUser":{"name":"laimonassutkus","email":"laimonas@callsy.ai"},"homepage":"https://github.com/CallsyAI/locale#readme","repository":{"url":"git+ssh://git@github.com/CallsyAI/locale.git","type":"git"},"_npmVersion":"11.5.1","description":"Country locale data: from phone numbers to flags.","directories":{},"maintainers":[{"name":"laimonassutkus","email":"laimonas@callsy.ai"}],"_nodeVersion":"24.7.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.8","@vitest/ui":"^2.1.8","typescript":"^5.7.2","@types/node":"^20.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/locale_1.3.0_1789468480654_0.5183469156524945"}}},"time":{"created":"2026-01-22T21:53:27.583Z","modified":"2026-09-15T10:34:40.996Z","1.0.0":"2026-01-22T21:53:27.820Z","1.0.1":"2026-01-22T22:10:03.945Z","1.0.2":"2026-01-23T09:19:10.196Z","1.0.3":"2026-01-23T09:48:52.979Z","1.1.0":"2026-01-23T12:42:42.648Z","1.1.1":"2026-02-06T10:59:00.583Z","1.2.0":"2026-02-06T20:28:11.611Z","1.3.0":"2026-09-15T10:34:40.735Z"},"bugs":{"url":"https://github.com/CallsyAI/locale/issues"},"author":{"name":"Laimonas Sutkus"},"license":"ISC","homepage":"https://github.com/CallsyAI/locale#readme","repository":{"url":"git+ssh://git@github.com/CallsyAI/locale.git","type":"git"},"description":"Country locale data: from phone numbers to flags.","maintainers":[{"name":"laimonassutkus","email":"laimonas@callsy.ai"}],"readme":"# @callsy/locale\n\nA comprehensive locale data library for Node.js and TypeScript. Work seamlessly with countries, phone numbers, and languages using ISO standards, with built-in emoji support and zero runtime dependencies.\n\n## Features\n\n- **Three Powerful Classes**: Work with countries, phone numbers, and languages through intuitive, fluent APIs.\n- **Zero Runtime Dependencies**: Lightweight and secure with no external dependencies.\n- **200+ Countries**: Comprehensive coverage of ISO 3166-1 alpha-2 country codes with names, flags, and metadata.\n- **200+ Languages**: Full support for ISO 639 language codes including regional variants (e.g., en-US, fr-CA).\n- **300+ US Area Codes**: Detailed mapping of NANP area codes to US states for precise location identification.\n- **E.164 Phone Validation**: Automatic validation and formatting of international phone numbers.\n- **Flag Emoji Support**: Built-in flag emojis for countries and languages for rich UI experiences.\n- **Bidirectional Lookups**: Convert seamlessly between codes, names, and related entities.\n- **TypeScript Ready**: Fully typed with comprehensive IntelliSense support for a superior developer experience.\n\n## Installation\n\n```bash\nnpm install @callsy/locale\n```\n\n## Quick Start\n\nWork with countries, phone numbers, and languages using clean, intuitive APIs.\n\n```typescript\nimport { Country, Phone, Language } from '@callsy/locale'\n\n// 1. Working with Countries\nconst usa = new Country('US')\nconsole.log(usa.name())                           // \"United States\"\nconsole.log(usa.name({ includeEmoji: true }))     // \"🇺🇸 United States\"\nconsole.log(usa.emoji())                          // \"🇺🇸\"\nconsole.log(usa.continent())                      // \"NA\"\nconsole.log(usa.languages())                      // [\"en\"]\n\n// Or create from name\nconst france = Country.fromName('France')\nconsole.log(france.iso2())                        // \"FR\"\n\n// 2. Working with Phone Numbers\nconst phone = new Phone('+1-415-555-0123')\nconsole.log(phone.value())                        // \"+14155550123\"\nconsole.log(phone.country())                      // \"US\"\nconsole.log(phone.state())                        // \"CA\"\nconsole.log(phone.isE164())                       // true\n\n// Extract country information from phone\nconst phoneCountry = new Country(phone.country())\nconsole.log(phoneCountry.name({ includeEmoji: true })) // \"🇺🇸 United States\"\n\n// 3. Working with Languages\nconst english = new Language('en')\nconsole.log(english.name())                       // \"English\"\nconsole.log(english.countries())                  // [\"US\", \"GB\", \"CA\", ...]\n\n// Regional language codes\nconst usEnglish = new Language('en-US')\nconsole.log(usEnglish.name())                     // \"English (United States)\"\n\n// Or create from name\nconst spanish = Language.fromName('Spanish')\nconsole.log(spanish.code())                       // \"es\"\n```\n\n## Core Concepts\n\n### Working with Countries\n\nThe `Country` class provides comprehensive information about any country using its ISO 3166-1 alpha-2 code.\n\n**Creating a Country Instance:**\n\n```typescript\n// From ISO2 code (case-insensitive, whitespace-tolerant)\nconst usa = new Country('US')\nconst uk = new Country('  gb  ') // Automatically normalized to \"GB\"\n\n// From country name (case-sensitive, exact match required)\nconst canada = Country.fromName('Canada')\n```\n\n**Getting Country Information:**\n\n```typescript\nconst japan = new Country('JP')\n\njapan.iso2()                                    // \"JP\"\njapan.name()                                    // \"Japan\"\njapan.name({ includeEmoji: true })              // \"🇯🇵 Japan\"\njapan.name({ includeCode: true })               // \"Japan (JP)\"\njapan.name({ includeEmoji: true, includeCode: true }) // \"🇯🇵 Japan (JP)\"\njapan.emoji()                                   // \"🇯🇵\"\njapan.continent()                               // \"AS\"\njapan.languages()                               // [\"ja\"]\n```\n\n**Comparing Countries:**\n\n```typescript\nconst us1 = new Country('US')\nconst us2 = new Country('us')\nconst gb = new Country('GB')\n\nus1.equals(us2) // true\nus1.equals(gb)  // false\n```\n\n**Accessing Raw Data:**\n\n```typescript\n// Access all static mappings directly\nCountry.isoToName['US']      // \"United States\"\nCountry.nameToIso['France']  // \"FR\"\nCountry.isoToFlag['DE']      // \"🇩🇪\"\nCountry.isoToCont['BR']      // \"SA\"\nCountry.isoToLang['CH']      // [\"de\", \"fr\", \"it\", \"rm\"]\n```\n\n### Working with Phone Numbers\n\nThe `Phone` class validates and extracts information from international phone numbers following the E.164 format.\n\n**Creating a Phone Instance:**\n\n```typescript\n// Automatically cleans and formats various inputs\nconst phone1 = new Phone('+1-415-555-0123')     // Cleans to +14155550123\nconst phone2 = new Phone('1 (415) 555-0123')    // Adds + if missing\nconst phone3 = new Phone('+442071234567')       // UK number\n\n// All non-digit characters are removed\nconst phone4 = new Phone('+1abc234def5678')     // Becomes +12345678\n```\n\n**Extracting Phone Information:**\n\n```typescript\nconst phone = new Phone('+14155551234')\n\nphone.value()       // \"+14155551234\"\nphone.digits()      // \"14155551234\"\nphone.isE164()      // true\nphone.country()     // \"US\" (extracts country from prefix)\nphone.state()       // \"CA\" (US-specific: extracts state from area code)\n\n// For non-US numbers, state() returns null\nconst ukPhone = new Phone('+442071234567')\nukPhone.country()   // \"GB\"\nukPhone.state()     // null\n```\n\n**Understanding NANP (North American Numbering Plan):**\n\n```typescript\n// The +1 prefix is shared by multiple countries\nconst nanpPhone = new Phone('+14165551234')\nnanpPhone.country() // \"US\" (returns first match in NANP countries)\n\n// Access all NANP countries\nPhone.phoneToIso[1] // [\"US\", \"CA\", \"AG\", \"AI\", ...]\n```\n\n**US State Extraction:**\n\n```typescript\n// Extract US state from area code\nconst nyPhone = new Phone('+12125551234')\nnyPhone.state() // \"NY\"\n\nconst caPhone = new Phone('+14155551234')\ncaPhone.state() // \"CA\"\n\n// Access all US area codes\nPhone.usAreaCodes['212'] // \"NY\"\nPhone.usAreaCodes['415'] // \"CA\"\n```\n\n**Comparing Phone Numbers:**\n\n```typescript\nconst phone1 = new Phone('+14155551234')\nconst phone2 = new Phone('1-415-555-1234') // Different format, same number\nconst phone3 = new Phone('+14155559999')\n\nphone1.equals(phone2) // true (normalized comparison)\nphone1.equals(phone3) // false\n```\n\n**Accessing Raw Data:**\n\n```typescript\n// Access static mappings\nPhone.isoToPhone['US']     // [1]\nPhone.isoToPhone['GB']     // [44]\nPhone.phoneToIso[1]        // [\"US\", \"CA\", \"AG\", \"AI\", ...]\nPhone.phoneCodes           // [1268, 1264, ..., 44, 1] (sorted longest to shortest)\nPhone.usAreaCodes['212']   // \"NY\"\n```\n\n### Working with Languages\n\nThe `Language` class handles ISO 639 language codes, including support for regional variants.\n\n**Creating a Language Instance:**\n\n```typescript\n// Basic language code (case-insensitive, whitespace-tolerant)\nconst english = new Language('en')\nconst french = new Language('  FR  ') // Normalized to \"fr\"\n\n// Regional variants (automatically formatted)\nconst usEnglish = new Language('en-us')   // Normalized to \"en-US\"\nconst caFrench = new Language('fr-CA')    // \"fr-CA\"\n\n// From language name (case-sensitive, exact match)\nconst spanish = Language.fromName('Spanish')\nconst german = Language.fromName('German (Germany)') // Regional variant\n```\n\n**Getting Language Information:**\n\n```typescript\nconst spanish = new Language('es')\n\nspanish.code()                                   // \"es\"\nspanish.name()                                   // \"Spanish\"\nspanish.name({ includeEmoji: true })             // \"🇪🇸 Spanish\"\nspanish.name({ includeCode: true })              // \"Spanish (es)\"\nspanish.name({ includeEmoji: true, includeCode: true }) // \"🇪🇸 Spanish (es)\"\nspanish.emoji()                                  // \"🇪🇸\" (or \"🌐\" if no flag)\nspanish.countries()                              // [\"ES\", \"MX\", \"AR\", ...] countries where Spanish is spoken\n```\n\n**Working with Regional Variants:**\n\n```typescript\nconst usEnglish = new Language('en-US')\nconst gbEnglish = new Language('en-GB')\n\nusEnglish.name()    // \"English (United States)\"\ngbEnglish.name()    // \"English (United Kingdom)\"\n\nusEnglish.code()    // \"en-US\"\ngbEnglish.code()    // \"en-GB\"\n\n// Both regional variants share the same base language\nconst baseEnglish = new Language('en')\nbaseEnglish.name()  // \"English\"\n```\n\n**Comparing Languages:**\n\n```typescript\nconst en1 = new Language('en')\nconst en2 = new Language('EN')\nconst es = new Language('es')\n\nen1.equals(en2) // true\nen1.equals(es)  // false\n\n// Regional variants are different\nconst enUS = new Language('en-US')\nconst enGB = new Language('en-GB')\nenUS.equals(enGB) // false\n```\n\n**Accessing Raw Data:**\n\n```typescript\n// Access static mappings\nLanguage.codeToName['en']           // \"English\"\nLanguage.nameToCode['Spanish']      // \"es\"\nLanguage.codeToFlag['fr']           // \"🇫🇷\"\nLanguage.codeToCountries['en']      // [\"US\", \"GB\", \"CA\", ...] countries where English is spoken\n```\n\n## Common Patterns\n\n### Bidirectional Lookups\n\nConvert seamlessly between different representations:\n\n```typescript\n// Country: Code ↔ Name\nconst countryCode = Country.nameToIso['United States'] // \"US\"\nconst countryName = Country.isoToName['US']            // \"United States\"\n\n// Language: Code ↔ Name\nconst langCode = Language.nameToCode['English']        // \"en\"\nconst langName = Language.codeToName['en']             // \"English\"\n\n// Phone: Country Code ↔ Phone Prefix\nconst phonePrefix = Phone.isoToPhone['US']             // [1]\nconst countries = Phone.phoneToIso[44]                 // [\"GB\"]\n```\n\n### Cross-Class Integration\n\nCombine classes for powerful workflows:\n\n```typescript\n// Extract country from phone number and get full details\nconst phone = new Phone('+442071234567')\nconst country = new Country(phone.country())\nconsole.log(country.name({ includeEmoji: true }))      // \"🇬🇧 United Kingdom\"\nconsole.log(country.languages())                        // [\"en\", \"cy\", \"gd\"]\n\n// Get languages for a country and display them\nconst japan = new Country('JP')\nconst languages = japan.languages().map(code => {\n  const lang = new Language(code)\n  return lang.name({ includeEmoji: true })\n})\nconsole.log(languages) // [\"🇯🇵 Japanese\"]\n\n// Validate phone number matches expected country\nconst usPhone = new Phone('+14155551234')\nconst usCountry = new Country('US')\nconst isMatch = usPhone.country() === usCountry.iso2() // true\n```\n\n### Error Handling\n\nAll classes throw descriptive errors for invalid inputs:\n\n```typescript\n// Invalid country code\ntry {\n  new Country('XX')\n} catch (error) {\n  // Error: \"Unrecognised country code. Make sure you provide a valid ISO2 country code. Current value: \"XX\".\"\n}\n\n// Invalid phone format\ntry {\n  new Phone('+123456789012345678') // Exceeds 15 digits\n} catch (error) {\n  // Error: \"Phone number must be in E164 format (e.g., +1234567890). Current value: \"...\".\"\n}\n\n// Invalid language code\ntry {\n  new Language('xyz')\n} catch (error) {\n  // Error: \"Unrecognised language code. Make sure you provide a valid ISO 639 language code. Current value: \"xyz\".\"\n}\n\n// Empty values\ntry {\n  new Country('')\n} catch (error) {\n  // Error: \"You must provide a country code. Value can not be empty. Current value: \"\".\"\n}\n```\n\n## License\n\nISC","readmeFilename":"README.md"}