npm.io
1.1.0 • Published 11 years ago

spawn-wait-for

Licence
ISC
Version
1.1.0
Deps
4
Vulns
0
Weekly
0

spawn-wait-for Build Status

Spawn and wait for the process to output a line that matches a regex.

Install

npm install --save spawn-wait-for

Usage

var spawnWaitFor = require('spawn-wait-for');

spawnWaitFor('fakeServer', /server is running/).then(function(obj) {
  obj = {
    process: Object, // a child process object,
    matches: Array, // the regex sub matches
    line: String // the line that matched
  };
});

Keywords