{"name":"get-stdin","version":"4.0.1","description":"Easier stdin","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/get-stdin"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js && node test-buffer.js && echo unicorns | node test-real.js"},"files":["index.js"],"keywords":["std","stdin","stdio","concat","buffer","stream","process","stream"],"devDependencies":{"ava":"0.0.4","buffer-equal":"0.0.1"},"gitHead":"65c744975229b25d6cc5c7546f49b6ad9099553f","bugs":{"url":"https://github.com/sindresorhus/get-stdin/issues"},"homepage":"https://github.com/sindresorhus/get-stdin","_id":"get-stdin@4.0.1","_shasum":"b968c6b0a04384324902e8bf1a5df32579a450fe","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"dist":{"shasum":"b968c6b0a04384324902e8bf1a5df32579a450fe","tarball":"http://registry-npm.ywwl.com/get-stdin/download/get-stdin-4.0.1.tgz","integrity":"sha512-F5aQMywwJ2n85s4hJPTT9RPxGmubonuB10MNYo17/xph174n2MIR33HRguhzVag10O/npM7SPk73LMZNP+FaWw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB1hK+9h0Ba/D3T93vLiJ3u0W3IJCgKX9f7yz9tOaQgZAiEAhmkyHndLZGrkpFhdHn5FWjcCdMV6xd0IHyxc7n8T04Y="}],"size":978,"noattachment":false,"key":"/get-stdin/-/get-stdin-4.0.1.tgz"},"directories":{},"readme":"# get-stdin\n\n> Get [stdin](https://nodejs.org/api/process.html#process_process_stdin) as a string or buffer\n\n## Install\n\n```\n$ npm install get-stdin\n```\n\n## Usage\n\n```js\n// example.js\nimport getStdin from 'get-stdin';\n\nconsole.log(await getStdin());\n//=> 'unicorns'\n```\n\n```\n$ echo unicorns | node example.js\nunicorns\n```\n\n## API\n\nBoth methods returns a promise that is resolved when the `end` event fires on the `stdin` stream, indicating that there is no more data to be read.\n\n### getStdin()\n\nGet `stdin` as a `string`.\n\nIn a TTY context, a promise that resolves to an empty `string` is returned.\n\n### getStdin.buffer()\n\nGet `stdin` as a `Buffer`.\n\nIn a TTY context, a promise that resolves to an empty `Buffer` is returned.\n\n## Related\n\n- [get-stream](https://github.com/sindresorhus/get-stream) - Get a stream as a string or buffer\n\n---\n\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-get-stdin?utm_source=npm-get-stdin&utm_medium=referral&utm_campaign=readme\">Get professional support for this package with a Tidelift subscription</a>\n\t</b>\n\t<br>\n\t<sub>\n\t\tTidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.\n\t</sub>\n</div>\n","publish_time":1421761124238,"_cnpm_publish_time":1421761124238,"dist-tags":{"latest":"10.0.0"}}