Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/danielberndt/exec

Wrap child_process.exec with Promise and add pretty output
https://github.com/danielberndt/exec

Last synced: 18 days ago
JSON representation

Wrap child_process.exec with Promise and add pretty output

Awesome Lists containing this project

README

        

# exec

promisifies `require("child_process").exec` and pretty-prints the output of stdout and stderr as data comes in.

## install

```
npm i @danielberndt/exec;
```

## usage examples:

```javascript
const result = await exec("ls -l");
```

```javascript
exec("ls -l doesntexist").catch(errCode => {
// do something with errCode
});
```