# getPhonePrefix

Source: https://pakdatakit.dev/api/typescript/phone/functions/getphoneprefix/

```ts
function getPhonePrefix(phone): string | null;
```

Defined in: [internal/phone-utils.ts:59](https://github.com/chmuzamil/pakdatakit/blob/a6eeaa47381308c4e4fcda45b29642fe4fbfb1fc/src/internal/phone-utils.ts#L59)

Returns the local Pakistani mobile prefix (`0XXX`) from a phone number.
Returns `null` when the phone cannot be normalized.

## Parameters

| Parameter | Type |
| :------ | :------ |
| `phone` | `string` |

## Returns

`string` \| `null`
