Ward

getWards()

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

const wards = getWards();

getWardsByDistrictCode(districtCode)

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

const wards = getWardsByDistrictCode('712');

getWardsByProvinceCode(provinceCode)

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

const wards = getWardsByProvinceCode('72');

API

Function Description Parameter Type Result
getWards Retrieve lists of wards Ward[]
getWardsByDistrictCode Filter list of wards by district code. districtCode string Ward[]
getWardsByProvinceCode Filter list of wards by province code. provinceCode string Ward[]
Ward District & {   district_code: string;   district_name: string;   province_code: string;   province_name: string;   full_name: string; }