# pull-stdio

> Stdio functions for pull streams.

Latest version **1.0.0** (published 2018-01-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install pull-stdio
pnpm add pull-stdio
yarn add pull-stdio
bun add pull-stdio
```

## 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.0 |
| Published | 2018-01-25 |
| First published | 2016-10-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Jamen Marz |
| Maintainers | jamen |
| Keywords | pull-stream, stdio, stdin, stdout, stderr, cli |

## Links

- npm: https://www.npmjs.com/package/pull-stdio
- Repository: https://github.com/jamen/pull-stdio
- Issues: https://github.com/jamen/pull-stdio/issues
- npm.io page: https://npm.io/package/pull-stdio

## Dependencies (1)

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

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2018-01-25
- 0.1.0 — 2016-11-08
- 0.0.0 — 2016-10-26

## README

# pull-stdio [![NPM version](https://badge.fury.io/js/pull-stdio.svg)](https://npmjs.org/package/pull-stdio) [![Build Status](https://travis-ci.org/jamen/pull-stdio.svg?branch=master)](https://travis-ci.org/jamen/pull-stdio)

> Stdio functions for pull streams.

```js
var { stdin, stdout, stderr } = require('pull-stdio')

pull(
  // Source stream for stdin
  stdin(),
  // Sink stream for stdout
  stdout()
)

// Also a sink stream for stderr
pull(
  pull.values(['Error', 'blahlbah']),
  stderr()
)
```

This module is a simple wrapper around [`stream-to-pull-stream`](https://npmjs.com/stream-to-pull-stream) on the native `process.stdio` streams.  If you have any further ideas for this module feel free to open an issue.

## Installation

```sh
$ npm install --save pull-stdio
```

## Usage

### `stdio.{method}`

The object which contains the stdio functions `stdin`, `stdout`, and `stderr` for pull streams.

#### Example

```js
var stdio = require('pull-stdio')

pull(
  stdio.stdin()
  // ...
)
```

### `stdin([options])`

A [source pull stream](https://github.com/pull-stream/pull-stream/blob/master/docs/glossary.md#source) for Node's `process.stdin`.

#### Options

 - `encoding` (`String`|`false`): Set the `process.stdin` encoding, or to `false`.  Defaults to `'utf8'`.

#### Example

```js
pull(
  stdin({ encoding: false }),
  // ...
)
```

### `stdout()`

A [sink stream](https://github.com/pull-stream/pull-stream/blob/master/docs/glossary.md#sink) for Node's `process.stdout`.

#### Example

```js
pull(
  // Source data somewhere
  // Output to stdout:
  stdout()
)
```

### `stderr()`

A [sink stream](https://github.com/pull-stream/pull-stream/blob/master/docs/glossary.md#sink) for Node's `process.stderr`.

#### Example

```js
pull(
  // Source data somewhere
  // Output to stderr:
  stderr()
)
```

## License

MIT © [Jamen Marz](https://github.com/jamen)

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