Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    untpublic

    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

    install

    npm i unt

    Downloadsweekly downloads

    28

    version

    0.0.5

    license

    MIT

    repository

    githubgithub

    last publish

    collaborators

    • avatar