Skip to content

extra-child-process 1.0.16

Install from the command line:
Learn more about npm packages
$ npm install @nodef/extra-child-process@1.0.16
Install via package.json:
"@nodef/extra-child-process": "1.0.16"

About this version

Useful additions to inbuilt child_process module.
πŸ“¦ Node.js, πŸ“œ Files, πŸ“° Docs, πŸ”Ž Survey.

Stability: Experimental.


const cp = require('extra-child-process');
// cp.exec(command, options)
// cp.execFile(file, args, options)

async function main() {
  // With Promise:
  var {stdout, stderr} = await cp.exec('ls -a', {cwd: '/home'});
  var {stdout, stderr} = await cp.execFile('ls', ['-a'], {cwd: '/home'});

  // Without Promise:
  cp.exec('ls -a', {cwd: '/home'}, (err, stdout, stderr) => 0);
  cp.execFile('ls', ['-a'], {cwd: '/home'}, (err, stdout, stderr) => 0);
}
main();


Index

Property Description
exec Execute a command within a shell, buffering any output.
execAsync Execute a command within a shell, buffering any output.
execFile Execute an executable without a shell by default, buffering any output.
execFileAsync Execute an executable without a shell by default, buffering any output.
spawnAsync Spawn new process using given command and arguments.


References



Details


Assets

  • extra-child-process-1.0.16-npm.tgz

Download activity

  • Total downloads 0
  • Last 30 days 0
  • Last week 0
  • Today 0