package
Discard stdin input except for Ctrl+C
npm install stdin-discarderGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 1 packages.
4.5 kB
Includes dependencies.
Discard stdin input except for Ctrl+C
This 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.
This has no effect on Windows as there is no good way to implement discarding stdin properly there.
This package is used by ora for its discardStdin option.
npm install stdin-discarderimport stdinDiscarder from 'stdin-discarder';
stdinDiscarder.start();Start discarding stdin.
Stop discarding stdin.