chain-of-promise

v1.0.1
Implementation of chain of responsibility pattern design with Promise ES6

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
})
npm i chain-of-promise

Metadata

  • MIT
  • >=4.2.0
  • Rémy MEJA
  • released 2/8/2016

Downloads

Maintainers