Skip to content

Instantly share code, notes, and snippets.

@darscan
Created May 9, 2011 13:49
Show Gist options
  • Save darscan/962548 to your computer and use it in GitHub Desktop.
Save darscan/962548 to your computer and use it in GitHub Desktop.
And so I abandoned the Ruby to Node port after writing this:
Function.prototype.or = function(callback) {
var next = this;
return function(err, doc) {
if (err) {
callback(err, doc);
} else {
next(doc, callback);
}
};
};
@tschneidereit
Copy link

You should take a look at Spidernode in combination with task.js: Seamless async functions chaining using generators. See slides 37 to 39 of this presentation for details.

@darscan
Copy link
Author

darscan commented Jun 14, 2011

Thanks Till! I'd come across task.js, but not Spidernode. Will bookmark for future reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment