0.1.1 • Published 8 years ago

fl0w v0.1.1

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

fl0w

Build Status

Flow control for Node streams.

Usage

npm install fl0w
// test.js
var _ = require('highland')
  , when = require('fl0w/when');

function length(s) {
  return s.trim().length;
}

_(process.stdin)
  .splitBy(' ')
  .through(when(length, {
    4: _().invoke('toUpperCase')
  }))
  .intersperse(' ')
  .pipe(process.stdout);
~ $ echo "My name is Luka" | node test.js
My NAME is LUKA