|
@ -1,6 +1,6 @@ |
|
|
# get-stdin [![Build Status](https://travis-ci.org/sindresorhus/get-stdin.svg?branch=master)](https://travis-ci.org/sindresorhus/get-stdin) |
|
|
# get-stdin [![Build Status](https://travis-ci.org/sindresorhus/get-stdin.svg?branch=master)](https://travis-ci.org/sindresorhus/get-stdin) |
|
|
|
|
|
|
|
|
> Easier stdin |
|
|
> Get stdin as a string or buffer |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Install |
|
|
## Install |
|
@ -16,8 +16,8 @@ $ npm install --save get-stdin |
|
|
// example.js |
|
|
// example.js |
|
|
const stdin = require('get-stdin'); |
|
|
const stdin = require('get-stdin'); |
|
|
|
|
|
|
|
|
stdin.then(data => { |
|
|
stdin.then(x => { |
|
|
console.log(data); |
|
|
console.log(x); |
|
|
//=> 'unicorns' |
|
|
//=> 'unicorns' |
|
|
}); |
|
|
}); |
|
|
``` |
|
|
``` |
|
|