Proyek
Lihat di GitHub
SonoJS/SonoJS-geo
Tentang
A lightweight JavaScript and TypeScript package providing country, state, and city data with simple APIs.
Pengembangan web dan aplikasiPertumbuhan bintang terukur
- dalam 24 jam
- 0
- dalam 7 hari
- Mengumpulkan riwayat
- dalam 15 hari
- Mengumpulkan riwayat
- dalam 1 bulan
- Mengumpulkan riwayat
Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.
README.md
Asli@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.
Jelajahi proyek terkait
Memuat…