Socket
Socket
Sign inDemoInstall

spawndamnit

Package Overview
Dependencies
2
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    spawndamnit

Take care of your `spawn()`


Version published
Weekly downloads
706K
decreased by-0.71%
Maintainers
1
Install size
103 kB
Created
Weekly downloads
 

Readme

Source

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');
}

Keywords

FAQs

Last updated on 11 Apr 2018

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc