Socket
Socket
Sign inDemoInstall

process-on-spawn

Package Overview
Dependencies
1
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

process-on-spawn

Execute callbacks when child processes are spawned


Version published
Maintainers
1
Weekly downloads
2,786,868
decreased by-5.21%

Weekly downloads

Readme

Source

process-on-spawn

Travis CI Greenkeeper badge NPM Version NPM Downloads MIT

Execute callbacks when child processes are spawned.

Usage

'use strict';

const processOnSpawn = require('process-on-spawn');
processOnSpawn.addListener(opts => {
  opts.env.CHILD_VARIABLE = 'value';
});

listener(opts)

  • options <Object>
    • execPath <string> The command to run.
    • args <string[]> Arguments of the child process.
    • cwd <string> Current working directory of the child process.
    • detached <boolean> The child will be prepared to run independently of its parent process.
    • uid <number> The user identity to be used by the child.
    • gid <number> The group identity to be used by the child.
    • windowsVerbatimArguments <boolean> No quoting or escaping of arguments will be done on Windows.
    • windowsHide <boolean> The subprocess console window that would normally be created on Windows systems will be hidden.

All properties except env are read-only.

processOnSpawn.addListener(listener)

Add a listener to be called after any listeners already attached.

processOnSpawn.prependListener(listener)

Insert a listener to be called before any listeners already attached.

processOnSpawn.removeListener(listener)

Remove the specified listener. If the listener was added multiple times only the first is removed.

processOnSpawn.removeAllListeners()

Remove all attached listeners.

FAQs

Last updated on 16 Dec 2019

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