{"_id":"stdin-discarder","_rev":"6-e2a8a89eab76f0c5dfb4ebeed00b6735","name":"stdin-discarder","dist-tags":{"latest":"0.3.1"},"versions":{"0.1.0":{"name":"stdin-discarder","version":"0.1.0","keywords":["stdin","process","standard","discard","ignore","input"],"author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"stdin-discarder@0.1.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/stdin-discarder#readme","bugs":{"url":"https://github.com/sindresorhus/stdin-discarder/issues"},"dist":{"shasum":"22b3e400393a8e28ebf53f9958f3880622efde21","tarball":"https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.1.0.tgz","fileCount":5,"integrity":"sha512-xhV7w8S+bUwlPTb4bAOUQhv8/cSS5offJuX8GQGq32ONF0ZtDWKfkdomM3HMRA+LhX6um/FZ0COqlwsjD53LeQ==","signatures":[{"sig":"MEYCIQCWK5j1mrHZuGpTuWK5QskEuTvcbGX7FFqQkerspNNMFAIhAP4bLhsKSIeSe9sJPsHRGF3SEsjArZMI0N9zDRBwTkfA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi3/coACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpQFQ//XZvcfBE1ak7kiGU9VL3FoE4Rt/Abz136kA9reHoYMWDYmvpk\r\nMdmgPArCkFsSSt9DK0w4K0lIMCdurfjm/YnpiNbiXNGEgpDj2/c3ovn+Uta7\r\ny3R2SPfnmHQSBMvLLRv/ZgE4Cxs5q9VKqPhWxfA+onDfiMK8+gggDG1zb5C8\r\nd0uaRuZAiOBXs3T9ztvOWxdb7O7/caxCJuamEAJgcZT+d1HN+QVuybIlQUHD\r\nJt3B/HtJMbWiyVDLQYbGrvQu+Cf8tQWKujY++6S88UAULj2sUqQvLM1bwEYh\r\nRm0j+9SuyZzmtsSF5AQIflOXSaNDFrgBywPhD9UHNOdb+eQE5yx6NGBMviXl\r\nDpjWcb+sSQ7tVc7yudKbtruONeyHnV+lMn2J+2W62bF3OXUsx/OEfeAafZ2b\r\n5kpqZJ6RNrrZDbSVOZmySFv7dlUPVsSKs5TPQP9tQFiXA1JbMQU8NC/fA4AT\r\nVldod93mFIYGzG3EzFj3EyDRaHdGBsCZGMSVjGjB7Lh6m4v4ih2r87lT/+z3\r\nhd/P0H7IcRtKZtRPEtCQYgoBfHPJGWqPiZODrAaGC3QYdzzzy87zNIb60kLj\r\nEAsonswX1A5dFM1vINY+lqCMvY7FwYEBsn2VQYA/xIuDy36nPT6kCph+lDkz\r\nMOJTPOqJG/1hh/yVFv1C7jUFp/pD/Huk4f0=\r\n=8VhY\r\n-----END PGP SIGNATURE-----\r\n"},"type":"module","types":"./index.d.ts","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"exports":"./index.js","funding":"https://github.com/sponsors/sindresorhus","gitHead":"a367682430700a0528905b7dda045f1dbf87a3b8","scripts":{"test":"xo && ava && tsd"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/stdin-discarder.git","type":"git"},"_npmVersion":"8.3.2","description":"Discard stdin input except for Ctrl+C","directories":{},"_nodeVersion":"18.4.0","dependencies":{"bl":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^0.50.0","ava":"^4.3.0","tsd":"^0.21.0","hook-std":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stdin-discarder_0.1.0_1658844968168_0.28395172603421215","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"stdin-discarder","version":"0.2.0","keywords":["stdin","process","standard","discard","ignore","input"],"author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"stdin-discarder@0.2.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/stdin-discarder#readme","bugs":{"url":"https://github.com/sindresorhus/stdin-discarder/issues"},"dist":{"shasum":"97299ec59581dae5b9625a23b1d1fdf3b83a367e","tarball":"https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.2.0.tgz","fileCount":5,"integrity":"sha512-ZWOBlQfhYyLvTDu8BneHv0UZA2FhNEIyiwrzMjWahPNzdCeLsfN0ScqTZoAXFeUEmx/X/sHd7SW3x7WBV+f51A==","signatures":[{"sig":"MEYCIQDWzJ3R8w9Duvu3LM3mwEqLsmtb7GpBR9JFbQ6SoA+xIwIhAM7qybCoFMJW+S2vW+LW78WuAAXMSzXAUZ4OWh8YkHI4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3990},"type":"module","types":"./index.d.ts","engines":{"node":">=18"},"exports":{"types":"./index.d.ts","default":"./index.js"},"funding":"https://github.com/sponsors/sindresorhus","gitHead":"65f4ccf52e3950fe05d739cff72aa17b4465fd77","scripts":{"test":"xo && ava && tsd"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/stdin-discarder.git","type":"git"},"_npmVersion":"9.2.0","description":"Discard stdin input except for Ctrl+C","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","_hasShrinkwrap":false,"devDependencies":{"xo":"^0.56.0","ava":"^6.0.1","tsd":"^0.29.0"},"_npmOperationalInternal":{"tmp":"tmp/stdin-discarder_0.2.0_1702609982755_0.2511791731786057","host":"s3://npm-registry-packages"}},"0.2.1":{"name":"stdin-discarder","version":"0.2.1","keywords":["stdin","process","standard","discard","ignore","input"],"author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"stdin-discarder@0.2.1","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/stdin-discarder#readme","bugs":{"url":"https://github.com/sindresorhus/stdin-discarder/issues"},"dist":{"shasum":"e69966d2ac1e803f6378584aa7f30a74e01d70ce","tarball":"https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.2.1.tgz","fileCount":5,"integrity":"sha512-wRXvkxiYhOAduH+LFL/Qpim5zIWKYH1yEGvU0W8PgmabrZZ29iC1LKS8i443SYct12oZmQH7nyEonKiV8RTIsg==","signatures":[{"sig":"MEUCIDM87Ks3zck5uaQikOkCApfsCxUXSiOM8k5sEsHMHyZXAiEAv4MX5dUB0ETQy9c5k4FAcTN358+xbEofV3NlOeXU8p8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4015},"type":"module","types":"./index.d.ts","engines":{"node":">=18"},"exports":{"types":"./index.d.ts","default":"./index.js"},"funding":"https://github.com/sponsors/sindresorhus","gitHead":"013764f81c717f0e8256e7f6a46a72e6ea8fd416","scripts":{"test":"xo && ava && tsd"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/stdin-discarder.git","type":"git"},"_npmVersion":"9.2.0","description":"Discard stdin input except for Ctrl+C","directories":{},"sideEffects":false,"_nodeVersion":"21.2.0","_hasShrinkwrap":false,"devDependencies":{"xo":"^0.56.0","ava":"^6.0.1","tsd":"^0.29.0"},"_npmOperationalInternal":{"tmp":"tmp/stdin-discarder_0.2.1_1703331232584_0.26992939601435584","host":"s3://npm-registry-packages"}},"0.2.2":{"name":"stdin-discarder","version":"0.2.2","keywords":["stdin","process","standard","discard","ignore","input"],"author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"stdin-discarder@0.2.2","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/stdin-discarder#readme","bugs":{"url":"https://github.com/sindresorhus/stdin-discarder/issues"},"dist":{"shasum":"390037f44c4ae1a1ae535c5fe38dc3aba8d997be","tarball":"https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.2.2.tgz","fileCount":5,"integrity":"sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==","signatures":[{"sig":"MEYCIQDOMsUSsAA44P9ha4k3LFjJ7Uwe1jageKOgNwN/LzKzhAIhAKj8oO3KToWpWbsI5IUaQsoRal/4Qs0IElGe1zPN15Nr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4041},"type":"module","types":"./index.d.ts","engines":{"node":">=18"},"exports":{"types":"./index.d.ts","default":"./index.js"},"funding":"https://github.com/sponsors/sindresorhus","gitHead":"329c85219534b7e1f6272a3f15c4daa8f05d04a4","scripts":{"test":"xo && ava && tsd"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/stdin-discarder.git","type":"git"},"_npmVersion":"9.2.0","description":"Discard stdin input except for Ctrl+C","directories":{},"sideEffects":false,"_nodeVersion":"21.5.0","_hasShrinkwrap":false,"devDependencies":{"xo":"^0.56.0","ava":"^6.0.1","tsd":"^0.29.0"},"_npmOperationalInternal":{"tmp":"tmp/stdin-discarder_0.2.2_1704532897103_0.993761095839552","host":"s3://npm-registry-packages"}},"0.3.0":{"name":"stdin-discarder","version":"0.3.0","keywords":["stdin","process","standard","discard","ignore","input"],"author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"stdin-discarder@0.3.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/stdin-discarder#readme","bugs":{"url":"https://github.com/sindresorhus/stdin-discarder/issues"},"dist":{"shasum":"8d1da878b407a9a4818e704c10701204900456f9","tarball":"https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.3.0.tgz","fileCount":5,"integrity":"sha512-zR54e4v3B5LgJDngfCQZZ3YQ0SzkypA7NXOGpc2qQqai8UE0j2XgvLQJhT9dg7SbDH/Yv6DYmu6uQqHAvwADaA==","signatures":[{"sig":"MEYCIQD9DqRbCJrrYYl5thv4/1Z2lGW+ED3YS8imzz9wiFQVFgIhAO0/205henx/kzZ/klvgQuI00rutrKqXP4AB+nh5RNPC","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4590},"type":"module","types":"./index.d.ts","engines":{"node":">=18"},"exports":{"types":"./index.d.ts","default":"./index.js"},"funding":"https://github.com/sponsors/sindresorhus","gitHead":"be4e918a52194e8c77adad9b8e15734ae768d9e1","scripts":{"test":"xo && ava && tsd"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/stdin-discarder.git","type":"git"},"_npmVersion":"11.6.1","description":"Discard stdin input except for Ctrl+C","directories":{},"sideEffects":false,"_nodeVersion":"20.19.5","_hasShrinkwrap":false,"devDependencies":{"xo":"^0.56.0","ava":"^6.0.1","tsd":"^0.29.0"},"_npmOperationalInternal":{"tmp":"tmp/stdin-discarder_0.3.0_1762280055403_0.3617932566223958","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"stdin-discarder","version":"0.3.1","description":"Discard stdin input except for Ctrl+C","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/stdin-discarder.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":">=18"},"scripts":{"test":"xo && ava && tsd"},"keywords":["stdin","process","standard","discard","ignore","input"],"devDependencies":{"ava":"^6.0.1","tsd":"^0.29.0","xo":"^0.56.0"},"gitHead":"59c3f40b554d7af21c8a3917b3485956c8d57004","types":"./index.d.ts","_id":"stdin-discarder@0.3.1","bugs":{"url":"https://github.com/sindresorhus/stdin-discarder/issues"},"homepage":"https://github.com/sindresorhus/stdin-discarder#readme","_nodeVersion":"24.12.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-reExS1kSGoElkextOcPkel4NE99S0BWxjUHQeDFnR8S993JxpPX7KU4MNmO19NXhlJp+8dmdCbKQVNgLJh2teA==","shasum":"92a1e741e709248865d0562bb7babe84d350ae6a","tarball":"https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.3.1.tgz","fileCount":5,"unpackedSize":4560,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDYkjamzm3f/7q8u20aaO5akUujJtAtOWoHV624jB4fgAiATy+iCJ784X4Ek7uc51A1/ELaoTnULhxSe0KPye4y2Ow=="}]},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/stdin-discarder_0.3.1_1767892554442_0.38160583140063564"},"_hasShrinkwrap":false}},"time":{"created":"2022-07-26T14:16:08.166Z","modified":"2026-01-08T17:15:55.095Z","0.1.0":"2022-07-26T14:16:08.355Z","0.2.0":"2023-12-15T03:13:02.996Z","0.2.1":"2023-12-23T11:33:52.817Z","0.2.2":"2024-01-06T09:21:37.285Z","0.3.0":"2025-11-04T18:14:15.588Z","0.3.1":"2026-01-08T17:15:54.588Z"},"bugs":{"url":"https://github.com/sindresorhus/stdin-discarder/issues"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"license":"MIT","homepage":"https://github.com/sindresorhus/stdin-discarder#readme","keywords":["stdin","process","standard","discard","ignore","input"],"repository":{"type":"git","url":"git+https://github.com/sindresorhus/stdin-discarder.git"},"description":"Discard stdin input except for Ctrl+C","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"readme":"# stdin-discarder\n\n> Discard stdin input except for Ctrl+C\n\nThis can be useful to prevent stdin input from interfering with stdout output. For example, you are showing a spinner, and if the user presses a key, it would interfere with the spinner, causing visual glitches. This package prevents such problems.\n\nThis has no effect on Windows as there is no good way to implement discarding stdin properly there.\n\nThis package is used by [`ora`](https://github.com/sindresorhus/ora) for its [`discardStdin`](https://github.com/sindresorhus/ora#discardstdin) option.\n\n## Install\n\n```sh\nnpm install stdin-discarder\n```\n\n## Usage\n\n```js\nimport stdinDiscarder from 'stdin-discarder';\n\nstdinDiscarder.start();\n```\n\n## API\n\n### stdinDiscarder.start()\n\nStart discarding stdin.\n\n### stdinDiscarder.stop()\n\nStop discarding stdin.\n\n## Related\n\n- [hook-std](https://github.com/sindresorhus/hook-std) - Hook and modify stdout and stderr\n","readmeFilename":"readme.md"}