From 5c3c66bd0611df7c494939df9f1be1fc1a454e90 Mon Sep 17 00:00:00 2001 From: chee Date: Sun, 23 Feb 2020 23:25:35 +0000 Subject: [PATCH] Remove unused utility functions --- util.js | 19 ------------------- util.ts | 17 ----------------- 2 files changed, 36 deletions(-) delete mode 100644 util.js delete mode 100644 util.ts diff --git a/util.js b/util.js deleted file mode 100644 index a7b4ee1..0000000 --- a/util.js +++ /dev/null @@ -1,19 +0,0 @@ -function hexpad(string, length, pad) { - if (length === void 0) { length = 2; } - if (pad === void 0) { pad = "0"; } - if (string.length > length) { - return String(string); - } - else { - length = length - string.length; - if (length > pad.length) { - for (var x = 0; x < length / pad.length; x++) { - pad += pad; - } - } - return pad.slice(0, length) + String(string); - } -} -function hexify(number) { - return hexpad(number.toString(16)); -} diff --git a/util.ts b/util.ts deleted file mode 100644 index 340f4c8..0000000 --- a/util.ts +++ /dev/null @@ -1,17 +0,0 @@ -function hexpad(string: string, length = 2, pad = "0") { - if (string.length > length) { - return String(string) - } else { - length = length - string.length - if (length > pad.length) { - for (let x = 0; x < length / pad.length; x++) { - pad += pad - } - } - return pad.slice(0, length) + String(string) - } -} - -function hexify (number: number) { - return hexpad(number.toString(16)) -}