{"name":"get-stdin","version":"5.0.0","description":"Get stdin as a string or buffer","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/get-stdin"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.12.0"},"scripts":{"test":"xo && ava test.js test-buffer.js && echo unicorns | ava test-real.js"},"files":["index.js"],"keywords":["std","stdin","stdio","concat","buffer","stream","process","read"],"devDependencies":{"ava":"*","buffer-equals":"^1.0.3","xo":"*"},"gitHead":"3847c3da6c8c78b8edcc12dd41c8a754a92d664c","bugs":{"url":"https://github.com/sindresorhus/get-stdin/issues"},"homepage":"https://github.com/sindresorhus/get-stdin","_id":"get-stdin@5.0.0","_shasum":"92ac421f64f6c12a1f9612c092fbd661989272d3","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"92ac421f64f6c12a1f9612c092fbd661989272d3","tarball":"http://registry-npm.ywwl.com/get-stdin/download/get-stdin-5.0.0.tgz","integrity":"sha512-xzcsxi9QNQBW7xpU8s9Xf4BIqFpWvceS4Erl3tBTKrh2yvnnTm9WUd3P3cBYNXQuFiebaOGPyI5UyPH+vjezUQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD59OIrZPlQljGUarb4ZmTDxaMCZLw+ZR4GNQudD21v5QIgWg+4HAFXlDBSw2vVWBi1cGk8g9WKNJ3QwTD664xCqvY="}],"size":1707,"noattachment":false,"key":"/get-stdin/-/get-stdin-5.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"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":1441001199962,"_cnpm_publish_time":1441001199962,"dist-tags":{"latest":"10.0.0"}}