{"name":"get-stdin","version":"6.0.0","description":"Get stdin as a string or buffer","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/get-stdin.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava test.js test-buffer.js && echo unicorns | node test-real.js"},"files":["index.js"],"keywords":["std","stdin","stdio","concat","buffer","stream","process","read"],"devDependencies":{"ava":"*","xo":"*"},"gitHead":"83c5c9f9059f0a66a6c9acef03c19546e2cb175b","bugs":{"url":"https://github.com/sindresorhus/get-stdin/issues"},"homepage":"https://github.com/sindresorhus/get-stdin#readme","_id":"get-stdin@6.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==","shasum":"9e09bf712b360ab9225e812048f71fde9c89657b","tarball":"http://registry-npm.ywwl.com/get-stdin/download/get-stdin-6.0.0.tgz","fileCount":4,"unpackedSize":3503,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCP8MiTaaK31/isHZleyvD33iwACWRmrpDyR568JCTFCwIgcqeKRy8efsEYdE+9uJdMiob7lF6v78D7Mad7fcXP/Ok="}],"size":1813,"noattachment":false,"key":"/get-stdin/-/get-stdin-6.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-stdin_6.0.0_1520014654678_0.24714662612043314"},"_hasShrinkwrap":false,"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":1520014654787,"_cnpm_publish_time":1520014654787,"dist-tags":{"latest":"10.0.0"}}