npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@innovayse/geo-atlas

v2.0.2

Published

Offline countries, states and cities with multilingual support (EN/RU/HY + 15 languages).

Readme

@innovayse/geo-atlas

Offline countries, states and cities database with complete multilingual support. Zero API calls — all data is bundled locally.

npm version npm downloads License: MIT

Features

  • 250 countries with ISO2/ISO3 codes, flags, phone codes, capitals, coordinates
  • 147,000+ cities across all countries with coordinates
  • Complete multilingual city names: English, Russian (ru), Armenian (hy) + 15 more languages
  • Country translations: all 250 countries translated to Russian and Armenian
  • Native script support for each city and country
  • Dual ESM + CJS build — works in browsers, Node.js, Nuxt 3, Vite
  • TypeScript — full type declarations included
  • Zero runtime dependencies — fully offline, no API calls

Installation

npm install @innovayse/geo-atlas

Usage

Get all countries

import { CountriesAtlas } from '@innovayse/geo-atlas'

const countries = CountriesAtlas.getCountries()
// [{ iso2: 'AM', name: 'Armenia', native: 'Հայաստան', emoji: '🇦🇲', phone: 374, ... }]

Find a country by ISO2

const armenia = CountriesAtlas.find('AM')
// { iso2: 'AM', name: 'Armenia', translations: { hy: 'Հայաստան', ru: 'Армения' }, ... }

Get states/regions — sync (Node.js / CJS)

const states = CountriesAtlas.getStates('AM')
// [{ name: 'Yerevan', cities: [...] }, ...]

Get states/regions — async (Browser / ESM)

getStatesAsync uses dynamic import() and works in all environments including browsers:

const states = await CountriesAtlas.getStatesAsync('AM')
// [{ name: 'Yerevan', cities: [...] }, ...]

Get cities

const cities = states[0].cities
// [{ name: 'Yerevan', native: 'Երևան', translations: { ru: 'Ереван', hy: 'Երևան' }, ... }]

City Translation Fields

Each city includes:

| Field | Description | Example | |-------|-------------|---------| | name | English name | "Yerevan" | | native | Native script | "Երևան" | | translations.ru | Russian | "Ереван" | | translations.hy | Armenian | "Երևան" | | translations.fr | French | "Erevan" | | translations.de | German | "Eriwan" | | translations.zh | Chinese | "埃里温" | | translations.ar | Arabic | "يريفان" |

Supported translation keys: ru, hy, uk, ar, zh, es, fr, de, it, pt, pl, tr, ja, ko, nl

Country Fields

type Country = {
  iso2: string        // 'AM'
  iso3: string        // 'ARM'
  name: string        // 'Armenia'
  native: string      // 'Հայաստան'
  emoji: string       // '🇦🇲'
  capital: string     // 'Yerevan'
  phone: number       // 374
  latitude: string    // '40.0'
  longitude: string   // '45.0'
  translations: {
    hy: string        // 'Հայաստան'
    ru: string        // 'Армения'
    // + 15 more languages
  }
  currency: string    // 'AMD'
  timezones: Timezone[]
}

Nuxt 3 / Vite Setup

To prevent esbuild from processing the large JSON data files (which causes OOM crashes), exclude the package from Vite's dependency optimization:

// nuxt.config.ts
export default defineNuxtConfig({
  vite: {
    optimizeDeps: {
      exclude: ['@innovayse/geo-atlas']
    }
  }
})

Then use getStatesAsync for browser-side city loading:

// composables/useCountries.ts
import { CountriesAtlas } from '@innovayse/geo-atlas'

// Async — works in browser (ESM dynamic import)
const cities = await CountriesAtlas.getStatesAsync('AM')

// Sync — works in Node.js / SSR only
const cities = CountriesAtlas.getStates('AM')

Multilingual Country/City Names

type GeoLocale = 'en' | 'ru' | 'hy'

/** Get localized country name with fallback chain */
function getCountryName(country: Country, locale: GeoLocale): string {
  if (locale === 'en') return country.name
  return country.translations?.[locale] ?? country.native ?? country.name
}

/** Get localized city name with fallback chain */
function getCityName(city: City, locale: GeoLocale): string {
  if (locale === 'en') return city.name
  return city.translations?.[locale] ?? city.native ?? city.name
}

Validation

import { ValidatorAtlas } from '@innovayse/geo-atlas'

ValidatorAtlas.isValidCountry('AM')            // true
ValidatorAtlas.isValidCountry('XX')            // false
ValidatorAtlas.isValidState('AM', 'Yerevan')   // true

License

MIT © Innovayse