Turns async function into sync via JavaScript wrapper of Node event loop