Move an async function into its own thread.
A simplified single-function version of workerize.
The name is somewhat of a poor choice, but it was available on npm.
npm i -S greenletAccepts an async function with, produces a copy of it that runs within a Web Worker.
greenlet(Function) -> Function
import greenlet from 'greenlet'
let get = greenlet(async url => {
let res = await fetch(url)
return await res.json()
})
console.log(await get('/foo'))