cross-clear1.0.0 • Public • Published
Modern cross-platform terminal screen clearing.
This module uses Node's official
readline API so it works reliably in all terminals on all platforms. The used functions (
readline.clearScreenDown) are available since Node
npm install cross-clear
const clear =// clears stdout// clears stderr
- Clears the given stream; if no stream is provided,
process.stdoutwill be cleared
- Gracefully does nothing if not run in a text terminal (
stream.isTTY) or if the provided stream is not writable (
WTFPL – Do What the F*ck You Want to Public License.
Made with ❤️ by @MarkTiedemann.