const transform = async (request, clientId) => { const [response, port] = await Promise.all([ fetch(request), getPortToWebWorkerFromClient(clientId) ]); return new Promise(async (resolve) => { port.onmessage = (msg) => { resolve(new Response([${msg.data.toString()}]
)); }; port.postMessage(await response.json()); }); };
@TRENTMWILLIS