aboutsummaryrefslogtreecommitdiff
path: root/src/util.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.ts')
-rw-r--r--src/util.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util.ts b/src/util.ts
index cc9cffb..facc425 100644
--- a/src/util.ts
+++ b/src/util.ts
@@ -82,4 +82,9 @@ export function colorCodeFromName(colorName: string): string {
export async function sleep(ms: number): Promise<void> {
await new Promise(resolve => setTimeout(resolve, ms))
+}
+
+/** Returns whether a string is a UUID4 (Minecraft uuid) */
+export function isUuid(string: string) {
+ return undashUuid(string).length === 32
} \ No newline at end of file