diff options
Diffstat (limited to 'src/util/debug.ts')
| -rw-r--r-- | src/util/debug.ts | 8 |
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"]); |
