UNPKG

tus-js-client-stall-detection

Version:

A pure JavaScript client for the tus resumable upload protocol (fork with stall detection)

12 lines (9 loc) 244 B
let isEnabled = false // TODO: Replace this global state with an option for the Upload class export function enableDebugLog(): void { isEnabled = true } export function log(msg: string): void { if (!isEnabled) return console.log(msg) }