Socket
Book a DemoInstallSign in
Socket

childprocess-spawn-detached

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

childprocess-spawn-detached

A slightly more concise API for `child_process.spawn()`.

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

childprocess-spawn-detached

A slightly more concise API for child_process.spawn().

API

This module exports one function:

spawn(prog[, args][, opt])

Basically the same interface as child_process.spawn(), except:

  • When prog is false-y, do nothing and just return false.
    • This is meant to save you an if statement and repetition of the config lookup code when your program's config has an optional setting for a notification command. Example: spawn(process.env.coolserver_notify_listening);
  • opt.detached is true by default.
  • When opt.detached, a missing or false-y opt.stdio means 'ignore'.
  • When args is false-y, opt.shell defaults to true.

Known issues

  • Needs more/better tests and docs.

 

License

ISC

Keywords

child process

FAQs

Package last updated on 20 Jan 2024

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