A simple .then chaining
JavaScript
Switch branches/tags
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
.gitignore
History.md
Makefile
README.md
component.js
component.json
index.js
package.json
start.json

README.md

promisy

A simple .then chaining

Installation

npm

npm install promisy

component

component install shallker/promisy

Quick Start

var Promisy = require('promisy');
var promisy = new Promisy;

promisy(function (next) {
  console.log('first');
  next();
}).then(function (next) {
  console.log('then 1');
  setTimeout(function () {
    next();
  }, 1000);
}).then(function (next) {
  console.log('then 2')
  setTimeout(function () {
    next();
  }, 1000);
}).then(function (next) {
  console.log('then 3');
});

API

.then(Function next)

Test

Browser side
http://shallker.github.io/promisy/test/index.html
http://shallker.github.io/promisy/test/multi.html

License

MIT