From a383c334a2e4ccb246a4a1092b1d053ccad19bd7 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sun, 23 Jan 2022 14:06:14 +0100 Subject: ported everything to deno! yay --- source/client/helper.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/client/helper.ts') 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 { -- cgit v1.2.3-70-g09d2