Sha256: 337197b8f15bbe4c358129613d4de52fa1ef94b1613fa9292c0cef9c167595ce

Contents?: true

Size: 571 Bytes

Versions: 64

Compression:

Stored size: 571 Bytes

Contents

# get-stdin [![Build Status](https://travis-ci.org/sindresorhus/get-stdin.svg?branch=master)](https://travis-ci.org/sindresorhus/get-stdin)

> Easier stdin


## Install

```sh
$ npm install --save get-stdin
```


## Usage

```js
// example.js
var stdin = require('get-stdin');

stdin(function (data) {
	console.log(data);
	//=> unicorns
});
```

```sh
$ echo unicorns | node example.js
unicorns
```


## API

### stdin(callback)

Get `stdin` as a string.

### stdin.buffer(callback)

Get `stdin` as a buffer.


## License

MIT © [Sindre Sorhus](http://sindresorhus.com)

Version data entries

64 entries across 50 versions & 20 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/get-stdin/readme.md
disco_app-0.18.0 test/dummy/node_modules/get-stdin/readme.md
disco_app-0.18.2 test/dummy/node_modules/get-stdin/readme.md
tang-0.2.1 spec/tang_app/node_modules/get-stdin/readme.md
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/get-stdin/readme.md
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/get-stdin/readme.md
ruby2js-4.0.4 lib/tasks/testrails/node_modules/get-stdin/readme.md
ruby2js-4.0.3 lib/tasks/testrails/node_modules/get-stdin/readme.md
tang-0.2.0 spec/tang_app/node_modules/get-stdin/readme.md
tang-0.1.0 spec/tang_app/node_modules/get-stdin/readme.md
tang-0.0.9 spec/tang_app/node_modules/get-stdin/readme.md
enju_library-0.3.8 spec/dummy/node_modules/get-stdin/readme.md
ilog-0.4.1 node_modules/get-stdin/readme.md
ilog-0.4.0 node_modules/get-stdin/readme.md
ilog-0.3.3 node_modules/get-stdin/readme.md
jester-data-8.0.0 node_modules/get-stdin/readme.md
ezii-os-5.2.1 node_modules/get-stdin/readme.md
ezii-os-2.0.1 node_modules/get-stdin/readme.md
ezii-os-1.1.0 node_modules/get-stdin/readme.md
ezii-os-1.0.0 node_modules/get-stdin/readme.md