cp-sugar
Some sugar for child_process module.
Install
npm install cp-sugar
API
.exec(cmd)
const exec = exec; ;
What's cool about it:
- Promise-based
- Trims stdout
.spawn(cmd, silent)
const spawn = spawn; ;
What's cool about it:
- Promise-based
- Accepts command string as
exec
instead of executable and array of args in the original implementation - Windows-frienldy
- Rejects on both error and non-zero exit code
- Has
silent
mode (ignore child's stdio)