Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 2.04 KB

README.md

File metadata and controls

24 lines (16 loc) · 2.04 KB

generators-and-async

An introduction to how generators can be leveraged to flatten asynchronous code into a more manageable structure.

It comprises two basic exercises, the first of which illustrates how Promise-based code can be de-cluttered using generators to 'await' on promises. In the other example, we build our own miniature version of the library used in the first project (co) to understand how it actually works under the hood.

Prerequisites

In order to run the projects in this repo you'll need to have a version of node (>=4.0.0) installed (you can check your version by entering node -v in a command prompt). You can get the installer from here if you don't have node yet, or want to update.

You'll also need git (or a git client) to clone this repo.

Projects

Each folder contains a mini-project with it's own README which explains some of the concepts being illustrated, and how to complete each exercise, if you want to try it for yourself.

Completed versions of each of the projects will be found on the completed branch if you just want to skip to a finished version and look at, or play with, the code.

Project walkthroughs:

Further reading