.. | |||
.index.js.swo | 7 years ago | ||
.npmignore | 7 years ago | ||
LICENSE | 7 years ago | ||
README.md | 7 years ago | ||
index.js | 7 years ago | ||
package.json | 7 years ago |
It's just a wrapper to build Stream transformers with functional style. It's like the koa / expressjs middlewares !
const ezs = require('ezs') ezs.use(require('ezs-basics')); process.stdin.resume(); process.stdin.setEncoding('utf8'); process.stdin .pipe(ezs('split', { delimiter: "\n" })) .pipe(ezs('counter')) .pipe(ezs(function(input, output) { output.send(input.toString(); }) .pipe(process.stdout);
With npm:
$ npm install ezs
Use mocha to run the tests.
$ npm install mocha $ mocha test
Converts a transform stream with existing function or adhoc function.
const ezs = require('ezs'), let trasnformer = ezs(function(input, output) { output.send(input.toString()) })
Each statement function have its own scope and can access to few methods :
Output object is an object with few methods :
Adding bundle of statements. see the avaible modules here : https://www.npmjs.com/browse/keyword/ezs
var ezs = require('ezs'), ezs.use(require('ezs-basics')); ezs.use(require('ezs-files'));