0.1.6 • Published 4 years ago

unix-pipe v0.1.6

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

unix-pipe

Alternate interface to the posix-pipe package. Maybe some day I'll add a fallback for compatibility with other operating systems.

Usage

from test.usage.js:

var unixPipe = require('unix-pipe'), coll = require('collect-stream'),
  portal = unixPipe(), wormhole = unixPipe();

equal(typeof portal.rd.fd, 'number');
equal(typeof portal.wr.fd, 'number');
portal.wr.write('There will be cake!\n');

equal(typeof wormhole.output.fd, 'number');
equal(typeof wormhole.input.fd, 'number');
wormhole.input.write('omnom\n');

setTimeout(function () {
  portal.wr.end();
  wormhole.wr.end();
}, 50);

async.map([ portal.rd, wormhole.output ], coll, function verify(err, stuff) {
  equal(err, null);
  equal(stuff.map(String), [
    'There will be cake!\n',
    'omnom\n',
  ]);
  console.log("+OK usage test passed.");
});

Known issues

  • needs more/better tests and docs

 

License

ISC

0.1.4

4 years ago

0.1.3

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.2

4 years ago

0.1.1

7 years ago

0.1.0

7 years ago