From d96e66311c947d11c04f763e4238410fe8181138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Murat=20Go=CC=88zel?= Date: Fri, 28 Apr 2023 14:55:06 +0300 Subject: [PATCH] optimized types for better performance --- docs/functions/src.castCityCode.html | 10 +++++----- docs/functions/src.castCityName.html | 10 +++++----- docs/functions/src.findClosestCities.html | 10 +++++----- docs/functions/src.findDistance.html | 10 +++++----- docs/functions/src.getCities.html | 10 +++++----- docs/functions/src.getCityCodes.html | 10 +++++----- docs/functions/src.getCityNames.html | 10 +++++----- .../src.getDistrictsAndNeighbourhoodsByCityCode.html | 10 +++++----- .../src.getDistrictsAndNeighbourhoodsOfEachCity.html | 10 +++++----- docs/functions/src.getDistrictsByCityCode.html | 10 +++++----- docs/functions/src.getDistrictsOfEachCity.html | 10 +++++----- .../src.getNeighbourhoodsByCityCodeAndDistrict.html | 10 +++++----- docs/functions/src.getPostalCodes.html | 10 +++++----- docs/functions/src.isArray.html | 10 +++++----- docs/functions/src.isCity.html | 10 +++++----- docs/functions/src.isCityCode.html | 10 +++++----- docs/functions/src.isCityCodeLike.html | 10 +++++----- docs/functions/src.isCityName.html | 10 +++++----- docs/functions/src.isCityNameLike.html | 10 +++++----- docs/functions/src.isObject.html | 10 +++++----- docs/functions/src.isPostalCode.html | 10 +++++----- docs/functions/types.castCityCode.html | 10 +++++----- docs/functions/types.castCityName.html | 10 +++++----- docs/functions/types.findClosestCities.html | 10 +++++----- docs/functions/types.findDistance.html | 10 +++++----- docs/functions/types.getCities.html | 10 +++++----- docs/functions/types.getCityCodes.html | 10 +++++----- docs/functions/types.getCityNames.html | 10 +++++----- ...ypes.getDistrictsAndNeighbourhoodsByCityCode.html | 10 +++++----- ...ypes.getDistrictsAndNeighbourhoodsOfEachCity.html | 10 +++++----- docs/functions/types.getDistrictsByCityCode.html | 10 +++++----- docs/functions/types.getDistrictsOfEachCity.html | 10 +++++----- ...types.getNeighbourhoodsByCityCodeAndDistrict.html | 10 +++++----- docs/functions/types.getPostalCodes.html | 10 +++++----- docs/functions/types.isCity.html | 10 +++++----- docs/functions/types.isCityCode.html | 10 +++++----- docs/functions/types.isCityCodeLike.html | 10 +++++----- docs/functions/types.isCityName.html | 10 +++++----- docs/functions/types.isCityNameLike.html | 10 +++++----- docs/functions/types.isPostalCode.html | 10 +++++----- docs/index.html | 10 +++++----- docs/modules.html | 8 ++++---- docs/modules/src.html | 10 +++++----- docs/modules/types.html | 10 +++++----- docs/types/types.City.html | 10 +++++----- docs/types/types.CityCode.html | 10 +++++----- docs/types/types.CityCodeDistrictMap.html | 10 +++++----- .../types.CityCodeDistrictNeighbourhoodsMap.html | 10 +++++----- docs/types/types.CityCodeNameMap.html | 10 +++++----- docs/types/types.CityListItem.html | 10 +++++----- docs/types/types.CityName.html | 10 +++++----- docs/types/types.DistanceChild.html | 10 +++++----- docs/types/types.Distances.html | 10 +++++----- docs/types/types.NeighbourhoodList.html | 12 ++++++------ docs/types/types.PostalCode.html | 10 +++++----- package.json | 2 +- setup/resources/neighbourhoods/index.js | 2 +- src/data/neighbourhoods/neighbourhoods.ts | 5 +---- storage/resources/neighbourhoods/etag | 2 +- types/index.d.ts | 2 +- 60 files changed, 280 insertions(+), 283 deletions(-) diff --git a/docs/functions/src.castCityCode.html b/docs/functions/src.castCityCode.html index f8546ee..cd0d2ec 100644 --- a/docs/functions/src.castCityCode.html +++ b/docs/functions/src.castCityCode.html @@ -1,4 +1,4 @@ -castCityCode | turkey-neighbourhoods - v3.0.6
+castCityCode | turkey-neighbourhoods - v3.0.7
  • Preparing search index...
  • -
  • The search index is not available
