let keys = Object.getOwnPropertyDescriptors(window)
let res = {};
for (const key in keys){
    console.log(key, keys[key])
    try {
                    let r = {}
    if (keys[key].value && typeof keys[key].value === 'function'){
        r['value'] = {type: 'function'};
    }
if (keys[key].value && typeof keys[key].value !== 'function'){
        r['value'] = {value: JSON.stringify(keys[key].value)};
    }
    if (keys[key].get){
        r['get'] = true;
    }
    if (keys[key].set){
        r['set'] = true;
    }
    res[key] = r;
    }catch(e){console.log('error',e)}
}
console.log(JSON.stringify(res))
