You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
605 B
605 B
get-stdin
Get stdin as a string or buffer
Install
$ npm install --save get-stdin
Usage
// example.js
const stdin = require('get-stdin');
stdin.then(x => {
console.log(x);
//=> 'unicorns'
});
$ echo unicorns | node example.js
unicorns
API
stdin()
Get stdin
as a string.
Returns a promise.
stdin.buffer()
Get stdin
as a buffer.
Returns a promise.
License
MIT © Sindre Sorhus