# getNetwork

Source: https://pakdatakit.dev/api/typescript/networks/functions/getnetwork/

```ts
function getNetwork(phone): NetworkName;
```

Defined in: [networks.ts:39](https://github.com/chmuzamil/pakdatakit/blob/a6eeaa47381308c4e4fcda45b29642fe4fbfb1fc/src/networks.ts#L39)

Detects the mobile network for a Pakistani phone number based on its prefix.

Returns the network the prefix was originally allocated to. Due to Mobile
Number Portability (MNP) and operator mergers, the current carrier may differ.

## Parameters

| Parameter | Type | Description |
| :------ | :------ | :------ |
| `phone` | `string` | The phone number to look up |

## Returns

[`NetworkName`](https://pakdatakit.dev/api/typescript/networks/type-aliases/networkname/)

Network name or `"Unknown"` if the number is not a valid Pakistani mobile number
