unt

0.0.5 • Public • Published

unt

Expressive middleware for stream programming using generators Mostly inspired by koa-compose

Installation

npm install unt

Example

var unit = require('unt');
var app  = unit();


app.use(function *(next){
  var start = new Date;
  yield next;
  this.result.ms = new Date - start;
});


app.use(function *(){
  this.result.foo = 'bar';
});

// input = stream or nsq or kinesis
app.listen(input)

Running tests

npm test

Licence

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.5
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.5
    0
  • 0.0.4
    0
  • 0.0.3
    0
  • 0.0.2
    1
  • 0.0.1
    1

Package Sidebar

Install

npm i unt

Weekly Downloads

2

Version

0.0.5

License

MIT

Last publish

Collaborators

  • hden