1
Fork 0
href-plus/source/ts/utilities/debug.ts

14 lines
263 B
TypeScript
Raw Normal View History

2022-02-08 11:19:07 +00:00
export function isDebugEnabled(): boolean {
return window.localStorage.getItem('debug') === 'true';
}
export function debug(...args: any[]): void {
if (!isDebugEnabled()) {
return;
}
for (const argument of args) {
console.debug(argument);
}
}