JavaScript Function Queue

前端 未结 6 2114
小蘑菇
小蘑菇 2021-01-18 16:40

I have a ton of functions that need to run in succession, but not before the other has completed. What I need is a way to queue these functions to run only after the previou

6条回答
  •  天命终不由人
    2021-01-18 17:07

    Check out async.js - it provides a mechanism for chaining up functions so they execute asynchronously or one after another, with an excellent way to catch the results and/or errors from all the executed functions.

    https://github.com/caolan/async

提交回复
热议问题