Created
October 25, 2010 15:23
-
-
Save alexbosworth/645123 to your computer and use it in GitHub Desktop.
Asynchronous Patterns For Node.JS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
** Steps ** | |
Problem: | |
Map asynchronous callbacks onto a multi-step process. | |
Centralize flow logic | |
object { | |
steps : [function, function, function] | |
advance : function() { this.shift(function)(); } | |
} | |
Call the advance method on the object when the function completes. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment