JSPM

childprocess-spawn-detached

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q30866F
  • License ISC

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

Package Exports

  • childprocess-spawn-detached
  • childprocess-spawn-detached/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (childprocess-spawn-detached) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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