Newbies Pass Muster

    @koax/ware

    1.0.0 • Public • Published

    ware

    Build status Git tag NPM version Code style

    `use` syntax for koax middleware

    Installation

    $ npm install @koax/ware
    

    Usage

    import ware from '@koax/ware'
    
    let app = ware()
    
    app.use(function * (action, next) {
      if (action === 'foo') return 'bar'
      return next()
    })
    
    app('foo').then((res) => res) // => 'bar'
    app('qux').then((res) => res) // => 'qux'

    API

    ware()

    Returns: dispatch function for koax middleware stack

    .use(fn)

    • fn - function to add to middleware stack

    Returns: dispatch function

    License

    MIT

    Keywords

    none

    Install

    npm i @koax/ware

    DownloadsWeekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • koax