highland-process

Utility that lets you turn a process into a highland stream.

Usage no npm install needed!

<script type="module">
  import highlandProcess from 'https://cdn.skypack.dev/highland-process';
</script>

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
});