Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can do that with current ES transpilers:

    async read(connect, readMessage, print) {
        const sock = await connect('localhost', 7942),
              msg = await readMessage(sock);
        print(msg);
    }


You can do it now without a transpiler if you set harmony flags in Chrome/Node and use yield+co. (And just use a transpiler for deployment.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: