{"_id":"get-stdin","_rev":"4138594","name":"get-stdin","description":"Get stdin as a string or Uint8Array","dist-tags":{"latest":"10.0.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2026-03-01T19:03:48.000Z","created":"2014-02-13T18:35:28.728Z","10.0.0":"2026-02-05T09:11:20.861Z","9.0.0":"2021-04-16T07:19:50.680Z","8.0.0":"2020-05-12T09:42:55.101Z","7.0.0":"2019-04-15T02:26:51.629Z","6.0.0":"2018-03-02T18:17:34.787Z","5.0.1":"2015-11-11T16:41:09.677Z","5.0.0":"2015-08-31T06:06:39.962Z","4.0.1":"2015-01-20T13:38:44.238Z","4.0.0":"2015-01-19T13:42:43.566Z","3.0.2":"2014-11-23T11:41:23.570Z","3.0.1":"2014-11-23T08:50:39.465Z","3.0.0":"2014-08-17T19:25:24.108Z","2.0.0":"2014-08-14T16:10:40.720Z","1.0.0":"2014-08-04T16:06:14.910Z","0.1.0":"2014-02-13T18:35:28.728Z"},"users":{"frankyonnetti":true,"allain":true,"recursion_excursion":true,"bencevans":true,"ahmed-dinar":true,"rocket0191":true,"django_wong":true,"s4j":true},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/get-stdin.git"},"versions":{"10.0.0":{"name":"get-stdin","version":"10.0.0","description":"Get stdin as a string or Uint8Array","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/get-stdin.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=20"},"scripts":{"test":"xo && node --test"},"keywords":["std","stdin","stdio","concat","buffer","stream","process","read"],"devDependencies":{"@types/node":"^25.2.0","delay":"^7.0.0","xo":"^1.2.3"},"gitHead":"14e9437c7de3764dae4d1a76b1987542fe1e2ee6","types":"./index.d.ts","_id":"get-stdin@10.0.0","bugs":{"url":"https://github.com/sindresorhus/get-stdin/issues"},"homepage":"https://github.com/sindresorhus/get-stdin#readme","_nodeVersion":"25.3.0","_npmVersion":"11.7.0","dist":{"shasum":"438ea93d028ae5f312e3a3af88c11d30dbcfc195","size":2889,"noattachment":false,"key":"/get-stdin/-/get-stdin-10.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-stdin/download/get-stdin-10.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/get-stdin_10.0.0_1770282680708_0.7252205690744893"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-02-05T09:11:20.861Z","publish_time":1770282680861,"_source_registry_name":"default","_cnpm_publish_time":1770282680861},"9.0.0":{"name":"get-stdin","version":"9.0.0","description":"Get stdin as a string or buffer","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/get-stdin.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"test":"xo && ava test.js test-buffer.js && echo unicorns | node test-real.js && tsd"},"keywords":["std","stdin","stdio","concat","buffer","stream","process","read"],"devDependencies":{"@types/node":"^14.14.41","ava":"^3.15.0","delay":"^5.0.0","tsd":"^0.14.0","xo":"^0.38.2"},"gitHead":"147d91ccdb23748b4655192781928df9f4fb4aee","bugs":{"url":"https://github.com/sindresorhus/get-stdin/issues"},"homepage":"https://github.com/sindresorhus/get-stdin#readme","_id":"get-stdin@9.0.0","_nodeVersion":"14.16.1","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"3983ff82e03d56f1b2ea0d3e60325f39d703a575","size":2180,"noattachment":false,"key":"/get-stdin/-/get-stdin-9.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-stdin/download/get-stdin-9.0.0.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-stdin_9.0.0_1618557590571_0.1768780156948493"},"_hasShrinkwrap":false,"publish_time":1618557590680,"_cnpm_publish_time":1618557590680},"8.0.0":{"name":"get-stdin","version":"8.0.0","description":"Get stdin as a string or buffer","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/get-stdin.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"engines":{"node":">=10"},"scripts":{"test":"xo && ava test.js test-buffer.js && echo unicorns | node test-real.js && tsd"},"keywords":["std","stdin","stdio","concat","buffer","stream","process","read"],"devDependencies":{"@types/node":"^13.13.5","ava":"^2.4.0","delay":"^4.2.0","tsd":"^0.11.0","xo":"^0.24.0"},"gitHead":"07288e101242054df3c197abc5559458af6c78ba","bugs":{"url":"https://github.com/sindresorhus/get-stdin/issues"},"homepage":"https://github.com/sindresorhus/get-stdin#readme","_id":"get-stdin@8.0.0","_nodeVersion":"10.20.1","_npmVersion":"6.14.5","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"cbad6a73feb75f6eeb22ba9e01f89aa28aa97a53","size":2235,"noattachment":false,"key":"/get-stdin/-/get-stdin-8.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-stdin/download/get-stdin-8.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-stdin_8.0.0_1589276574949_0.5740921557748735"},"_hasShrinkwrap":false,"publish_time":1589276575101,"_cnpm_publish_time":1589276575101},"7.0.0":{"name":"get-stdin","version":"7.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":">=8"},"scripts":{"test":"xo && ava test.js test-buffer.js && echo unicorns | node test-real.js && tsd"},"keywords":["std","stdin","stdio","concat","buffer","stream","process","read"],"devDependencies":{"@types/node":"^11.13.4","ava":"^1.4.1","delay":"^4.2.0","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"e30338537e55c6007ccb65df20fc3bf9b1d621dc","bugs":{"url":"https://github.com/sindresorhus/get-stdin/issues"},"homepage":"https://github.com/sindresorhus/get-stdin#readme","_id":"get-stdin@7.0.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"8d5de98f15171a125c5e516643c7a6d0ea8a96f6","size":2075,"noattachment":false,"key":"/get-stdin/-/get-stdin-7.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-stdin/download/get-stdin-7.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-stdin_7.0.0_1555295211509_0.18471910142202796"},"_hasShrinkwrap":false,"publish_time":1555295211629,"_cnpm_publish_time":1555295211629},"6.0.0":{"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":{"shasum":"9e09bf712b360ab9225e812048f71fde9c89657b","size":1813,"noattachment":false,"key":"/get-stdin/-/get-stdin-6.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-stdin/download/get-stdin-6.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-stdin_6.0.0_1520014654678_0.24714662612043314"},"_hasShrinkwrap":false,"publish_time":1520014654787,"_cnpm_publish_time":1520014654787},"5.0.1":{"name":"get-stdin","version":"5.0.1","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 && 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":"*"},"xo":{"ignores":["test.js"]},"gitHead":"496456754b3cf8faabd320181374ef0bdb664820","bugs":{"url":"https://github.com/sindresorhus/get-stdin/issues"},"homepage":"https://github.com/sindresorhus/get-stdin","_id":"get-stdin@5.0.1","_shasum":"122e161591e21ff4c52530305693f20e6393a398","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"122e161591e21ff4c52530305693f20e6393a398","size":1903,"noattachment":false,"key":"/get-stdin/-/get-stdin-5.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-stdin/download/get-stdin-5.0.1.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1447260069677,"_cnpm_publish_time":1447260069677,"_hasShrinkwrap":false},"5.0.0":{"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","size":1707,"noattachment":false,"key":"/get-stdin/-/get-stdin-5.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-stdin/download/get-stdin-5.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1441001199962,"_cnpm_publish_time":1441001199962,"_hasShrinkwrap":false},"4.0.1":{"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":""}],"dist":{"shasum":"b968c6b0a04384324902e8bf1a5df32579a450fe","size":978,"noattachment":false,"key":"/get-stdin/-/get-stdin-4.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-stdin/download/get-stdin-4.0.1.tgz"},"directories":{},"publish_time":1421761124238,"_cnpm_publish_time":1421761124238,"_hasShrinkwrap":false},"4.0.0":{"name":"get-stdin","version":"4.0.0","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":"9481e1bb73d7f3c77683526ed092295a5aed9e21","bugs":{"url":"https://github.com/sindresorhus/get-stdin/issues"},"homepage":"https://github.com/sindresorhus/get-stdin","_id":"get-stdin@4.0.0","_shasum":"ed997f6a9616103a6e4f230f60985b96d99e4938","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"ed997f6a9616103a6e4f230f60985b96d99e4938","size":967,"noattachment":false,"key":"/get-stdin/-/get-stdin-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-stdin/download/get-stdin-4.0.0.tgz"},"directories":{},"publish_time":1421674963566,"_cnpm_publish_time":1421674963566,"_hasShrinkwrap":false},"3.0.2":{"name":"get-stdin","version":"3.0.2","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 && echo unicorns | node test2.js"},"files":["index.js"],"keywords":["std","stdin","stdio","concat","buffer","stream","process","stream"],"devDependencies":{"ava":"0.0.4","buffer-equal":"0.0.1"},"gitHead":"e0fcd0d37027d6832011b4ee08ebb6b987dab4d6","bugs":{"url":"https://github.com/sindresorhus/get-stdin/issues"},"homepage":"https://github.com/sindresorhus/get-stdin","_id":"get-stdin@3.0.2","_shasum":"c1ced24b9039b38ded85bdf161e57713b6dd4abe","_from":".","_npmVersion":"2.1.5","_nodeVersion":"0.10.32","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"c1ced24b9039b38ded85bdf161e57713b6dd4abe","size":933,"noattachment":false,"key":"/get-stdin/-/get-stdin-3.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-stdin/download/get-stdin-3.0.2.tgz"},"directories":{},"publish_time":1416742883570,"_cnpm_publish_time":1416742883570,"_hasShrinkwrap":false},"3.0.1":{"name":"get-stdin","version":"3.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"},"files":["index.js"],"keywords":["std","stdin","stdio","concat","buffer","stream","process","stream"],"devDependencies":{"ava":"0.0.4","buffer-equal":"0.0.1"},"gitHead":"20ccfccaae13b8c2b92f6e42298f81915b2d74e3","bugs":{"url":"https://github.com/sindresorhus/get-stdin/issues"},"homepage":"https://github.com/sindresorhus/get-stdin","_id":"get-stdin@3.0.1","_shasum":"424900dd45819cc0d66ee51344234350a606c6a3","_from":".","_npmVersion":"2.1.5","_nodeVersion":"0.10.32","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"424900dd45819cc0d66ee51344234350a606c6a3","size":923,"noattachment":false,"key":"/get-stdin/-/get-stdin-3.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-stdin/download/get-stdin-3.0.1.tgz"},"directories":{},"publish_time":1416732639465,"_cnpm_publish_time":1416732639465,"_hasShrinkwrap":false},"3.0.0":{"name":"get-stdin","version":"3.0.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 | node test.js && echo unicorns | node test-buffer.js"},"files":["index.js"],"keywords":["std","stdin","stdio","concat","buffer","stream","process","stream"],"devDependencies":{"ava":"0.0.4","buffer-equal":"0.0.1"},"gitHead":"63ffcf5056f8fb74634e79d80581c94249bde14b","bugs":{"url":"https://github.com/sindresorhus/get-stdin/issues"},"homepage":"https://github.com/sindresorhus/get-stdin","_id":"get-stdin@3.0.0","_shasum":"f4e8c8fafabf875e6dfebffd3e057a3f8a53310f","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"f4e8c8fafabf875e6dfebffd3e057a3f8a53310f","size":891,"noattachment":false,"key":"/get-stdin/-/get-stdin-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-stdin/download/get-stdin-3.0.0.tgz"},"directories":{},"publish_time":1408303524108,"_cnpm_publish_time":1408303524108,"_hasShrinkwrap":false},"2.0.0":{"name":"get-stdin","version":"2.0.0","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":"echo unicorns | node test.js"},"files":["index.js"],"keywords":["std","stdin","stdio","concat","buffer","stream","process","stream"],"devDependencies":{"ava":"0.0.3","buffer-equal":"0.0.1"},"gitHead":"22fe6fcc0f2d1143a461c4f2b3c58c710d1829fa","bugs":{"url":"https://github.com/sindresorhus/get-stdin/issues"},"homepage":"https://github.com/sindresorhus/get-stdin","_id":"get-stdin@2.0.0","_shasum":"868c6d29a61b9e144d0cf52ca1a69420b89da9f2","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"868c6d29a61b9e144d0cf52ca1a69420b89da9f2","size":775,"noattachment":false,"key":"/get-stdin/-/get-stdin-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-stdin/download/get-stdin-2.0.0.tgz"},"directories":{},"publish_time":1408032640720,"_cnpm_publish_time":1408032640720,"_hasShrinkwrap":false},"1.0.0":{"name":"get-stdin","version":"1.0.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 | node test.js"},"files":["index.js"],"keywords":["std","stdin","stdio","concat","buffer","stream","process","stream"],"devDependencies":{"ava":"0.0.3"},"gitHead":"0932774723e6f0d56818927ddea5931462413c15","bugs":{"url":"https://github.com/sindresorhus/get-stdin/issues"},"homepage":"https://github.com/sindresorhus/get-stdin","_id":"get-stdin@1.0.0","_shasum":"00bd5a494c81c372f5629bea103bbffe7a1da3ce","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"00bd5a494c81c372f5629bea103bbffe7a1da3ce","size":767,"noattachment":false,"key":"/get-stdin/-/get-stdin-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-stdin/download/get-stdin-1.0.0.tgz"},"directories":{},"publish_time":1407168374910,"_cnpm_publish_time":1407168374910,"_hasShrinkwrap":false},"0.1.0":{"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","size":759,"noattachment":false,"key":"/get-stdin/-/get-stdin-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-stdin/download/get-stdin-0.1.0.tgz"},"_from":".","_npmVersion":"1.3.26","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1392316528728,"_cnpm_publish_time":1392316528728,"_hasShrinkwrap":false}},"readme":"# get-stdin\n\n> Get [stdin](https://nodejs.org/api/process.html#process_process_stdin) as a string or `Uint8Array`\n\n## Install\n\n```sh\nnpm 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\nRun the script with piped input:\n\n```\n$ echo unicorns | node example.js\nunicorns\n```\n\nOr run interactively by allowing TTY input and type input, then press Ctrl+D (Unix) or Ctrl+Z (Windows) to signal end of input:\n\n```js\n// example.js\nimport getStdin from 'get-stdin';\n\nconsole.log(await getStdin({allowTTY: true}));\n//=> 'unicorns'\n```\n\n```\n$ node example.js\nunicorns\n<Ctrl+D>\nunicorns\n```\n\n## API\n\nBoth methods return 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\nBy default, in a TTY context the promise resolves with an empty string or `Uint8Array`. This avoids hanging CLIs that only want piped input and lets them fall back to other input methods. An empty string or `Uint8Array` means no input was read. To read from a TTY, set `allowTTY: true` and explicitly close `stdin` (Ctrl+D on Unix, Ctrl+Z on Windows).\n\n### getStdin(options?)\n\nGet `stdin` as a `string`.\n\n#### options\n\nType: `object`\n\n##### allowTTY\n\nType: `boolean`\\\nDefault: `false`\n\nAllow reading from a TTY.\n\nUse this when you want interactive behavior like `cat` or other Unix filters that wait for EOF even without piped input. The default resolves immediately in a TTY to avoid hanging CLIs that only want piped input and lets them fall back to other input methods.\n\n##### stdin\n\nType: `Readable stream`\\\nDefault: `process.stdin`\n\nStream to read from.\n\nUseful for tests or to read from a custom stream.\n\n### getStdin.buffer(options?)\n\nGet `stdin` as a `Uint8Array`.\n\n#### options\n\nType: `object`\n\n##### allowTTY\n\nType: `boolean`\\\nDefault: `false`\n\nAllow reading from a TTY.\n\nUse this when you want interactive behavior like `cat` or other Unix filters that wait for EOF even without piped input. The default resolves immediately in a TTY to avoid hanging CLIs that only want piped input and lets them fall back to other input methods.\n\n##### stdin\n\nType: `Readable stream`\\\nDefault: `process.stdin`\n\nStream to read from.\n\nUseful for tests or to read from a custom stream.\n\n## Tip\n\nYou can now accomplish this natively in Node.js using [`streamConsumers.text()`](https://nodejs.org/api/webstreams.html#streamconsumerstextstream) or [`streamConsumers.buffer()`](https://nodejs.org/api/webstreams.html#streamconsumersbufferstream):\n\n```js\n// example.js\nimport {text} from 'node:stream/consumers';\n\nconsole.log(await text(process.stdin))\n//=> 'unicorns'\n````\n\n```\n$ echo unicorns | node example.js\nunicorns\n```\n\n## Related\n\n- [get-stream](https://github.com/sindresorhus/get-stream) - Get a stream as a string or buffer\n","_attachments":{},"homepage":"https://github.com/sindresorhus/get-stdin#readme","bugs":{"url":"https://github.com/sindresorhus/get-stdin/issues"},"license":"MIT"}