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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@kadoresmi00/turkey-cities-counties

v1.0.1

Published

Turkey cities and counties

Downloads

22

Readme

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