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
gulp_assets-1.0.0.pre.3 template/node_modules/gulp-util/node_modules/dateformat/node_modules/meow/node_modules/indent-string/node_modules/get-stdin/readme.md
gulp_assets-1.0.0.pre.3 template/node_modules/gulp-rev-replace/node_modules/gulp-util/node_modules/dateformat/node_modules/meow/node_modules/indent-string/node_modules/get-stdin/readme.md
gulp_assets-1.0.0.pre.3 template/node_modules/babel-core/node_modules/detect-indent/node_modules/get-stdin/readme.md
gulp_assets-1.0.0.pre.3 template/node_modules/gulp-sass/node_modules/node-sass/node_modules/get-stdin/readme.md