Add logjam example
This commit is contained in:
19
examples/logjam/src/log.js
Normal file
19
examples/logjam/src/log.js
Normal file
@@ -0,0 +1,19 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
export function log(...args) {
|
||||
if (import.meta.env.MODE !== 'production') {
|
||||
console.log(...args);
|
||||
}
|
||||
}
|
||||
|
||||
log.error = function error(...args) {
|
||||
if (import.meta.env.MODE !== 'production') {
|
||||
console.log(...args);
|
||||
}
|
||||
};
|
||||
|
||||
log.warn = function warn(...args) {
|
||||
if (import.meta.env.MODE !== 'production') {
|
||||
console.warn(...args);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user