diff options
author | metamuffin <metamuffin@yandex.com> | 2022-01-23 14:06:14 +0100 |
---|---|---|
committer | metamuffin <metamuffin@yandex.com> | 2022-01-23 14:06:14 +0100 |
commit | a383c334a2e4ccb246a4a1092b1d053ccad19bd7 (patch) | |
tree | c747e39e25b94944da077df0a3ea20a2465540a8 /source/client/helper.ts | |
parent | 16fa95ac191287fe7f82b9f37c31342fe3b4b65a (diff) | |
download | keks-meet-a383c334a2e4ccb246a4a1092b1d053ccad19bd7.tar keks-meet-a383c334a2e4ccb246a4a1092b1d053ccad19bd7.tar.bz2 keks-meet-a383c334a2e4ccb246a4a1092b1d053ccad19bd7.tar.zst |
ported everything to deno! yay
Diffstat (limited to 'source/client/helper.ts')
-rw-r--r-- | source/client/helper.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/client/helper.ts b/source/client/helper.ts index 9fb4052..c46b169 100644 --- a/source/client/helper.ts +++ b/source/client/helper.ts @@ -1,4 +1,4 @@ -import { parameters } from "." +import { parameters } from "./index.ts" export function get_query_params(): { [key: string]: string } { const q: { [key: string]: string } = {} @@ -9,7 +9,7 @@ export function get_query_params(): { [key: string]: string } { return q } -export function hex_id(len: number = 8): string { +export function hex_id(len = 8): string { if (len > 8) return hex_id() + hex_id(len - 8) return Math.floor(Math.random() * 16 ** len).toString(16).padStart(len, "0") } @@ -21,7 +21,7 @@ export function parameter_bool(name: string, def: boolean): boolean { if (v == "0" || v == "false" || v == "no") return false if (v == "1" || v == "true" || v == "yes") return true alert(`parameter ${name} is invalid`) - return def + return def } export function parameter_number(name: string, def: number): number { |