overleaf/services/web/frontend/js/utils/debugging.ts

8 lines
232 B
TypeScript
Raw Normal View History

type DebugConsole = { log(...data: any[]): void }
export const debugging =
new URLSearchParams(window.location.search).get('debug') === 'true'
export const debugConsole: DebugConsole = debugging
? console
: { log: () => {} }