spawndamnit
Take care of your `spawn()`
Last updated 2 years ago by thejameskyle .
SEE LICENSE IN LICENSE · Repository · Bugs · Original npm · Tarball · package.json
$ npm install spawndamnit 
SYNC missed versions from official npm registry.

spawndamnit

Take care of your spawn()

Features

  • Returns an await-able promise
  • Collects stdout and stderr buffers
  • Emits events "stdout" and "stderr"
  • Automatically kills all spawn processes when parent process dies

Installation

yarn add spawndamnit

Usage

Basic:

const spawn = require('spawndamnit');

async function main() {
  let child = spawn('npm', ['star', 'spawndamnit']);

  child.on('stdout', data => console.log(data.toString()));
  child.on('stderr', data => console.error(data.toString()));

  let { code, stdout, stderr } = await child;

  console.log(code === 0 ? 'success' : 'error');
}

Current Tags

  • 3.0.1                                ...           latest (2 years ago)

3 Versions

  • 3.0.1                                ...           2 years ago
  • 2.0.0                                ...           9 years ago
  • 1.0.0                                ...           9 years ago
Maintainers (1)
Downloads
Total 10
Today 0
This Week 0
This Month 7
Last Day 0
Last Week 2
Last Month 0
Dependencies (2)
Dev Dependencies (3)

© 2010 - cnpmjs.org x YWFE | Home | YWFE