flow control library for javascript