{"name":"get-stdin","version":"0.1.0","description":"Easier stdin","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/get-stdin"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"echo unicorns | mocha"},"files":["index.js"],"keywords":["stdin","stdio","concat","buffer","stream"],"devDependencies":{"mocha":"*"},"bugs":{"url":"https://github.com/sindresorhus/get-stdin/issues"},"homepage":"https://github.com/sindresorhus/get-stdin","_id":"get-stdin@0.1.0","dist":{"shasum":"5998af24aafc802d15c82c685657eeb8b10d4a91","tarball":"http://registry-npm.ywwl.com/get-stdin/download/get-stdin-0.1.0.tgz","integrity":"sha512-/WBu3IaQZxE3bs3BhBmR10ipDY4pjN+U4EZgXULa1eqKA0B/Lka/MVoAqhTVYBkkRlCrEGDOU9itrzIgm9Ksng==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCmDx1eNDow57xLL2slf30BjsYOTg2ovY3uv9f4PEGCowIgIRB/ufdb389Sv5/QxPYDkT26QvmMJtbm0cvZ1rXPREo="}],"size":759,"noattachment":false,"key":"/get-stdin/-/get-stdin-0.1.0.tgz"},"_from":".","_npmVersion":"1.3.26","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"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":1392316528728,"_cnpm_publish_time":1392316528728,"dist-tags":{"latest":"10.0.0"}}