UNPKG

@eolme/vma-router

Version:
25 lines (24 loc) 463 B
let _config = { debug: false, positive: false }; const log = (...args) => { if (_config.debug) { console.log(...args); } }; const error = (...args) => { if (_config.positive) { console.error(...args); } else { throw new Error(args.join(' ')); } }; const configure = (config = {}) => { _config = { ..._config, ...config }; }; export { log, error, configure };