anyaround — names & flags: Country, language, script and currency codes into the names people actually read, flag included.
▸about anyaround
Turns a region, language, script, currency or calendar code into its localized name — "US" → "United States", "Соединенные Штаты" — with the flag emoji when it is a country.
- wraps
- Intl.DisplayNames
- install
- npm install anyaround
- runtime
- Node 18+, every modern browser, Deno, Bun, edge runtimes.
- docs
- anyfamily.site/docs/anyaround
- playground
- run the family on StackBlitz
why
Country and language name tables are hundreds of kilobytes and go stale; the runtime already has every name in 200+ locales. anyaround adds what Intl lacks — flags from Regional Indicator Symbols, detection of what kind of code it was given, a clear miss signal — in ~0.9 kB.
usage
anyaround("US") // "United States"
anyaround("US", { display: "flag-name" }) // "🇺🇸 United States"
anyaround("de", { locale: "fr" }) // "allemand"
anyaround("EUR") // "Euro"
anyaround("Cyrl") // "Cyrillic"
anyaround.info("QZ", { mode: "region" }) // { code: "QZ", type: "region", name: "QZ", flag: "🇶🇿", found: false }not for
Listing every country (Intl cannot enumerate them — bring your own code list), cities and subdivisions, or looking a code up from its name.