npm.io
0.0.8 • Published 4 years ago

spawn-await

Licence
ISC
Version
0.0.8
Deps
0
Size
2 kB
Vulns
0
Weekly
0
Stars
1

spawn-await

spawn-await is synchronous module and will block the Node.js event loop, pausing execution of any additional code until the spawned process exits.

NOTE: don't need to await for using spawn

import {Spawn} from 'spawn-await'; 
  
const firstCommand = "ls"; // write your command
const {stdout, stderr, status } = Spawn(firstCommand);

Returns: <Object>

  • stdout The contents of output.
  • stderr The contents of output.
  • status | The exit code of the subprocess, or null if the subprocess terminated due to a signal.

Keywords