deno-musings/test_changer.mjs
2024-10-11 13:04:47 -04:00

20 lines
527 B
JavaScript

export let changing = 42;
////////////////////////////////////////////
let ReImported = {};
const thisURL = new URL(import.meta.url)
const thisFile = thisURL.pathname;
if(!thisURL.search)
{
setInterval(()=>{
import(thisFile+"?"+Math.random()).then(module=>{
ReImported = module;
for(let key in module)
{
const statement = `${key}=ReImported.${key}`
eval(statement);
console.log(statement);
}
})
}, 3000);
}