JSPM

@kadoresmi00/turkey-cities-counties

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q39522F
  • License ISC

Turkey cities and counties

Package Exports

  • @kadoresmi00/turkey-cities-counties
  • @kadoresmi00/turkey-cities-counties/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@kadoresmi00/turkey-cities-counties) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

  Turkey Cities Counties

An easy module that gives detailed information about the province, district and in Turkey.

npm i @kadoresmi00/turkey-cities-counties

GitHub package.json version npm

Features:

  • Shows the provinces in detail. ✅
  • Shows the districts of the provinces.! ✅
  • Shows license plate code. ✅ -It gives brief information about the province. ✅

Usage

It's pretty self-explanatory… check out the examples below 😉

City detail: true

const { City } = require("@kadoresmi00/turkey-cities-counties")

const kado = new City({ detail: true });
let x = kado.allData()
console.log(x)
// all cities
/*
[{
    name: 'İstanbul',
    state: [
      'Esenyurt',      'Küçükçekmece', 'Bağcılar',
      'Pendik',        'Ümraniye',     'Bahçelievler',
      'Üsküdar',       'Sultangazi',   'Maltepe',
      'Gaziosmanpaşa', 'Kartal',       'Kadıköy',
      'Esenler',       'Kağıthane',    'Fatih',
      'Avcılar',       'Başakşehir',   'Ataşehir',
      'Sancaktepe',    'Eyüp',         'Sarıyer',
      'Beylikdüzü',    'Sultanbeyli',  'Güngören',
      'Zeytinburnu',   'Şişli',        'Bayrampaşa',
      'Arnavutköy',    'Tuzla',        'Çekmeköy',
      'Büyükçekmece',  'Beykoz',       'Beyoğlu',
      'Bakırköy',      'Silivri',      'Beşiktaş',
      'Çatalca',       'Şile',         'Adalar'
    ],
    numberPlate: '34',
    areaCode: '212-216',
    population: '15.067.724',
    area: 'Marmara',
    acreage: '5.461',
    malePopulationPercentage: '50,06%',
    femalePopulationPercentage: '49,94%'
  },
  ....
  ]

*/

City detail: false

const { City } = require("@kadoresmi00/turkey-cities-counties")

const kado = new City({ detail: false }); // 
let x = kado.allData()
console.log(x)
// all cities
/*
  [{
    name: 'Osmaniye',
    state: [
      'Merkez',
      'Kadirli',
      'Düziçi',
      'Bahçe',
      'Toprakkale',
      'Sumbas',
      'Hasanbeyli'
    ]
  },
  {
    name: 'Düzce',
    state: [
      'Merkez',   'Akçakoca',
      'Kaynaşlı', 'Gölyaka',
      'Çilimli',  'Yığılca',
      'Gümüşova', 'Cumayeri'
    ]
  },
  ......
]
*/

City Search detail: false

const { City } = require("@kadoresmi00/turkey-cities-counties")

const kado = new City({ detail: false }); 
let x = kado.findCity('Ankara')
console.log(x)
/*
{
  name: 'Ankara',
  state: [
    'Çankaya',         'Keçiören',
    'Yenimahalle',     'Mamak',
    'Etimesgut',       'Sincan',
    'Altındağ',        'Pursaklar',
    'Gölbaşı',         'Polatlı',
    'Çubuk',           'Kahramankazan',
    'Beypazarı',       'Haymana',
    'Elmadağ',         'Akyurt',
    'Şereflikoçhisar', 'Bala',
    'Kızılcahamam',    'Nallıhan',
    'Ayaş',            'Çamlıdere',
    'Kalecik',         'Güdül',
    'Evren'
  ]
}
*/

City Search detail: true

const { City } = require("@kadoresmi00/turkey-cities-counties")

const kado = new City({ detail: true }); 
let x = kado.findCity('Ankara')
console.log(x)
/*
{
  name: 'Ankara',
  state: [
    'Çankaya',         'Keçiören',
    'Yenimahalle',     'Mamak',
    'Etimesgut',       'Sincan',
    'Altındağ',        'Pursaklar',
    'Gölbaşı',         'Polatlı',
    'Çubuk',           'Kahramankazan',
    'Beypazarı',       'Haymana',
    'Elmadağ',         'Akyurt',
    'Şereflikoçhisar', 'Bala',
    'Kızılcahamam',    'Nallıhan',
    'Ayaş',            'Çamlıdere',
    'Kalecik',         'Güdül',
    'Evren'
  ],
  numberPlate: '06',
  areaCode: '312',
  population: '5.503.985',
  area: 'İç Anadolu',
  acreage: '25.632',
  malePopulationPercentage: '49,58%',
  femalePopulationPercentage: '50,42%'
}
*/

City Number Plate

const { NumberPlate } = require("@kadoresmi00/turkey-cities-counties")

const kado = new NumberPlate(); 
let x = kado.allData()
console.log(x)
/*
[
  { name: 'Adana', numberPlate: ' 01' },
  { name: 'Adıyaman', numberPlate: '02' },
  { name: 'Afyonkarahisar', numberPlate: '03' },
  { name: 'Ağrı', numberPlate: '04' },
  { name: 'Amasya', numberPlate: '05' },
  { name: 'Ankara', numberPlate: '06' },
  ....
  ]
*/

City Number Plate Search

const { NumberPlate } = require("@kadoresmi00/turkey-cities-counties")

const kado = new NumberPlate(); 
let x = kado.findNumber(34) // number
console.log(x)
/*
 { name: 'İstanbul', numberPlate: '34' }
*/

Region Info

const { Region } = require("@kadoresmi00/turkey-cities-counties")

const kado = new Region(); 
let x = kado.allData() 
console.log(x)
/*
 [{
  marmara: [
    'Balıkesir', 'Bilecik',
    'Bursa',     'Edirne',
    'İstanbul',  'Kırklareli',
    'Kocaeli',   'Sakarya',
    'Tekirdağ',  'Yalova'
  ],
  ege: [
    'Afyonkarahisar',
    'Aydın',
    'Çanakkale',
    'Denizli',
    'İzmir',
    'Manisa',
    'Muğla',
    'Uşak'
  ],
  .....
  }]
*/

Region Info Search

const { Region } = require("@kadoresmi00/turkey-cities-counties")

const kado = new Region(); 
let x = kado.find("Akdeniz")
console.log(x)
/*
[
  'Adana',
  'Antalya',
  'Burdur',
  'Isparta',
  'Mersin',
  'Kahramanmaraş',
  'Osmaniye'
]
*/

City - Region Info Search

const { Region } = require("@kadoresmi00/turkey-cities-counties")

const kado = new Region(); 
let x = kado.findCity("İstanbul")
console.log(x)
/*
 { name: 'İstanbul', region: 'Marmara' }
*/

City İnfo

const { CityInfo } = require("@kadoresmi00/turkey-cities-counties")

const kado = new CityInfo(); 
let x = kado.findCityInfo("Ankara")
console.log(x)
/*
 {
  name: 'Ankara',
  info: "Bolu, Çankırı, Kırıkkale, Kırşehir, Aksaray, Konya ve Eskişehir illeri ile çevrili ve Türkiye'nin başkenti Ankara, Cumhuriyetin kuruluşundan bu yana hızla gelişme göstermiştir. Şehrin amblemi, Hitit uygarlığının da simgesi olan Hitit Güneş Kursu'dur."
}
*/

NPM

Link