Comparing version 0.0.1 to 0.0.2
@@ -86,1 +86,3 @@ /* | ||
} | ||
module.exports = JSChain; |
@@ -10,3 +10,3 @@ { | ||
], | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"author": "Chunlong Liu <longbill.cn@gmail.com>", | ||
@@ -13,0 +13,0 @@ "engines": [ |
@@ -5,3 +5,32 @@ # Javascript Chain # | ||
## Install ## | ||
npm install jschain | ||
## Quick Start ## | ||
```javascript | ||
new JSChain( | ||
{ | ||
foo: function(next) | ||
{ | ||
console.log('foo'); | ||
setTimeout(next,1000); | ||
}, | ||
bar: function(a,b,next) | ||
{ | ||
console.log('bar: '+a+' '+b); | ||
setTimeout(next,1000); | ||
} | ||
}).foo().bar('hello','world').exec(function(next) | ||
{ | ||
console.log('cumtome function'); | ||
setTimeout(next,1000); | ||
}).exec(function() | ||
{ | ||
console.log('done'); | ||
}); | ||
``` | ||
## Background ## | ||
@@ -8,0 +37,0 @@ |
9726
159
175