New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

stream-line-dispatch

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stream-line-dispatch

A way to read lines from a stream and dispatch events based off of pattern matching of those strings.

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

Stream Line Dispatch

A way to read lines from a stream and dispatch events based off of pattern matching of those strings. Stream Line Dispatch is a stream transform, that does not transform data but analyses the data from a stream and allow for some simple event binding when data comes throught the pipe.

Install

npm install stream-line-dispatch

Usage

Example usage.

var 
spawn = require( 'child_process' ).spawn,
sld = require( 'stream-line-dispatch' ),
ssh = spawn( 'ssh', [ '-i', '~/.ssh/bar', '-tt', 'root@foo.com' ] ),
transform = sld( {
    output: process.stdout, // optional writable stream
    sendOutput: true // flag if to write to stream
});  

transform.on( '#$', function() { // terminal char aka ready for input
    ssh.stdin.write( 'exit \n' );
});

ssh.stdout.pipe( transform );

Keywords

stream

FAQs

Package last updated on 12 Oct 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts