You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
idoctnef 52b63ee33a nodejs with express server, leapmotion for movement control, and threejs for 3d render 8 years ago
..
test nodejs with express server, leapmotion for movement control, and threejs for 3d render 8 years ago
.npmignore nodejs with express server, leapmotion for movement control, and threejs for 3d render 8 years ago
.travis.yml nodejs with express server, leapmotion for movement control, and threejs for 3d render 8 years ago
LICENCE nodejs with express server, leapmotion for movement control, and threejs for 3d render 8 years ago
README.md nodejs with express server, leapmotion for movement control, and threejs for 3d render 8 years ago
index.js nodejs with express server, leapmotion for movement control, and threejs for 3d render 8 years ago
package.json nodejs with express server, leapmotion for movement control, and threejs for 3d render 8 years ago

README.md

After Build Status

Invoke callback after n calls

Status: production ready

Example

var after = require("after")
    , next = after(3, logItWorks)

next()
next()
next() // it works

function logItWorks() {
    console.log("it works!")
}

Example with error handling

var after = require("after")
    , next = after(3, logError)

next()
next(new Error("oops")) // logs oops
next() // does nothing

function logError(err) {
    console.log(err)
}

After < 0.6.0

Older versions of after had iterators and flows in them.

These have been replaced with seperate modules

Installation

npm install after

Tests

npm test

Blog post

Examples :

Contributors

  • Raynos

MIT Licenced