Created
April 30, 2020 12:33
-
-
Save kirjavascript/0acdb1fa2d51f67a7b46fb8412adcb83 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r=(fn) => { | |
try { | |
return fn(); | |
} catch (e) { | |
// if (e instanceof ReferenceError) { | |
if (/^Re/.test(e+[])) { | |
globalThis[q=e.message.split` `[0]]=q; | |
return r(fn) | |
} else { | |
throw e; | |
} | |
} | |
} | |
(r=(t=>{try{return t``}catch(e){if(/^Re/.test(s=e+[]))return this[q=s.match(/ (\S+)/)[1]]=q,r(t)}}))( function() { return [hello, world] } ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment