{"_id":"@cutticat/country-code-emoji","_rev":"2-788c78824f2f87e9573ffb9d0258d399","name":"@cutticat/country-code-emoji","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.3":{"name":"@cutticat/country-code-emoji","version":"1.0.3","keywords":["emoji","flag","country-code","iso-3166","unicode","regional-indicator","cutticat"],"author":{"name":"Maksim Victorovich Fomin"},"license":"MIT","_id":"@cutticat/country-code-emoji@1.0.3","maintainers":[{"name":"maksim2498","email":"maksim@cutticat.com"}],"homepage":"https://cutticat.com","dist":{"shasum":"c40003b621c65671c169fa0cfdfd1615f1dbdd9b","tarball":"https://registry.npmjs.org/@cutticat/country-code-emoji/-/country-code-emoji-1.0.3.tgz","fileCount":7,"integrity":"sha512-Jj85kxX8OxZXVy0CJmPf2UXyATSj+HdI6Rpp7T956kJPw/PMeUdRE7rmB9k0Bh2i8T5T81IGjKMwn6hPtjIy4w==","signatures":[{"sig":"MEYCIQDjXJGBrSsKCjYEBKDI+NcZDo6dY2zKc4N4HKnPKr0OfQIhAN+/3rXFBsnsx9hDcWcf+A7TYlad3SeWq8jLH+mgBW8y","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15027},"type":"module","_from":"file:cutticat-country-code-emoji-1.0.3.tgz","engines":{"node":">=22.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"lint":"biome check .","test":"tsx --test \"./tests/**/*.test.ts\"","build":"tsc --noEmit -p ./tsconfig.build.json && tsdown","clean":"rimraf ./dist","format":"biome format --write .","lint:fix":"biome check --write .","test:watch":"tsx --test --watch \"./tests/**/*.test.ts\"","format:check":"biome format .","test:coverage":"tsx --test --experimental-test-coverage \"./tests/**/*.test.ts\"","lint:fix:unsafe":"biome check --write --unsafe ."},"_npmUser":{"name":"maksim2498","email":"maksim@cutticat.com"},"_resolved":"/tmp/775c353c8d622ff4e2fcc695013cc24a/cutticat-country-code-emoji-1.0.3.tgz","_integrity":"sha512-Jj85kxX8OxZXVy0CJmPf2UXyATSj+HdI6Rpp7T956kJPw/PMeUdRE7rmB9k0Bh2i8T5T81IGjKMwn6hPtjIy4w==","repository":{"url":"https://gitflic.ru/project/cutticat-npm/country-code-emoji","type":"git"},"_npmVersion":"10.9.4","description":"CuttiCat library for converting country codes to flag emojis and vice versa","directories":{},"_nodeVersion":"22.22.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","rimraf":"^6.1.0","tsdown":"0.19.0-beta.2","typescript":"^5.9.3","@types/node":"^25.0.3","@biomejs/biome":"^2.3.13"},"_npmOperationalInternal":{"tmp":"tmp/country-code-emoji_1.0.3_1783454695972_0.6094519647849153","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@cutticat/country-code-emoji","publishConfig":{"access":"public"},"version":"1.0.4","description":"CuttiCat library for converting country codes to flag emojis and vice versa","author":{"name":"Maksim Victorovich Fomin"},"repository":{"type":"git","url":"https://gitflic.ru/project/cutticat-npm/country-code-emoji"},"homepage":"https://cutticat.com","keywords":["emoji","flag","country-code","iso-3166","unicode","regional-indicator","cutticat"],"type":"module","engines":{"node":">=22.0.0"},"devDependencies":{"@biomejs/biome":"^2.3.13","@cutticat/md-url-map":"^1.0.0","@types/node":"^25.0.3","rimraf":"^6.1.0","tsdown":"0.19.0-beta.2","tsx":"^4.19.2","typescript":"^5.9.3"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"license":"MIT","scripts":{"lint":"biome check .","lint:fix":"biome check --write .","lint:fix:unsafe":"biome check --write --unsafe .","format":"biome format --write .","format:check":"biome format .","clean":"rimraf ./dist","build":"tsc --noEmit -p ./tsconfig.build.json && tsdown","test":"tsx --test \"./tests/**/*.test.ts\"","test:watch":"tsx --test --watch \"./tests/**/*.test.ts\"","test:coverage":"tsx --test --experimental-test-coverage \"./tests/**/*.test.ts\""},"_id":"@cutticat/country-code-emoji@1.0.4","_integrity":"sha512-jqlHy5DZdcXUGrvI7bCahz5jXuJuR0Nle8UEaFLM9SpndqC2DsRq4egSHRMMSg69T2lNLN9HUY+ZS4FsLM5eDg==","_resolved":"/tmp/b03cacfa836a9b39e93099fcf2e78a10/cutticat-country-code-emoji-1.0.4.tgz","_from":"file:cutticat-country-code-emoji-1.0.4.tgz","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-jqlHy5DZdcXUGrvI7bCahz5jXuJuR0Nle8UEaFLM9SpndqC2DsRq4egSHRMMSg69T2lNLN9HUY+ZS4FsLM5eDg==","shasum":"bd700739dca55186cef0de5c5e6ea28ec82c2174","tarball":"https://registry.npmjs.org/@cutticat/country-code-emoji/-/country-code-emoji-1.0.4.tgz","fileCount":7,"unpackedSize":15379,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDoBVw8siU37gT8vx0zOTqFD7NNNNzSmwAiBKHSvwdQGAiB8vngPMgAHnU2PF/g3AUA3+96VHPvUEZjy/m9PuUdHDA=="}]},"_npmUser":{"name":"maksim2498","email":"maksim@cutticat.com"},"directories":{},"maintainers":[{"name":"maksim2498","email":"maksim@cutticat.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/country-code-emoji_1.0.4_1789047882455_0.8487667101950793"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-07T20:04:55.789Z","modified":"2026-09-10T13:44:42.785Z","1.0.3":"2026-07-07T20:04:56.102Z","1.0.4":"2026-09-10T13:44:42.581Z"},"author":{"name":"Maksim Victorovich Fomin"},"license":"MIT","homepage":"https://cutticat.com","keywords":["emoji","flag","country-code","iso-3166","unicode","regional-indicator","cutticat"],"repository":{"type":"git","url":"https://gitflic.ru/project/cutticat-npm/country-code-emoji"},"description":"CuttiCat library for converting country codes to flag emojis and vice versa","maintainers":[{"name":"maksim2498","email":"maksim@cutticat.com"}],"readme":"# @cutticat/country-code-emoji\n\nLibrary for converting country codes (ISO 3166-1 alpha-2) to flag emojis and back.\n\n## Contents\n\n- [Overview](#overview)\n- [Installation](#installation)\n- [Quick start](#quick-start)\n- [API](#api)\n- [Documentation](#documentation)\n- [Requirements](#requirements)\n\n## Overview\n\nThe library provides functions for converting two-letter country codes (US, RU, GB, etc.) to flag\nemojis (🇺🇸, 🇷🇺, 🇬🇧) and back. Uses Unicode regional indicators (U+1F1E6–U+1F1FF).\n\n## Installation\n\n```bash\npnpm i @cutticat/country-code-emoji\n```\n\n## Quick start\n\n```typescript\nimport { countryCodeToFlagEmoji, flagEmojiToCountryCode } from \"@cutticat/country-code-emoji\"\n\n// Country code → flag emoji\ncountryCodeToFlagEmoji(\"US\") // \"🇺🇸\"\ncountryCodeToFlagEmoji(\"RU\") // \"🇷🇺\"\ncountryCodeToFlagEmoji(\"GB\") // \"🇬🇧\"\n\n// Flag emoji → country code\nflagEmojiToCountryCode(\"🇺🇸\") // \"US\"\nflagEmojiToCountryCode(\"🇷🇺\") // \"RU\"\nflagEmojiToCountryCode(\"🇬🇧\") // \"GB\"\n```\n\n## API\n\n### Functions\n\n- `countryCodeToFlagEmoji(countryCode)` — converts a country code to a flag emoji; returns\n  `undefined` for an invalid code\n- `flagEmojiToCountryCode(flagEmoji)` — extracts a country code from a flag emoji; returns\n  `undefined` for an invalid emoji\n\n### Constants\n\n- `regionalIndicatorBase` — base code point for regional indicators (127397)\n- `asciiA`, `asciiZ` — ASCII codes for letters A and Z\n\n## Documentation\n\nFurther documentation:\n\n- [Project structure](<https://gitflic.ru/project/cutticat-npm/country-code-emoji/blob?branch=main&file=documents/STRUCTURE.md>)\n- [Scripts](<https://gitflic.ru/project/cutticat-npm/country-code-emoji/blob?branch=main&file=documents/SCRIPTS.md>)\n- [Style guide](<https://gitflic.ru/project/cutticat-npm/country-code-emoji/blob?branch=main&file=documents/STYLE_GUIDE.md>)\n- [Contributing](<https://gitflic.ru/project/cutticat-npm/country-code-emoji/blob?branch=main&file=documents/CONTRIBUTING.md>)\n\nFull API documentation is available in JSDoc comments. Use IDE autocomplete to browse.\n\n## Requirements\n\n- Node.js >= 22.0.0\n- pnpm >= 10.17.0\n- TypeScript >= 5.9.0\n","readmeFilename":"README.md"}