# spawndamnit

> Take care of your `spawn()`

Latest version **3.0.1** (published 2024-11-18) · SEE LICENSE IN LICENSE license · 0 weekly downloads

## Install

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

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

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

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.1 |
| Published | 2024-11-18 |
| First published | 2018-01-19 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN LICENSE |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 87 |
| Author | James Kyle |
| Maintainers | thejameskyle |
| Keywords | spawn, child, process, promise, async, cross-spawn |

## Links

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

## Dependencies (2)

- [cross-spawn](https://npm.io/package/cross-spawn.md) ^7.0.5
- [signal-exit](https://npm.io/package/signal-exit.md) ^4.0.1

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 3.0.1 (latest) — 2024-11-18
- 2.0.0 — 2018-04-11
- 1.0.0 — 2018-01-19

## README

# spawndamnit

> Take care of your `spawn()`

## Features

- Returns an `await`-able promise
- Collects `stdout` and `stderr` buffers
- Emits events "stdout" and "stderr"
- Automatically kills all spawn processes when parent process dies

## Installation

```sh
yarn add spawndamnit
```

## Usage

**Basic:**

```js
const spawn = require('spawndamnit');

async function main() {
  let child = spawn('npm', ['star', 'spawndamnit']);

  child.on('stdout', data => console.log(data.toString()));
  child.on('stderr', data => console.error(data.toString()));

  let { code, stdout, stderr } = await child;

  console.log(code === 0 ? 'success' : 'error');
}
```

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