GrassClipper/resources/js/debug.js
2022-05-07 20:49:45 -07:00

17 lines
372 B
JavaScript

const debug = {
log: async (...args) => {
const cfg = await getCfg()
if (cfg.debug) console.log('[DEBUG] ', ...args)
},
warn: async (...args) => {
const cfg = await getCfg()
if (cfg.debug) console.log('[WARNING] ', ...args)
},
error: async (...args) => {
const cfg = await getCfg()
if (cfg.debug) console.log('[ERROR] ', ...args)
}
}