mirror of
https://github.com/seerr-team/seerr.git
synced 2026-04-17 22:07:59 -04:00
16 lines
281 B
TypeScript
16 lines
281 B
TypeScript
export function normalizeJellyfinGuid(
|
|
value: string | null | undefined
|
|
): string | null {
|
|
if (!value) {
|
|
return null;
|
|
}
|
|
|
|
const normalized = value.replace(/-/g, '').toLowerCase();
|
|
|
|
if (!/^[0-9a-f]{32}$/.test(normalized)) {
|
|
return null;
|
|
}
|
|
|
|
return normalized;
|
|
}
|