diff options
| author | Elizabeth Alexander Hunt <me@liz.coffee> | 2025-05-10 16:57:03 -0700 |
|---|---|---|
| committer | Elizabeth Alexander Hunt <me@liz.coffee> | 2025-05-10 16:57:03 -0700 |
| commit | fa8f3f9465e87d499f7d6428323f496a884b7818 (patch) | |
| tree | ab477dfa52ef30282029c4f136bf605cb24d67a9 /utils/validate_identifier.ts | |
| download | ci-fa8f3f9465e87d499f7d6428323f496a884b7818.tar.gz ci-fa8f3f9465e87d499f7d6428323f496a884b7818.zip | |
initial commit
Diffstat (limited to 'utils/validate_identifier.ts')
| -rw-r--r-- | utils/validate_identifier.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/utils/validate_identifier.ts b/utils/validate_identifier.ts new file mode 100644 index 0000000..c8a5213 --- /dev/null +++ b/utils/validate_identifier.ts @@ -0,0 +1,3 @@ +export const validateIdentifier = (token: string) => { + return (/^[a-zA-Z0-9_\-:. ]+$/).test(token) && !token.includes(".."); +}; |
