0.1.0 • Published 4 months ago

childprocess-spawn-detached v0.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
4 months ago

childprocess-spawn-detached

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

API

This module exports one function:

spawn(prog, args)

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

0.1.0

4 months ago

0.0.0

4 months ago