Skip to content
Browse files

Added README

  • Loading branch information...
1 parent e00e462 commit fa8600a9c31dd2decd1dd64ded07a98c53bf2f3b Chakrit Wichian committed
Showing with 19 additions and 0 deletions.
  1. +19 −0 README.md
View
19 README.md
@@ -0,0 +1,19 @@
+JAM
+---
+
+JAM it together like `this`:
+
+ jam(function() { doYourThing(); this(); })
+ (function() { doOtherThingWithCallback(this); })
+ (function() { doOtherThingWithCallbackArgs(this); })
+ (function(result) { doNodeJsStuff(this); })
+ (function(err, result) { setTimeout(this, 3000); })
+ (function() { /* yay! we're done! */ });
+
+That is, the `this` object is the next function to be called. Use `this` when you need to pass a callback.
+
+You can even nest `JAM`s inside each other:
+
+ jam(function() { jam(function() { jam(function() { ....
+
+And the JAM chain would still execute correctly :)

0 comments on commit fa8600a

Please sign in to comment.
Something went wrong with that request. Please try again.