terminal-control
Advanced tools
Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "terminal-control", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Terminal escape codes made easy. Get in full control.", | ||
@@ -5,0 +5,0 @@ "main": "terminal-control.js", |
@@ -18,3 +18,3 @@ terminal-control | ||
``` | ||
var term = require('terminal-control').init(); | ||
var term = require('terminal-control').init().autoClean(); | ||
@@ -30,3 +30,4 @@ term.setBold(true); | ||
* **init([override])** - initialize and check if the programm runs in a tty (if override != true) | ||
* **init([override])** - initialize and check if the programm runs in a tty (if override != true) | ||
* **autoClean()** - automatically reset text style to default on process exit | ||
@@ -33,0 +34,0 @@ ###Text style |
@@ -40,2 +40,9 @@ /** | ||
this.autoClean = function() { | ||
var _this = this; | ||
process.on('exit', function() { | ||
_this.resetTextStyle(); | ||
}); | ||
return this; | ||
} | ||
@@ -155,5 +162,6 @@ //Text style | ||
} else { | ||
this.autoClean = function() {} | ||
//Text style | ||
this.refreshTextStyle = function() {} | ||
this.resetTextStyle = function () { } | ||
this.resetTextStyle = function () {} | ||
this.setBold = function (set) {} | ||
@@ -160,0 +168,0 @@ this.setLowIntensity = function (set) {} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11734
187
77