@bangladeshi/bangladesh-address
Version:
A simple npm package for Bangladesh's administrative divisions, districts, upazilas, and metropolitan thanas.
25 lines (24 loc) • 889 B
TypeScript
import { DivisionName } from "../division/types/division-name";
/**
* Get all districts in a given division
* @param division - The division name
* @returns Array of district names in the division
*/
export declare const districtsOf: (division: DivisionName) => string[];
/**
* Get all districts in Bangladesh
* @returns Array of all district names (64 districts)
*/
export declare const allDistricts: () => string[];
/**
* Check if a name is a valid district
* @param name - The name to check
* @returns true if the name is a valid district, false otherwise
*/
export declare const isValidDistrict: (name: string) => boolean;
/**
* Get the division for a given district (reverse lookup)
* @param district - The district name
* @returns The division name if found, undefined otherwise
*/
export declare const getDivisionOfDistrict: (district: string) => string | undefined;