1.0.1 • Published 8 years ago

chain-of-promise v1.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
8 years ago

chain-of-promise

Implementation of chain of responsibility pattern design with Promise ES6

Install

npm install chain-of-promise

Usage

const Chain = require('chain-of-promise')

var chain = new Chain({hello: 'dude'})

chain.add((resolve, reject, context) => {
  // do Something with context and/or create a return value
})
chain.add((resolve, reject, context, data) => {
  // do Something with context and/or the data value
})
chain.start().then((data) => {
  // Lets finish with an ending function
})
1.0.1

8 years ago

1.0.0

8 years ago