Skip to content
Projekte

Über uns

A lightweight JavaScript and TypeScript package providing country, state, and city data with simple APIs.

Web- und App-Entwicklung

So werden diese Zahlen gemessen

Gemessener Sternzuwachs

in 24h
0
in 7 days
Verlauf wird gesammelt
in 15 days
Verlauf wird gesammelt
in 1 month
Verlauf wird gesammelt

Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.

README.md

Original

@sonojs/geo

Countries, states, and cities for JavaScript. Lazy-loaded shards, async API, TypeScript types.

Links

Install

npm install @sonojs/geo

Usage

import { getCountryByIso2, getCitiesByCountry } from "@sonojs/geo";

const country = await getCountryByIso2("JP");
const cities = await getCitiesByCountry("JP");

Browser or custom hosting:

import { configureGeo, getCountryByIso2 } from "@sonojs/geo";

configureGeo({
  dataBaseUrl: new URL("./node_modules/@sonojs/geo/data/", import.meta.url).href,
});

await getCountryByIso2("JP");

License

Package code: MIT (LICENSE). Geographic data: ODbL 1.0 (NOTICE.md, ODbL-1.0.txt) from dr5hn/countries-states-cities-database.

Ähnliche Projekte entdecken

Wird geladen…