Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rich-console

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rich-console - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

27

index.js

@@ -11,3 +11,3 @@ /**

var fontStyle = isBright == true ? '\033[1m' : '';
var fontStyle = isBright == true ? '\u001b[1m' : '';
var ESCAPES = {

@@ -42,4 +42,8 @@ black : (fontStyle + '\u001b[30m'),

var style = ESCAPES[$2];
styleStack.push(style);
return style;
if(style){
styleStack.push(style);
return style;
}else{
return m;
}
}

@@ -49,8 +53,15 @@

// 栈顶样式,若栈为空返回系统默认样式
if ($3) {
styleStack.pop();
var len = styleStack.length;
var topStyle = len > 0 ? styleStack[len - 1] : null;
return (topStyle ? topStyle : NO_COLOR);
if ($3) {
if(ESCAPES[$2]){
styleStack.pop();
var len = styleStack.length;
var topStyle = len > 0 ? styleStack[len - 1] : null;
return (topStyle ? topStyle : NO_COLOR);
}else{
return m;
}
}
// others
return m;
}) + NO_COLOR; // 最末尾的两个重置用来防止用户标签不闭合进而污染整个控制台输出

@@ -57,0 +68,0 @@ };

{
"name": "rich-console",
"version": "0.0.1",
"version": "0.0.2",
"main": "index.js",

@@ -5,0 +5,0 @@ "author": "keven-wang",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc