{"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":"http://registry-npm.ywwl.com/redstd/download/redstd-1.0.2.tgz","fileCount":7,"unpackedSize":8303,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCDpJH6cC12SiAFimav37be7Mr0yCVlr4L7Nkp1Kh0NOAIhANdcf4xhJ6zcvqt134cCpHiTL5+OomAnCYrCxZeqJXmQ"}],"size":3953,"noattachment":false,"key":"/redstd/-/redstd-1.0.2.tgz"},"_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,"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","publish_time":1776262995375,"_cnpm_publish_time":1776262995375,"dist-tags":{"latest":"1.0.2"}}