diff options
author | mat <27899617+mat-1@users.noreply.github.com> | 2021-03-24 22:09:31 -0500 |
---|---|---|
committer | mat <27899617+mat-1@users.noreply.github.com> | 2021-03-24 22:09:31 -0500 |
commit | af8096ea8ab7c5570929608bb5662f938c0b65c0 (patch) | |
tree | fa4733e6a57ea0fed89d07d8472ef6a965dc4c39 /src/util.ts | |
parent | d45eb4378f32abc6e35d8a3f1a29b5fe3289c391 (diff) | |
download | skyblock-api-af8096ea8ab7c5570929608bb5662f938c0b65c0.tar.gz skyblock-api-af8096ea8ab7c5570929608bb5662f938c0b65c0.tar.bz2 skyblock-api-af8096ea8ab7c5570929608bb5662f938c0b65c0.zip |
improve mojang api to be much much faster
Diffstat (limited to 'src/util.ts')
-rw-r--r-- | src/util.ts | 5 |
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 |