{"_id":"redstd","_rev":"3-79e9427f37c39a0165e6be7cb7af1a47","name":"redstd","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"redstd","version":"1.0.0","keywords":["commandline","pipe","stdin"],"author":{"url":"http://coderaiser.github.io/","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"redstd@1.0.0","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/redstd","bugs":{"url":"https://github.com/coderaiser/redstd/issues"},"dist":{"shasum":"b700ad623344c453408bf1c41c96d52f591329cd","tarball":"https://registry.npmjs.org/redstd/-/redstd-1.0.0.tgz","fileCount":6,"integrity":"sha512-mHASqjx44n6X5i16DiqJ/xIn2t8ye1tN9MUSprkNSRcqYCjE7+cTJJWni41ma4XAArH6sqHJzJ7wUZ4VjNxu4A==","signatures":[{"sig":"MEUCIBY0rJq7fMKJz/7Be8bIlQjJDQFDabxMw+VDmow3TDbKAiEA0BNsejoGeRF2fFQAzzIL+nt4JDlJL0FEmF1cjMjwA+c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8400},"main":"lib/redstd.js","type":"module","engines":{"node":">=22"},"scripts":{"lint":"madrun lint","test":"madrun test","hello":"madrun hello","report":"madrun report","prepare":"madrun prepare","watcher":"madrun watcher","coverage":"madrun coverage","fix:lint":"madrun fix:lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","watch:lint":"madrun watch:lint","watch:tape":"madrun watch:tape","watch:test":"madrun watch:test"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"repository":{"url":"git+https://github.com/coderaiser/redstd.git","type":"git"},"_npmVersion":"11.4.2","description":"read stin","directories":{},"_nodeVersion":"25.9.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.0.0","madrun":"^13.0.1","nodemon":"^3.0.1","redlint":"^6.0.0","runsome":"^1.0.0","superc8":"^12.2.4","supertape":"^12.0.0","eslint-plugin-putout":"^31.0.0","@putout/formatter-json":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/redstd_1.0.0_1776262303244_0.47774072187456484","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"redstd","version":"1.0.1","keywords":["commandline","pipe","stdin"],"author":{"url":"http://coderaiser.github.io/","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"redstd@1.0.1","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/redstd","bugs":{"url":"https://github.com/coderaiser/redstd/issues"},"dist":{"shasum":"25bf9fd32681fd8785cb8ee8a2551c43fbfddc2e","tarball":"https://registry.npmjs.org/redstd/-/redstd-1.0.1.tgz","fileCount":7,"integrity":"sha512-zQPwzGBwIOEJuzALtfp3c81ykmaV2pBeFwGMvZz0HLF/OtWoM9434qRbxazTYzVGthAv98knaqPWULEpCnXW7w==","signatures":[{"sig":"MEUCIBnCsBe/aN24JOV0Ibt7Vi5o6vWAVaBALQ9XSrUeXqN7AiEAonSwaBsklJ0fN6zVtV7KnIOnHRf7sicsWl0xTo7u+b4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8261},"main":"lib/redstd.js","type":"module","engines":{"node":">=22"},"gitHead":"118c947cd450f8999a1021085c3b019edc31cb7a","scripts":{"lint":"madrun lint","test":"madrun test","hello":"madrun hello","report":"madrun report","prepare":"madrun prepare","watcher":"madrun watcher","coverage":"madrun coverage","fix:lint":"madrun fix:lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","watch:lint":"madrun watch:lint","watch:tape":"madrun watch:tape","watch:test":"madrun watch:test"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"repository":{"url":"git+https://github.com/coderaiser/redstd.git","type":"git"},"_npmVersion":"11.4.2","description":"read stin","directories":{},"_nodeVersion":"25.9.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.0.0","madrun":"^13.0.1","nodemon":"^3.0.1","redlint":"^6.0.0","superc8":"^12.2.4","supertape":"^12.0.0","eslint-plugin-putout":"^31.0.0"},"_npmOperationalInternal":{"tmp":"tmp/redstd_1.0.1_1776262617829_0.7761995777855673","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"redstd","version":"1.0.2","description":"read stin","main":"lib/redstd.js","type":"module","scripts":{"lint":"madrun lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","fix:lint":"madrun fix:lint","test":"madrun test","watch:test":"madrun watch:test","watch:tape":"madrun watch:tape","watch:lint":"madrun watch:lint","watcher":"madrun watcher","coverage":"madrun coverage","report":"madrun report","hello":"madrun hello","prepare":"madrun prepare"},"repository":{"type":"git","url":"git+https://github.com/coderaiser/redstd.git"},"keywords":["commandline","pipe","stdin"],"author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"http://coderaiser.github.io/"},"bugs":{"url":"https://github.com/coderaiser/redstd/issues"},"homepage":"https://github.com/coderaiser/redstd","license":"MIT","engines":{"node":">=22"},"dependencies":{},"devDependencies":{"eslint":"^10.0.0","eslint-plugin-putout":"^31.0.0","madrun":"^13.0.1","nodemon":"^3.0.1","redlint":"^6.0.0","superc8":"^12.2.4","supertape":"^12.0.0"},"publishConfig":{"access":"public"},"_id":"redstd@1.0.2","gitHead":"0fe4d9c2aee099fd6f48b66fce198a70a52cf147","_nodeVersion":"25.9.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-s5Fh78Jh+g+UARkb972bsJzuYjgBUoEs/51ebXV8eensXzsF8kDzBdCDBX8psGBuC5+BNcqQtxXFJMbqc8zZgg==","shasum":"ff86e5394dcc54a29470f819e8567c38d6485b9f","tarball":"https://registry.npmjs.org/redstd/-/redstd-1.0.2.tgz","fileCount":7,"unpackedSize":8303,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCDpJH6cC12SiAFimav37be7Mr0yCVlr4L7Nkp1Kh0NOAIhANdcf4xhJ6zcvqt134cCpHiTL5+OomAnCYrCxZeqJXmQ"}]},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/redstd_1.0.2_1776262995231_0.9954458899592324"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-15T14:11:43.130Z","modified":"2026-04-15T14:23:15.478Z","1.0.0":"2026-04-15T14:11:43.385Z","1.0.1":"2026-04-15T14:16:58.002Z","1.0.2":"2026-04-15T14:23:15.375Z"},"bugs":{"url":"https://github.com/coderaiser/redstd/issues"},"author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"http://coderaiser.github.io/"},"license":"MIT","homepage":"https://github.com/coderaiser/redstd","keywords":["commandline","pipe","stdin"],"repository":{"type":"git","url":"git+https://github.com/coderaiser/redstd.git"},"description":"read stin","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"readme":"# redstd [![License][LicenseIMGURL]][LicenseURL] [![NPM version][NPMIMGURL]][NPMURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]\n\n[NPMURL]: https://npmjs.org/package/redstd \"npm\"\n[NPMIMGURL]: https://img.shields.io/npm/v/redstd.svg?style=flat\n[BuildStatusURL]: https://github.com/coderaiser/redstd/actions?query=workflow%3A%22Node+CI%22 \"Build Status\"\n[BuildStatusIMGURL]: https://github.com/coderaiser/redstd/workflows/Node%20CI/badge.svg\n[LicenseURL]: https://tldrlegal.com/license/mit-license \"MIT License\"\n[LicenseIMGURL]: https://img.shields.io/badge/license-MIT-317BF9.svg?style=flat\n[CoverageURL]: https://coveralls.io/github/coderaiser/redstd?branch=master\n[CoverageIMGURL]: https://coveralls.io/repos/coderaiser/redstd/badge.svg?branch=master&service=github\n\nRead `stdin` to have ability to use pipes like: `cat README.md | less` or\n\n```sh\ncat README.md | node -e \"const {readStdin} = await import('redstd'); console.log(await readStdin())\"\n```\n\nWhen you pass nothing to stdin - everything just works, so you can read from stdout or from file\n\n## Install\n\n```\nnpm i redstd\n```\n\n# Usage\n\n```js\nimport {readFile} from 'node:fs/promises';\nimport {readStdin} from 'redstd';\n\nconst input = await readStdin();\n\nif (!input) {\n    console.log(await readFile('./README.md'));\n    process.exit();\n}\n\nconsole.log(input);\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}