@eolme/vma-router
Version:
Router for VK Mini Apps
25 lines (24 loc) • 463 B
JavaScript
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 };