0.4.1 • Published 6 years ago

pea-js v0.4.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Pea

Pea is a middleware layer for web, inspired by the connect

Install

$ npm install pea-js

Example

import Pea from 'pea-js'

const ctrl = new Pea([function (next) {
  console.log('1')
  next()
}])
  .use(function (next) {
    console.log('2')
    // next(new Error('4'))
    // throw new Error('4')
    next()
  })
  .use(function (next) {
    console.log('3')
    next()
  })
  // error handling
  .use(function (err, next) {
    console.error(err)
  })
  .start()

License

MIT

0.4.1

6 years ago

0.4.0

6 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago