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

https://github.com/media-service-dev/process

Library to easier work with processes in node
https://github.com/media-service-dev/process

library nodejs process typescript

Last synced: 10 months ago
JSON representation

Library to easier work with processes in node

Awesome Lists containing this project

README

          

# @mscs/process

This is a library to handle child processes in typescript for node.

## Installation

```shell script
$ yarn add @mscs/process
```

## Usage

Short example:

```typescript
import { Process } from "@mscs/process";

async function runtime() {
const listDirectoryProcess = new Process(["ls", "-lar"]);
const exitCode = await listDirectoryProcess.run();

if(listDirectoryProcess.isSuccessful()){
const output = listDirectoryProcess.getOutput();
// ...
} else {
const output = listDirectoryProcess.getErrorOutput();
// ...
}
}

runtime().catch(error => {
console.log(error);
process.exit(1);
});
```

# Important note

Since *Symfony* is, for good reason, a registered trademark, please take note that we are in no way associated with [the Symfony brand](https://symfony.com/) or the [SensioLabs](https://sensiolabs.com/) organization.
Therefore, we don't represent or speak for any of them.