aboutsummaryrefslogtreecommitdiff
path: root/src/util/debug.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/debug.ts')
-rw-r--r--src/util/debug.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util/debug.ts b/src/util/debug.ts
new file mode 100644
index 0000000..e3b3a62
--- /dev/null
+++ b/src/util/debug.ts
@@ -0,0 +1,8 @@
+let flagEnabled = false;
+
+export const setDebugClicks = (on: boolean): void => {
+ flagEnabled = on;
+};
+
+export const debugClicksEnabled = (env: NodeJS.ProcessEnv = process.env): boolean =>
+ flagEnabled || Boolean(env["BH_DEBUG_CLICKS"]);