# getPostalCode

Source: https://pakdatakit.dev/api/typescript/postal/functions/getpostalcode/

```ts
function getPostalCode(city): string | null;
```

Defined in: [postal.ts:65](https://github.com/chmuzamil/pakdatakit/blob/a6eeaa47381308c4e4fcda45b29642fe4fbfb1fc/src/postal.ts#L65)

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.

## Parameters

| Parameter | Type | Description |
| :------ | :------ | :------ |
| `city` | `string` | City name to look up |

## Returns

`string` \| `null`

Postal code or `null` if not found
