highland-process
v1.0.5
Published
Utility that lets you turn a process into a highland stream.
Downloads
619
Readme
Highland Process
Turn a process into a highland stream or pipe through a process.
Install
npm install highland-process
Usage
var _ = require('highland');
var highlandProcess = require('highland-process');
var spawn = require('child_process').spawn;
var tee = spawn('tee');
var ls = spawn('ls');
_(['hello how are you?'])
.through(highlandProcess.through(tee))
.pull(function(error, value) {
// value is a buffer with "hello how are you?" that has been piped through tee
});
highlandProcess.from(ls)
.split()
.toArray(function(values) {
// each line of output from ls
});