2022-08-03 20:57:56 -04:00
|
|
|
function treeify(o) {
|
|
|
|
if (typeof(o) == 'object') {
|
|
|
|
return Object.fromEntries(Object.keys(o).map(x => [x, treeify(o[x])]));
|
|
|
|
} else if (typeof(o) == 'function') {
|
|
|
|
return 'function';
|
|
|
|
} else if (typeof(o) == 'string' || typeof(o) == 'number') {
|
|
|
|
return o;
|
|
|
|
}
|
|
|
|
}
|
2023-03-24 20:46:40 -04:00
|
|
|
app.setDocument(`<pre style="color:#fff">${JSON.stringify(treeify(globalThis), null, 2)}</pre>`);
|