const stringToStream = require('string-to-stream') const ProcessStream = require('../') const ps = new ProcessStream() // This basically pipes the stream as-is to stdout // through multiple variations of process-streams // Temporary files for input and output stringToStream('hello\n') .pipe(ps.exec('cp ')) .pipe(ps.spawn('cp', ['', ''])) .pipe(ps.execFile('cp', ['', ''])) // Stream input, use temp-file for output .pipe(ps.spawn('tee', [''])) // Temp-file for input, Stream for output .pipe(ps.spawn('cat', [''])) // Pipe both sides .pipe(ps.spawn('cat')) // Result to stdout .pipe(process.stdout)