# cpcycle

> View Lifecycle events of child processes

Latest version **1.1.1** (published 2018-10-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install cpcycle
pnpm add cpcycle
yarn add cpcycle
bun add cpcycle
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2018-10-31 |
| First published | 2018-10-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 31.2 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Tony Mutai |
| Maintainers | lestoni |
| Keywords | child_process, spawn, fork, lifecycle |

## Links

- npm: https://www.npmjs.com/package/cpcycle
- Repository: https://github.com/lestoni/cpcycle
- Homepage: https://github.com/lestoni/cpcycle#readme
- Issues: https://github.com/lestoni/cpcycle/issues
- npm.io page: https://npm.io/package/cpcycle

## Dependencies (2)

- [moment](https://npm.io/package/moment.md) ^2.22.2
- [node-notifier](https://npm.io/package/node-notifier.md) ^5.3.0

## Recent versions

- 1.1.1 (latest) — 2018-10-31
- 1.1.0 — 2018-10-30
- 1.0.0 — 2018-10-30

## README

# cpcycle

Small Utility To Observe NodeJS Child Processes life cycle events using notifications.

![Notification Screenshot](https://raw.githubusercontent.com/lestoni/cpcycle/master/assets/notification.png)

## Usage

```
  npm i cpcycle
```

```
  const childProcess = require("child_process");
  const cpcycle = require("cpcycle")(/*Options*/);

  let shell = cpcycle(childProcess.spawn, /*Optional Name*/);

  shell("echo", ["it works"])
    .stdout.on("data", (data)=> {
      console.log(data.toString())
    })
```

## API

### CPCYCLE(/*Options = {}*/)

Initialize Cycple

Options

- `trace`: true/false - Turn on/off tracing
- `events`: ["Close", "Stdout"] - Events to track

### cpcycle(ChildProcess.Method, /*Optional name*/)

Wrap a child process method and pass an optional name to identify it via notification


## License

MIT

---
_Source: https://npm.io/package/cpcycle · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
