Npm module for getting state, district and city of Nepal.
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'
]
Clone the project
git clone git@github.com:pracharya2601/np-places.git
Go to the project directory
cd np-places
Install dependencies
npm install
To run tests, run the following command
npm run test