promisy

1.2.0 • Public • Published

promisy

A simple .then chaining

Installation

npm

npm install promisy

component

component install shallker/promisy

Quick Start

var promisy = require('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/simple-test/promisy/index.html
http://shallker.github.io/simple-test/promisy/multi.html

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i promisy

Weekly Downloads

3

Version

1.2.0

License

MIT

Last publish

Collaborators

  • shallker-wang