turkey-neighbourhoods - v3.0.6
+
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -27,7 +27,7 @@

    Parameters

    v: unknown

    Returns "" | "01" | "02" | "03" | "04" | "68" | "05" | "06" | "07" | "75" | "08" | "09" | "10" | "74" | "72" | "69" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "81" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31" | "76" | "32" | "34" | "35" | "46" | "78" | "70" | "36" | "37" | "38" | "71" | "39" | "40" | "79" | "41" | "42" | "43" | "44" | "45" | "47" | "33" | "48" | "49" | "50" | "51" | "52" | "80" | "53" | "54" | "55" | "56" | "57" | "58" | "63" | "73" | "59" | "60" | "61" | "62" | "64" | "65" | "77" | "66" | "67"

    +
  • Defined in src/index.ts:37
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -27,7 +27,7 @@

    Parameters

    v: unknown

    Returns "" | "Adana" | "Adıyaman" | "Afyonkarahisar" | "Ağrı" | "Aksaray" | "Amasya" | "Ankara" | "Antalya" | "Ardahan" | "Artvin" | "Aydın" | "Balıkesir" | "Bartın" | "Batman" | "Bayburt" | "Bilecik" | "Bingöl" | "Bitlis" | "Bolu" | "Burdur" | "Bursa" | "Çanakkale" | "Çankırı" | "Çorum" | "Denizli" | "Diyarbakır" | "Düzce" | "Edirne" | "Elazığ" | "Erzincan" | "Erzurum" | "Eskişehir" | "Gaziantep" | "Giresun" | "Gümüşhane" | "Hakkari" | "Hatay" | "Iğdır" | "Isparta" | "İstanbul" | "İzmir" | "Kahramanmaraş" | "Karabük" | "Karaman" | "Kars" | "Kastamonu" | "Kayseri" | "Kırıkkale" | "Kırklareli" | "Kırşehir" | "Kilis" | "Kocaeli" | "Konya" | "Kütahya" | "Malatya" | "Manisa" | "Mardin" | "Mersin" | "Muğla" | "Muş" | "Nevşehir" | "Niğde" | "Ordu" | "Osmaniye" | "Rize" | "Sakarya" | "Samsun" | "Siirt" | "Sinop" | "Sivas" | "Şanlıurfa" | "Şırnak" | "Tekirdağ" | "Tokat" | "Trabzon" | "Tunceli" | "Uşak" | "Van" | "Yalova" | "Yozgat" | "Zonguldak"

    +
  • Defined in src/index.ts:64
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -31,7 +31,7 @@
    threshold: numbernumber = 100

    Returns {
        code: "01" | "02" | "03" | "04" | "68" | "05" | "06" | "07" | "75" | "08" | "09" | "10" | "74" | "72" | "69" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "81" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31" | "76" | "32" | "34" | "35" | "46" | "78" | "70" | "36" | "37" | "38" | "71" | "39" | "40" | "79" | "41" | "42" | "43" | "44" | "45" | "47" | "33" | "48" | "49" | "50" | "51" | "52" | "80" | "53" | "54" | "55" | "56" | "57" | "58" | "63" | "73" | "59" | "60" | "61" | "62" | "64" | "65" | "77" | "66" | "67";
        distance: number;
    }[]

    +
  • Defined in src/index.ts:83
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -29,7 +29,7 @@
    code1: "01""01" | "02" | "03" | "04" | "68" | "05" | "06" | "07" | "75" | "08" | "09" | "10" | "74" | "72" | "69" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "81" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31" | "76" | "32" | "34" | "35" | "46" | "78" | "70" | "36" | "37" | "38" | "71" | "39" | "40" | "79" | "41" | "42" | "43" | "44" | "45" | "47" | "33" | "48" | "49" | "50" | "51" | "52" | "80" | "53" | "54" | "55" | "56" | "57" | "58" | "63" | "73" | "59" | "60" | "61" | "62" | "64" | "65" | "77" | "66" | "67"

    Returns undefined | number

    +
  • Defined in src/index.ts:72
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -22,7 +22,7 @@

    Function getCities

  • Returns CityListItem[]

  • +
  • Defined in src/index.ts:113
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -22,7 +22,7 @@

    Function getCityCodes

  • Returns ("01" | "02" | "03" | "04" | "68" | "05" | "06" | "07" | "75" | "08" | "09" | "10" | "74" | "72" | "69" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "81" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31" | "76" | "32" | "34" | "35" | "46" | "78" | "70" | "36" | "37" | "38" | "71" | "39" | "40" | "79" | "41" | "42" | "43" | "44" | "45" | "47" | "33" | "48" | "49" | "50" | "51" | "52" | "80" | "53" | "54" | "55" | "56" | "57" | "58" | "63" | "73" | "59" | "60" | "61" | "62" | "64" | "65" | "77" | "66" | "67")[]

  • +
  • Defined in src/index.ts:109
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -22,7 +22,7 @@

    Function getCityNames

  • Returns ("Adana" | "Adıyaman" | "Afyonkarahisar" | "Ağrı" | "Aksaray" | "Amasya" | "Ankara" | "Antalya" | "Ardahan" | "Artvin" | "Aydın" | "Balıkesir" | "Bartın" | "Batman" | "Bayburt" | "Bilecik" | "Bingöl" | "Bitlis" | "Bolu" | "Burdur" | "Bursa" | "Çanakkale" | "Çankırı" | "Çorum" | "Denizli" | "Diyarbakır" | "Düzce" | "Edirne" | "Elazığ" | "Erzincan" | "Erzurum" | "Eskişehir" | "Gaziantep" | "Giresun" | "Gümüşhane" | "Hakkari" | "Hatay" | "Iğdır" | "Isparta" | "İstanbul" | "İzmir" | "Kahramanmaraş" | "Karabük" | "Karaman" | "Kars" | "Kastamonu" | "Kayseri" | "Kırıkkale" | "Kırklareli" | "Kırşehir" | "Kilis" | "Kocaeli" | "Konya" | "Kütahya" | "Malatya" | "Manisa" | "Mardin" | "Mersin" | "Muğla" | "Muş" | "Nevşehir" | "Niğde" | "Ordu" | "Osmaniye" | "Rize" | "Sakarya" | "Samsun" | "Siirt" | "Sinop" | "Sivas" | "Şanlıurfa" | "Şırnak" | "Tekirdağ" | "Tokat" | "Trabzon" | "Tunceli" | "Uşak" | "Van" | "Yalova" | "Yozgat" | "Zonguldak")[]

  • +
  • Defined in src/index.ts:105
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -30,7 +30,7 @@

    Returns {
    [index: string]: string[]

    +
  • Defined in src/index.ts:133
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -22,7 +22,7 @@

    Function getDistrictsAndNeighbourhoodsOfEachCity

  • Returns CityCodeDistrictNeighbourhoodsMap

  • +
  • Defined in src/index.ts:137
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -27,7 +27,7 @@

    Parameters

    code: "01" | "02" | "03" | "04" | "68" | "05" | "06" | "07" | "75" | "08" | "09" | "10" | "74" | "72" | "69" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "81" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31" | "76" | "32" | "34" | "35" | "46" | "78" | "70" | "36" | "37" | "38" | "71" | "39" | "40" | "79" | "41" | "42" | "43" | "44" | "45" | "47" | "33" | "48" | "49" | "50" | "51" | "52" | "80" | "53" | "54" | "55" | "56" | "57" | "58" | "63" | "73" | "59" | "60" | "61" | "62" | "64" | "65" | "77" | "66" | "67"

    Returns string[]

    +
  • Defined in src/index.ts:125
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -22,7 +22,7 @@

    Function getDistrictsOfEachCity

  • Returns CityCodeDistrictMap

  • +
  • Defined in src/index.ts:129
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -29,7 +29,7 @@
    code: "01"string

    Returns string[]

    +
  • Defined in src/index.ts:141
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -22,7 +22,7 @@

    Function getPostalCodes

  • Returns string[]

  • +
  • Defined in src/index.ts:117
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -27,7 +27,7 @@

    Parameters

    v: unknown

    Returns v is any[]

    +
  • Defined in src/index.ts:15
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -27,7 +27,7 @@

    Parameters

    v: unknown

    Returns v is City

    +
  • Defined in src/index.ts:68
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -27,7 +27,7 @@

    Parameters

    v: unknown

    Returns v is "01" | "02" | "03" | "04" | "68" | "05" | "06" | "07" | "75" | "08" | "09" | "10" | "74" | "72" | "69" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "81" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31" | "76" | "32" | "34" | "35" | "46" | "78" | "70" | "36" | "37" | "38" | "71" | "39" | "40" | "79" | "41" | "42" | "43" | "44" | "45" | "47" | "33" | "48" | "49" | "50" | "51" | "52" | "80" | "53" | "54" | "55" | "56" | "57" | "58" | "63" | "73" | "59" | "60" | "61" | "62" | "64" | "65" | "77" | "66" | "67"

    +
  • Defined in src/index.ts:27
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -27,7 +27,7 @@

    Parameters

    v: unknown

    Returns boolean

    +
  • Defined in src/index.ts:31
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -27,7 +27,7 @@

    Parameters

    v: unknown

    Returns v is "Adana" | "Adıyaman" | "Afyonkarahisar" | "Ağrı" | "Aksaray" | "Amasya" | "Ankara" | "Antalya" | "Ardahan" | "Artvin" | "Aydın" | "Balıkesir" | "Bartın" | "Batman" | "Bayburt" | "Bilecik" | "Bingöl" | "Bitlis" | "Bolu" | "Burdur" | "Bursa" | "Çanakkale" | "Çankırı" | "Çorum" | "Denizli" | "Diyarbakır" | "Düzce" | "Edirne" | "Elazığ" | "Erzincan" | "Erzurum" | "Eskişehir" | "Gaziantep" | "Giresun" | "Gümüşhane" | "Hakkari" | "Hatay" | "Iğdır" | "Isparta" | "İstanbul" | "İzmir" | "Kahramanmaraş" | "Karabük" | "Karaman" | "Kars" | "Kastamonu" | "Kayseri" | "Kırıkkale" | "Kırklareli" | "Kırşehir" | "Kilis" | "Kocaeli" | "Konya" | "Kütahya" | "Malatya" | "Manisa" | "Mardin" | "Mersin" | "Muğla" | "Muş" | "Nevşehir" | "Niğde" | "Ordu" | "Osmaniye" | "Rize" | "Sakarya" | "Samsun" | "Siirt" | "Sinop" | "Sivas" | "Şanlıurfa" | "Şırnak" | "Tekirdağ" | "Tokat" | "Trabzon" | "Tunceli" | "Uşak" | "Van" | "Yalova" | "Yozgat" | "Zonguldak"

    +
  • Defined in src/index.ts:56
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -27,7 +27,7 @@

    Parameters

    v: unknown

    Returns boolean

    +
  • Defined in src/index.ts:60
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -27,7 +27,7 @@

    Parameters

    v: unknown

    Returns v is object

    +
  • Defined in src/index.ts:11
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -27,7 +27,7 @@

    Parameters

    v: unknown

    Returns v is string

    +
  • Defined in src/index.ts:121
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -27,7 +27,7 @@

    Parameters

    v: unknown

    Returns CityCode | ""

    +
  • Defined in types/index.d.ts:17
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -27,7 +27,7 @@

    Parameters

    v: unknown

    Returns CityName | ""

    +
  • Defined in types/index.d.ts:20
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7

    Returns {
        code:
    CityCode;
        distance: number;
    }[]

    +
  • Defined in types/index.d.ts:24
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7

    Returns number | undefined

    +
  • Defined in types/index.d.ts:23
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -22,7 +22,7 @@

    Function getCities

  • Returns CityListItem[]

  • +
  • Defined in types/index.d.ts:27
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -22,7 +22,7 @@

    Function getCityCodes

  • Returns CityCode[]

  • +
  • Defined in types/index.d.ts:26
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -22,7 +22,7 @@

    Function getCityNames

  • Returns CityName[]

  • +
  • Defined in types/index.d.ts:25
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -27,7 +27,7 @@

    Parameters

    city: "01" | "02" | "03" | "04" | "68" | "05" | "06" | "07" | "75" | "08" | "09" | "10" | "74" | "72" | "69" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "81" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31" | "76" | "32" | "34" | "35" | "46" | "78" | "70" | "36" | "37" | "38" | "71" | "39" | "40" | "79" | "41" | "42" | "43" | "44" | "45" | "47" | "33" | "48" | "49" | "50" | "51" | "52" | "80" | "53" | "54" | "55" | "56" | "57" | "58" | "63" | "73" | "59" | "60" | "61" | "62" | "64" | "65" | "77" | "66" | "67"

    Returns string[]

    +
  • Defined in types/index.d.ts:31
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -22,7 +22,7 @@

    Function getDistrictsAndNeighbourhoodsOfEachCity

  • Returns CityCodeDistrictNeighbourhoodsMap

  • +
  • Defined in types/index.d.ts:32
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -27,7 +27,7 @@

    Parameters

    city: "01" | "02" | "03" | "04" | "68" | "05" | "06" | "07" | "75" | "08" | "09" | "10" | "74" | "72" | "69" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "81" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31" | "76" | "32" | "34" | "35" | "46" | "78" | "70" | "36" | "37" | "38" | "71" | "39" | "40" | "79" | "41" | "42" | "43" | "44" | "45" | "47" | "33" | "48" | "49" | "50" | "51" | "52" | "80" | "53" | "54" | "55" | "56" | "57" | "58" | "63" | "73" | "59" | "60" | "61" | "62" | "64" | "65" | "77" | "66" | "67"

    Returns string[]

    +
  • Defined in types/index.d.ts:29
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -22,7 +22,7 @@

    Function getDistrictsOfEachCity

  • Returns CityCodeDistrictMap

  • +
  • Defined in types/index.d.ts:30
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -29,7 +29,7 @@
    code: "01"string

    Returns string[]

    +
  • Defined in types/index.d.ts:33
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -22,7 +22,7 @@

    Function getPostalCodes

  • Returns PostalCode[]

  • +
  • Defined in types/index.d.ts:28
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -27,7 +27,7 @@

    Parameters

    v: unknown

    Returns v is City

    +
  • Defined in types/index.d.ts:21
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -27,7 +27,7 @@

    Parameters

    v: unknown

    Returns v is "01" | "02" | "03" | "04" | "68" | "05" | "06" | "07" | "75" | "08" | "09" | "10" | "74" | "72" | "69" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "81" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31" | "76" | "32" | "34" | "35" | "46" | "78" | "70" | "36" | "37" | "38" | "71" | "39" | "40" | "79" | "41" | "42" | "43" | "44" | "45" | "47" | "33" | "48" | "49" | "50" | "51" | "52" | "80" | "53" | "54" | "55" | "56" | "57" | "58" | "63" | "73" | "59" | "60" | "61" | "62" | "64" | "65" | "77" | "66" | "67"

    +
  • Defined in types/index.d.ts:15
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -27,7 +27,7 @@

    Parameters

    v: unknown

    Returns boolean

    +
  • Defined in types/index.d.ts:16
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -27,7 +27,7 @@

    Parameters

    v: unknown

    Returns v is "Adana" | "Adıyaman" | "Afyonkarahisar" | "Ağrı" | "Aksaray" | "Amasya" | "Ankara" | "Antalya" | "Ardahan" | "Artvin" | "Aydın" | "Balıkesir" | "Bartın" | "Batman" | "Bayburt" | "Bilecik" | "Bingöl" | "Bitlis" | "Bolu" | "Burdur" | "Bursa" | "Çanakkale" | "Çankırı" | "Çorum" | "Denizli" | "Diyarbakır" | "Düzce" | "Edirne" | "Elazığ" | "Erzincan" | "Erzurum" | "Eskişehir" | "Gaziantep" | "Giresun" | "Gümüşhane" | "Hakkari" | "Hatay" | "Iğdır" | "Isparta" | "İstanbul" | "İzmir" | "Kahramanmaraş" | "Karabük" | "Karaman" | "Kars" | "Kastamonu" | "Kayseri" | "Kırıkkale" | "Kırklareli" | "Kırşehir" | "Kilis" | "Kocaeli" | "Konya" | "Kütahya" | "Malatya" | "Manisa" | "Mardin" | "Mersin" | "Muğla" | "Muş" | "Nevşehir" | "Niğde" | "Ordu" | "Osmaniye" | "Rize" | "Sakarya" | "Samsun" | "Siirt" | "Sinop" | "Sivas" | "Şanlıurfa" | "Şırnak" | "Tekirdağ" | "Tokat" | "Trabzon" | "Tunceli" | "Uşak" | "Van" | "Yalova" | "Yozgat" | "Zonguldak"

    +
  • Defined in types/index.d.ts:18
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -27,7 +27,7 @@

    Parameters

    v: unknown

    Returns boolean

    +
  • Defined in types/index.d.ts:19
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    @@ -27,7 +27,7 @@

    Parameters

    v: unknown

    Returns v is string

    +
  • Defined in types/index.d.ts:22
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    -

    turkey-neighbourhoods - v3.0.6

    +

    turkey-neighbourhoods - v3.0.7

    turkey-neighbourhoods

    @@ -41,7 +41,7 @@

    Usage

    The package contains large amount of data which is not suitable for browser environment. Benefit from tree-shaking might work if you are interested in small chunks of it.

    There are couple of methods to interact with the data:

    -
    import {isCityCode, isCityCodeLike, castCityCode, isCityName, isCityNameLike, castCityName,
    findDistance, findClosestCities} from 'turkey-neighbourhoods'

    isCityCode('01') // true
    isCityCode('82') // false
    isCityCode(1) // false
    isCityCodeLike(1) // true

    castCityCode(' 01 ') // "01"
    castCityCode('abc') // ""

    isCityName('İstanbul') // true
    isCityName('istanbul') // false, because city names are always title cased
    isCityNameLike('istanbul') // true

    castCityName('istanbul') // "İstanbul"

    getCityCodes() // ["01", "02", ... "67"] it is sorted by name, 81 in total
    getCityNames() // ["Adana", "Adıyaman", ... "Zonguldak"]
    getCities() // [{code: "01", name: "Adana"}, ... {code: "67", name: "Zonguldak"}]

    getPostalCodes() // ["01720", ... "67100"]
    isPostalCode('01720') // true

    getDistrictsByCityCode('16') // ["Büyükorhan", "Gemlik", "Gürsu", ... "Yıldırım"]
    getDistrictsOfEachCity() // {"16": ["Nilüfer", ...]}
    getDistrictsAndNeighbourhoodsByCityCode('16') // {"Büyükorhan": ["Akçasaz Mah", "Aktaş Mah", ...], "Gemlik": ["Adliye Mah", ...], ...}
    getDistrictsAndNeighbourhoodsOfEachCity() // {"16": {"Gemlik": ["Adliye Mah", ...] ...} ...}
    getNeighbourhoodsByCityCodeAndDistrict("16", "Nilüfer") // ["Alaaddinbey Mah", "Ataevler Mah" ...]

    // find distance between two cities in kilometers based on the roads
    findDistance('41', '16') // 131

    // find closest cities to a particular city, 200 km far at most and limit results to three
    findClosestCities('16', 200, 3) // [{code: '77', distance: 69}, ...] +
    import {isCityCode, isCityCodeLike, castCityCode, isCityName, isCityNameLike, castCityName,
    findDistance, findClosestCities} from 'turkey-neighbourhoods'

    isCityCode('01') // true
    isCityCode('82') // false
    isCityCode(1) // false
    isCityCodeLike(1) // true

    castCityCode(' 01 ') // "01"
    castCityCode('abc') // ""

    isCityName('İstanbul') // true
    isCityName('istanbul') // false, because city names are always title cased
    isCityNameLike('istanbul') // true

    castCityName('istanbul') // "İstanbul"

    getCityCodes() // ["01", "02", ... "67"] sorted by name, 81 in total
    getCityNames() // ["Adana", "Adıyaman", ... "Zonguldak"]
    getCities() // [{code: "01", name: "Adana"}, ... {code: "67", name: "Zonguldak"}]

    getPostalCodes() // ["01720", ... "67100"]
    isPostalCode('01720') // true

    getDistrictsByCityCode('16') // ["Büyükorhan", "Gemlik", "Gürsu", ... "Yıldırım"]
    getDistrictsOfEachCity() // {"16": ["Nilüfer", ...]}
    getDistrictsAndNeighbourhoodsByCityCode('16') // {"Büyükorhan": ["Akçasaz Mah", "Aktaş Mah", ...], "Gemlik": ["Adliye Mah", ...], ...}
    getDistrictsAndNeighbourhoodsOfEachCity() // {"16": {"Gemlik": ["Adliye Mah", ...] ...} ...}
    getNeighbourhoodsByCityCodeAndDistrict("16", "Nilüfer") // ["Alaaddinbey Mah", "Ataevler Mah" ...]

    // find distance between two cities in kilometers based on the roads
    findDistance('41', '16') // 131

    // find closest cities to a particular city, 200 km far at most and limit results to three
    findClosestCities('16', 200, 3) // [{code: '77', distance: 69}, ...]

    Have a look at the tests, types and source for more info.

    @@ -73,7 +73,7 @@

    Theme

    @@ -6,12 +6,12 @@
    turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    -

    turkey-neighbourhoods - v3.0.6

    +

    turkey-neighbourhoods - v3.0.7

    Index

    @@ -38,7 +38,7 @@

    Theme

    @@ -6,17 +6,17 @@ turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    +
  • Defined in src/index.ts:1
  • @@ -64,7 +64,7 @@

    Theme

    @@ -6,17 +6,17 @@
    turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    +
  • Defined in types/index.d.ts:1
  • @@ -76,7 +76,7 @@

    Theme

    @@ -6,19 +6,19 @@
    turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    CityCodeDistrictMap: CityCodeDistrictMap
    +
  • Defined in types/index.d.ts:6
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    CityCodeDistrictNeighbourhoodsMap: CityCodeDistrictNeighbourhoodsMap
    +
  • Defined in types/index.d.ts:7
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    CityCodeNameMap: CityCodeNameMap
    +
  • Defined in types/index.d.ts:5
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    CityListItem: CityListItem
    +
  • Defined in types/index.d.ts:4
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    DistanceChild: DistanceChild
    +
  • Defined in types/index.d.ts:9
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7
    -
    NeighbourhoodList: NeighbourhoodList
    +
  • Defined in types/index.d.ts:11
  • turkey-neighbourhoods - v3.0.6 +
  • The search index is not available
  • turkey-neighbourhoods - v3.0.7