Control-flow library for asynchronous JavaScript