Package Exports
- @do-kevin/pc-vn
- @do-kevin/pc-vn/dist/es/pc-vn.esm.js
- @do-kevin/pc-vn/dist/pc-vn.cjs.js
- @do-kevin/pc-vn/dist/pc-vn.umd.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@do-kevin/pc-vn) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@do-kevin/pc-vn
A small package that helps retrieve a list of Vietnam's provinces, districts, and wards.
Install
npm install @do-kevin/pc-vn
yarn install @do-kevin/pc-vnFunctions
| Function | Desciption |
|---|---|
| getProvinces() | Get all provinces |
| getDistricts() | Get all districts |
| getWards() | Get all wards |
| getDistrictsByProvinceCode(provinceCode) | Get districts by province code(from getProvinces()) |
| getWardsByDistrictCode(districtCode) | Get wards by district code(from getDistricts()) |
| getWardsByProvinceCode(provinceCode) | Get wards by province code(from getProvinces()) |
Usage
import {
getDistrictsByProvinceCode,
getProvinces,
getWardsByDistrictCode,
} from '@do-kevin/pc-vn';
const provinces = getProvinces();
const wards = getWardsByDistrictCode("268");
const districts = getDistrictsByProvinceCode("95");