mm-states
v1.0.1
Published
Myanmar states and regions including township with postalcode(mm, en)
Maintainers
Readme
Myanmar Administrative Divisions
A comprehensive package providing Myanmar's states, regions, and townships data with postal codes.
Installation
npm install mm-statesUsage
JavaScript/TypeScript
import {
getAllStates,
getStateById,
getTownshipsByStateId,
getTownshipsByStateName
} from 'mm-states';
// Get all states/regions
const allStates = getAllStates();
// Get specific state by ID
const yangonState = getStateById('12');
// Get townships by state ID
const yangonTownships = getTownshipsByStateId('12');
// Get townships by state name (case insensitive)
const mandalayTownships = getTownshipsByStateName('mandalay');API Reference
getAllStates()
Returns an array of all states/regions with:
id: State code (01-15)name: English namemm_name: Myanmar namecapital: Capital citypostal_code_prefix: First 2 digits of postal codestype: "State" or "Region"area_sq_km: Area in square kilometerspopulation: Population count
getStateById(id: string)
Returns a single state object matching the ID (e.g., "12" for Yangon)
getTownshipsByStateId(stateId: string)
Returns an array of townships for the specified state ID. Each township contains:
name: English namemm_name: Myanmar namepostal_code: 5-digit postal codedistricts(for major cities): Array of districts with names and postal codes
getTownshipsByStateName(stateName: string)
Case-insensitive search for townships by state/region name
Data Structure
The package includes:
- All 7 states
- All 7 regions
- Naypyidaw Union Territory
- 330+ townships
- Postal codes for all major townships
- District breakdowns for Yangon and Mandalay
Contributing
Contributions are welcome! Please open an issue or PR for:
- Data corrections
- Additional township information
- New features
License
MIT © [Htet Aung]
