项目作者: tdd

项目描述 :
A demo of various approaches to running async tasks in series, from plain callbacks to async-await
高级语言: JavaScript
项目地址: git://github.com/tdd/async-variations.git
创建时间: 2017-06-01T14:32:10Z
项目社区:https://github.com/tdd/async-variations

开源协议:MIT License

下载


async-variations

A demo of various approaches to running async tasks in series, from plain callbacks to async-await.

  1. Plain callbacks, using good ol’ callback hell :meh:
  2. Callbacks, flattened / made more manageable using Async.js
  3. Promise chain, using native ES2015 promise wrappers around the native callback-based API
  4. Promises as synchronous-looking serial code using ES2017’s async/await