Web: add some handy debugging functions

This commit is contained in:
Sybren A. Stüvel 2022-04-15 18:00:01 +02:00
parent 4734e3c297
commit 64af9e4ae4
2 changed files with 4 additions and 0 deletions

View File

@ -65,6 +65,7 @@ function objectEmpty(o) {
if (!o) return true;
return Object.entries(o).length == 0;
}
window.objectEmpty = objectEmpty;
export default {
props: [

View File

@ -8,6 +8,9 @@ import router from './router'
import { DateTime } from 'luxon';
window.DateTime = DateTime;
// Help with debugging. This removes any Vue reactivity.
window.plain = (x) => { return JSON.parse(JSON.stringify(x)) };
const app = createApp(App)
app.use(router)
app.mount('#app')