# parseSlugRegistry

**Kind:** Function

**Source:** [`atloria-monorepo/apps/api/src/docs-repo/sidecar.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/apps/api/src/docs-repo/sidecar.ts#L190)

Parse an existing registry file; tolerate absent/corrupt input by starting empty. "Corrupt"
covers BOTH syntactic (bad JSON) AND structural (valid JSON, wrong shape) corruption: every
entry is COERCED to the expected shape so a hand-edited/partial-write/migration-renamed file
with, say, a missing `previousSlugs` can never make a later `[...entry.previousSlugs]` throw
and wedge the committer on every reconcile. A malformed entry is repaired, not trusted.

## Signature

```ts
function parseSlugRegistry(json: string | null | undefined): SlugRegistry
```

## Parameters

| Name | Type |
|---|---|
| `json` | `string | null | undefined` |

**Returns:** `SlugRegistry`
