Skip to content

sorribas/after-sequence

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

after-sequence

build status

Run several async functions and run a callback when they are gone.

Install

npm install after-sequence

Example

var afterSequence = require('after-sequence');

var next = afterSequence(function(err) {
  console.log('Done!');
});

next(function(cb) {
  setTimeout(function() {
    console.log('Hello');
    cb();
  }, 400);
});

next(function(cb) {
  setTimeout(function() {
    console.log('there');
    cb();
  }, 400);
});

next(function(cb) {
  setTimeout(function() {
    console.log('what\'s');
    cb();
  }, 400);
});

next(function(cb) {
  setTimeout(function() {
    console.log('up?');
    cb();
  }, 400);
});

License

MIT

About

Run several async functions and run a callback when they are gone.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published