# Url

TypeScript source: `utils/url.ts`

## Functions

### isElectron

Source: `utils/url.ts:19`

```ts
() => boolean
```

Detects whether the current runtime is Electron.

### parseUrl

Source: `utils/url.ts:7`

```ts
(pathname: string) => { basePath: string; page: string }
```

Parses a Viewer pathname into a base path and page id.

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `pathname` | `string` | Browser pathname to parse. |

#### Returns

Base path and normalized page id.
