spawn-await
TypeScript icon, indicating that this package has built-in type declarations

0.0.8 • Public • Published

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.

Package Sidebar

Install

npm i spawn-await

Weekly Downloads

1

Version

0.0.8

License

ISC

Unpacked Size

2.23 kB

Total Files

4

Last publish

Collaborators

  • yaserahmadi