Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sergioramos committed Oct 15, 2012
0 parents commit f514159
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.DS_Store
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.DS_Store
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "waterfall",
"version": "0.0.1",
"description": "async waterfall wrapper",
"main": "waterfall.js",
"repository": {
"type": "git",
"url": "https://github.com/ramitos/waterfall"
},
"author": "Sérgio Ramos <mail@sergioramos.me>",
"license": "MIT",
"dependencies": {
"async": "*"
}
}
16 changes: 16 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# waterfall

```js
var waterfall = require('waterfall')

var wf = waterfall()

wf.push(function (callback) {
console.log('first')
callback()
})

wf.callback(function () {
console.log('callback')
})
```js
14 changes: 14 additions & 0 deletions waterfall.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
var waterfall = require('async').waterfall

module.exports = function () {
var wf = new Array()

return {
callback: function (callback) {
waterfall(wf, callback)
},
push: function (fn) {
wf.push(fn)
}
}
}

0 comments on commit f514159

Please sign in to comment.