District

getDistricts()

import { getDistricts } from '@do-kevin/pc-vn';

const districts = getDistricts();

getDistrictsByProvinceCode(provinceCode)

import { getDistrictsByProvinceCode } from '@do-kevin/pc-vn';

const districts = getDistrictsByProvinceCode('95');

API

Function Description Parameter Type Result
getDistricts Retrieve lists of districts. District[]
getDistrictsByProvinceCode Filter list of districts by province code. provinceCode string District[]
District Province & {   province_code: string;   province_name: string;   full_name: string; }