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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.2.0
    13
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.2.0
    13
  • 1.1.0
    1
  • 1.0.0
    1
  • 0.0.2
    1
  • 0.0.1
    1

Package Sidebar

Install

npm i promisy

Weekly Downloads

16

Version

1.2.0

License

MIT

Last publish

Collaborators

  • shallker-wang