mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
7 lines
249 B
TypeScript
7 lines
249 B
TypeScript
|
|
import type { ParamMatcher } from '@sveltejs/kit';
|
||
|
|
|
||
|
|
/* Returns true if the given param matches UUID format */
|
||
|
|
export const match: ParamMatcher = (param: string) => {
|
||
|
|
return /^[\dA-Fa-f]{8}(?:\b-[\dA-Fa-f]{4}){3}\b-[\dA-Fa-f]{12}$/.test(param);
|
||
|
|
};
|