19 lines
279 B
JavaScript
Raw Normal View History

2022-02-04 10:05:16 +08:00
const DEBUG = true;
function toString(obj) {
2022-02-04 10:05:16 +08:00
if (!obj) {
return obj
}
if (typeof obj === 'string') {
return obj
}
2022-02-04 10:05:16 +08:00
return obj + '';
}
function debug(...data) {
if (DEBUG) {
console.debug(...data)
}
}
2022-02-04 10:05:16 +08:00
export {toString, debug};