Skip to content

Wrap operating system commands with a duplex streams.

License

Notifications You must be signed in to change notification settings

catpea/munchhausen

Repository files navigation

munchhausen

Automatically wrap operating system commands with duplex streams.

Named after Baron Munchausen who pulled him self out of a lake by his own hair. muenchhausen.jpg

Usage

import { pipeline } from 'stream';
import munchhausen from 'munchhausen';
const {cat, grep} = munchhausen;
pipeline(

  ...await Promise.all([
    cat("package.json"),
    grep(echo("name"))
  ]),

  err => console.error
).once('readable', function () {
  console.log( this.read().toString()) //  "name": "munchhausen",\n
})

Credit

Artwork Public Domain

About

Wrap operating system commands with a duplex streams.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published