Skip to content

Npm package for places including states, districts, and cities from Nepal.

License

Notifications You must be signed in to change notification settings

pracharya2601/np-places

Repository files navigation

Np Places

Build Status

MIT License

Npm module for getting state, district and city of Nepal.

Installation

Install my-project with npm or yarn

  npm install np-places
  yarn add np-places
  import places from "np-places"

  or

  const places = require("np-places")
    const district = places.districts

    Response:
    [
        'sindhuli',
        'Ramechhap',
        'Dolakha',
        'Bhaktapur',
        'Dhading',
        'Kathmandu',
        'Kavrepalanchok',
        'Lalitpur',
        'Nuwakot',
        .... more
    ]
    const state = places.state

    Response:
    [
        'Kathmandu Kshetra',
        'Arun Kshetra',
        'Janakpur Kshetra',
        'Gandak Kshetra',
        'Kapilavastu Kshetra',
        'Karnali Kshetra',
        'Mahakali Kshetra',
    ]
    const dsitrictFromState = places.districtList('Kathmandu Kshetra')

    Response: all the district form passed state.
    [
        'sindhuli',
        'Ramechhap',
        'Dolakha',
        'Bhaktapur',
        'Dhading',
        'Kathmandu',
        'Kavrepalanchok',
        'Lalitpur',
        'Nuwakot',
        'Rasuwa',
        'Sindupalchok',
        'Chitwan',
        'Makwanpur'
    ]

Run Locally

Clone the project

  git clone git@github.com:pracharya2601/np-places.git

Go to the project directory

  cd np-places

Install dependencies

  npm install

Running Tests

To run tests, run the following command

  npm run test

About

Npm package for places including states, districts, and cities from Nepal.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages