Skip to content

extra-child-process 1.0.27

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

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.
whichSync Locate path of executable for given command.
whichAllSync Locate paths of all matching executables for given command.
whichAsync Locate path of executable for given command.
whichAllAsync Locate paths of all matching executables for given command.
which Locate path of executable for given command.
whichAll Locate paths of all matching executables for given command.


References



Details


Assets

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

Download activity

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