Skip to content

getPostalCode

function getPostalCode(city): string | null;

Defined in: postal.ts:65

Returns the primary postal code for a Pakistani city.

Matching is case-insensitive and whitespace-tolerant. When multiple postal codes exist, returns the primary GPO code.

Parameter Type Description
city string City name to look up

string | null

Postal code or null if not found