console-clear
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/console-clear package

1.1.1 • Public • Published

console-clear

Clear the console, cross-platform

Install

$ npm install --save console-clear

Usage

const clear = require('console-clear');
 
clear(true);
//=> allow scrollback
 
clear();
//=> no scrollback, if supported

API

clear(keepHistory)

keepHistory

Type: boolean
Default: false

Clears the console, but keeps the scrollback history intact.

For Windows: This may be the only behavior available.
ANSI control sequences, like clearing the scrollback buffer, are only handled in recent versions of the native Windows console host.

License

MIT © Luke Edwards

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i console-clear

      Weekly Downloads

      106,630

      Version

      1.1.1

      License

      MIT

      Unpacked Size

      2.46 kB

      Total Files

      4

      Last publish

      Collaborators

      • lukeed