aboutsummaryrefslogtreecommitdiffstats
path: root/apps/kit/src/params
diff options
context:
space:
mode:
Diffstat (limited to 'apps/kit/src/params')
-rw-r--r--apps/kit/src/params/guid.ts5
-rw-r--r--apps/kit/src/params/integer.ts3
2 files changed, 8 insertions, 0 deletions
diff --git a/apps/kit/src/params/guid.ts b/apps/kit/src/params/guid.ts
new file mode 100644
index 0000000..d8f7231
--- /dev/null
+++ b/apps/kit/src/params/guid.ts
@@ -0,0 +1,5 @@
+import {is_guid} from "$lib/helpers";
+
+export function match(param: string): boolean {
+ return is_guid(param);
+} \ No newline at end of file
diff --git a/apps/kit/src/params/integer.ts b/apps/kit/src/params/integer.ts
new file mode 100644
index 0000000..6e36cd8
--- /dev/null
+++ b/apps/kit/src/params/integer.ts
@@ -0,0 +1,3 @@
+export function match(param: string): boolean {
+ return /^\d+$/.test(param);
+} \ No newline at end of file