Skip to content
Territories of Indonesia
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data
models
.editorconfig
.gitignore
LICENSE
README.md
index.js
package.json

README.md

Indonesia

Territories of Indonesia

NPM Version NPM Downloads

  • 34 Provinces
  • 416 Regencies
  • 98 Cities
  • 514 Regencies and Cities

Installation

npm install --save indonesia

Usage

var indonesia = require('indonesia');

// Get all provinces
indonesia.getProvinces(function(res){
  console.log(res);
});

// Get province by name
indonesia.getProvince('aceh', function(res){
  console.log(res);
});

// Get province by name (include cities and regencies)
indonesia.getProvince('aceh', true, function(res){
  console.log(res);
});

// Search province
indonesia.searchProvince('riau', function(res){
  console.log(res);
});

// Get all cities and regencies
indonesia.getCities(function(res){
  console.log(res);
});

// Get city or regency by name
indonesia.getCity('kota ADMINISTRASI jAkArtA SElataN', function(res){
  console.log(res);
});

// Search city or regency
indonesia.searchCity('kota Bek', function(res){
  console.log(res);
});

To-do

Province

  • Get all provinces
  • Search province
  • Get province by name
  • Get province by name (include cities / regencies)
    • Aceh
    • Bali
    • Banten
    • Bengkulu
    • Gorontalo
    • Jakarta
    • Jambi
    • Jawa Barat
    • Jawa Tengah
    • Jawa Timur
    • Kalimantan Barat
    • Kalimantan Selatan
    • Kalimantan Tengah
    • Kalimantan Timur
    • Kalimantan Utara
    • Kepulauan Bangka Belitung
    • Kepulauan Riau
    • Lampung
    • Maluku
    • Maluku Utara
    • Nusa Tenggara Barat
    • Nusa Tenggara Timur
    • Papua
    • Papua Barat
    • Riau
    • Sulawesi Barat
    • Sulawesi Selatan
    • Sulawesi Tengah
    • Sulawesi Tenggara
    • Sulawesi Utara
    • Sumatera Barat
    • Sumatera Selatan
    • Sumatera Utara
    • Yogyakarta

City / Regency

  • Get all cities / regencies
  • Search city / regency
  • Get city / regency by name

Subdistrict (?)

Village (?)

License

MIT © Wahyu Kristianto

You can’t perform that action at this time.