Myanmar states and regions including township with postalcode(mm, en)
npm install mm-statesbash
npm install mm-states
`
Usage
$3
`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
$3
Returns an array of all states/regions with:
- id: State code (01-15)
- name: English name
- mm_name: Myanmar name
- capital: Capital city
- postal_code_prefix: First 2 digits of postal codes
- type: "State" or "Region"
- area_sq_km: Area in square kilometers
- population: Population count
$3
Returns a single state object matching the ID (e.g., "12" for Yangon)
$3
Returns an array of townships for the specified state ID. Each township contains:
- name: English name
- mm_name: Myanmar name
- postal_code: 5-digit postal code
- districts` (for major cities): Array of districts with names and postal codes