# spawnback

> Simplified process spawning with buffered output in a callback

Latest version **1.0.1** (published 2020-04-25) · 0 weekly downloads

## Install

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

## 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.0.1 |
| Published | 2020-04-25 |
| First published | 2014-12-02 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Scott González |
| Maintainers | scott.gonzalez |

## Links

- npm: https://www.npmjs.com/package/spawnback
- Repository: https://github.com/scottgonzalez/spawnback
- Issues: https://github.com/scottgonzalez/spawnback/issues
- npm.io page: https://npm.io/package/spawnback

## Recent versions

- 1.0.1 (latest) — 2020-04-25
- 1.0.0 — 2014-12-02

## README

# spawnback

Simplified process spawning with buffered output in a callback.

Support this project by [donating on Gratipay](https://gratipay.com/scottgonzalez/).



## Installation

```
npm install spawnback
```



## Usage

```javascript
var spawn = require( "spawnback" );
spawn( "git", [ "status" ], function( error, stdout ) {
	console.log( stdout );
});
```

## API

spawnback follows the same API as node's built-in `child_process.spawn()`, but accepts a callback as the final parameter. The callback receives three paramaters: an error object, stdout as a string, and stderr as a string.

### spawnback( command, [args], [options], callback )

* `command` String: The command to run.
* `args` Array: List of string arguments.
* `options` Object: See the [node API docs](http://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) for full details on which options are supported.
* `callback` function( error, stdout, stderr ): A callback to invoke when the child process has ended and all stdio streams have terminated.
* return: [`ChildProcess`](http://nodejs.org/api/child_process.html#child_process_child_process) instance.



## License

Copyright 2014 Scott González. Released under the terms of the MIT license.

---

Support this project by [donating on Gratipay](https://gratipay.com/scottgonzalez/).

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