console-clear
Advanced tools
Comparing version 1.0.0 to 1.1.0
'use strict'; | ||
const isWin = process.platform === 'win32'; | ||
module.exports = function (isSoft) { | ||
process.stdout.write( | ||
(isWin || isSoft) ? '\x1Bc' : '\x1B[2J\x1B[3J\x1B[H' | ||
isSoft ? '\x1Bc' : '\x1B[2J\x1B[3J\x1B[H\x1Bc' | ||
); | ||
} |
{ | ||
"name": "console-clear", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Clear the console, cross-platform", | ||
@@ -5,0 +5,0 @@ "repository": "lukeed/console-clear", |
@@ -37,7 +37,6 @@ # console-clear | ||
> **For Windows:** This is the default & _only_ behavior. | ||
> **For Windows:** This may be the *only* behavior available. <br>ANSI control sequences, like clearing the scrollback buffer, are [only handled in _recent_ versions of the native Windows console host](http://www.nivot.org/blog/post/2016/02/04/Windows-10-TH2-(v1511)-Console-Host-Enhancements). | ||
## License | ||
MIT © [Luke Edwards](https://lukeed.com) |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
2449
6
42