# pull-spawn-process

> Use pull-streams with child_process.spawn stdio

Latest version **0.3.0** (published 2017-05-08) · 0 weekly downloads

## Install

```sh
npm install pull-spawn-process
pnpm add pull-spawn-process
yarn add pull-spawn-process
bun add pull-spawn-process
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2017-05-08 |
| First published | 2017-05-08 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jamen Marz |
| Maintainers | jamen |
| Keywords | jamen, pull-stream, child_process, spawn, process, pull-spawn-process |

## Links

- npm: https://www.npmjs.com/package/pull-spawn-process
- Repository: https://github.com/jamen/pull-spawn-process
- Homepage: https://github.com/jamen/pull-spawn-process#readme
- Issues: https://github.com/jamen/pull-spawn-process/issues
- npm.io page: https://npm.io/package/pull-spawn-process

## Dependencies (1)

- [stream-to-pull-stream](https://npm.io/package/stream-to-pull-stream.md) ^1.7.2

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 0.3.0 (latest) — 2017-05-08
- 0.2.0 — 2017-05-08
- 0.1.0 — 2017-05-08

## README

# pull-spawn-process

> Use pull-streams with `child_process.spawn` stdio

A convenient wrapper around [`child_process.spawn`]() for use with [`pull-stream`](https://github.com/pull-stream/pull-stream)

```js
var cat = spawn('cat', ['somefile.txt'])

// Read the process's stdout
pull(cat, drain(console.log))

// Write process stdin
pull(values(['foo', 'bar']), cat)
```

Returns a duplex stream with an additional `error` prop to handle `proc.stderr`.  The other child_process methods are available too.

## Install

```sh
npm install --save pull-spawn-process

# with yarn
yarn add pull-spawn-process
```

## Usage

### `spawn(command, args?, options?)`

The signature is the same as [`child_process.spawn`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options), except returns a duplex pull-stream.

```js
var cat = spawn('cat')
var echo = spawn('echo', ['foo', 'bar'])
var eslint = spawn('eslint', files, { stdio: 'inherit' })
```

The rest of the `ChildProcess` methods are exposed on the object

---

Maintained by [Jamen Marz](https://git.io/jamen) (See on [Twitter](https://twitter.com/jamenmarz) and [GitHub](https://github.com/jamen) for questions & updates)

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