1// Shim for allowing async function creation via new Function
2const AsyncFunction = Object.getPrototypeOf(async function(){}).constructor;
3
4// Usage
5const fetchPage = new AsyncFunction("url", "return await fetch(url);");
6fetchPage("/").then(response => { ... });