Nonprofit Pizza Maker

    iran-city
    TypeScript icon, indicating that this package has built-in type declarations

    1.1.4 • Public • Published

    iran-city

    Installation

    npm install iran-city

    Usage example

        let iranCity = require('iran-city');
        let AllCities = iranCity.allCities();
        let AllProvinces = iranCity.allProvinces();
        let CitiesOfProvince = iranCity.citiesOfProvince(20);
        let SearchByName = iranCity.searchByName('کرمان');
        let CityByName = iranCity.cityByName('رفسنجان');
        let CityById = iranCity.cityById(766);

    Modules

        allCities() // will return an array of all cities
    
        allProvinces() // will return an array of all provinces
    
        citiesOfProvince(provinceID) // will return an array of all cities of a specific province by province id
    
        searchByName('province name') // will return an array of all cities of a specific province by province name
    
        cityByName('city name') // will return all city data by searching name of city
    
        cityById(cityID) // will return all city data by searching id of city
    • You can find examples in src/index.js

    • For make dist folder

    npx tsc --resolveJsonModule
    • For run index file
    node dist/src/index.js

    Install

    npm i iran-city

    DownloadsWeekly Downloads

    61

    Version

    1.1.4

    License

    ISC

    Unpacked Size

    161 kB

    Total Files

    12

    Last publish

    Collaborators

    • sajaddp
    • mohammad-hassani