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
See also
clsx(3), @polka/cluster(3), @pwa/cli(3), uvu(3), taskr(3), sockette(3), klona(3), kleur(3), dequal(3), sirv-cli(3)