New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

beautify-console-log

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

beautify-console-log - npm Package Compare versions

Comparing version 1.0.16 to 1.0.17

2

dist/index.js

@@ -1,2 +0,2 @@

!function(o,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.BeautifyConsole=t():o.BeautifyConsole=t()}(self,(()=>(()=>{"use strict";var o={943:(o,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BeautifyConsole=void 0;const e={black:30,red:31,green:32,yellow:33,blue:34,purple:35,cyan:36,white:37},r=(o={})=>{const{color:t="white",colorBg:r=""}=o;return`[${e[r]?e[r]+10:0};${e[t]||0}m`},s=()=>"object"==typeof process&&"node"===process.title?[r({color:"blue"}),"beautify-console-log info: -> "]:["%cbeautify-console-log info: -> ","color: #5D8EF0;"],i=()=>"object"==typeof process&&"node"===process.title?[r({color:"red"}),"beautify-console-log error: -> "]:["beautify-console-log error: -> "],n=()=>"object"==typeof process&&"node"===process.title?[r({color:"yellow"}),"beautify-console-log warn: -> "]:["beautify-console-log warn: -> "],l=()=>"object"==typeof process&&"node"===process.title?[r({color:"green"}),"beautify-console-log log: -> "]:["%cbeautify-console-log log: -> ","color: green;"];class a{constructor(){this.infoPadStartText=s(),this.errorPadStartText=i(),this.warnPadStartText=n(),this.logPadStartText=l(),this.info=console.info.bind(this,...this.infoPadStartText),this.error=console.error.bind(this,...this.errorPadStartText),this.warn=console.warn.bind(this,...this.warnPadStartText),this.log=console.log.bind(this,...this.logPadStartText)}static getInstance(){return this.instance||(this.instance=new a),this.instance}setShowLog(o,t){const e={info:()=>{this.info=o?console.info.bind(this,...this.infoPadStartText):(...o)=>{}},error:()=>{this.error=o?console.error.bind(this,...this.errorPadStartText):(...o)=>{}},warn:()=>{this.warn=o?console.warn.bind(this,...this.warnPadStartText):(...o)=>{}},log:()=>{this.log=o?console.log.bind(this,...this.logPadStartText):(...o)=>{}}};t?e[t]?e[t]():console.error(`type:${t} not supported`):o?(this.info=console.info.bind(this,...this.infoPadStartText),this.error=console.error.bind(this,...this.errorPadStartText),this.warn=console.warn.bind(this,...this.warnPadStartText),this.log=console.log.bind(this,...this.logPadStartText)):(this.info=(...o)=>{},this.error=(...o)=>{},this.warn=(...o)=>{},this.log=(...o)=>{})}open(o){return this.setShowLog(!0,o),this}close(o){return this.setShowLog(!1,o),this}setPadStartText(o,...t){const e={info:()=>{this.info=console.info.bind(this,...t)},error:()=>{this.error=console.error.bind(this,...t)},warn:()=>{this.warn=console.warn.bind(this,...t)},log:()=>{this.log=console.log.bind(this,...t)}};return e[o]?e[o]():console.error(`type:${o} not supported`),this}}t.BeautifyConsole=a}},t={};function e(r){var s=t[r];if(void 0!==s)return s.exports;var i=t[r]={exports:{}};return o[r](i,i.exports,e),i.exports}var r={};return(()=>{var o=r;Object.defineProperty(o,"__esModule",{value:!0});const t=e(943);o.default=t.BeautifyConsole})(),r})()));
!function(o,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.BeautifyConsole=t():o.BeautifyConsole=t()}(self,(()=>(()=>{"use strict";var o={943:(o,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BeautifyConsole=void 0;const e={black:30,red:31,green:32,yellow:33,blue:34,purple:35,cyan:36,white:37},r=(o={})=>{const{color:t="white",colorBg:r=""}=o;return`[${e[r]?e[r]+10:0};${e[t]||0}m`},s={info:(o="beautify-console-log info: -> ")=>"object"==typeof process&&"node"===process.title?[r({color:"blue"}),o]:[`%c${o} `,"color: #5D8EF0;"],error:(o="beautify-console-log error: -> ")=>"object"==typeof process&&"node"===process.title?[r({color:"red"}),"beautify-console-log error: -> "]:[o],warn:(o="beautify-console-log warn: -> ")=>"object"==typeof process&&"node"===process.title?[r({color:"yellow"}),o]:[o],log:(o="beautify-console-log log: -> ")=>"object"==typeof process&&"node"===process.title?[r({color:"green"}),o]:[`%c${o} `,"color: green;"]},i="info",n="warn",l="error";class a{constructor(){this.infoPadStartText=s[i](),this.errorPadStartText=s[l](),this.warnPadStartText=s[n](),this.logPadStartText=s.log(),this.info=console.info.bind(this,...this.infoPadStartText),this.error=console.error.bind(this,...this.errorPadStartText),this.warn=console.warn.bind(this,...this.warnPadStartText),this.log=console.log.bind(this,...this.logPadStartText)}static getInstance(){return this.instance||(this.instance=new a),this.instance}setShowLog(o,t){const e={info:()=>{this.info=o?console.info.bind(this,...this.infoPadStartText):(...o)=>{}},error:()=>{this.error=o?console.error.bind(this,...this.errorPadStartText):(...o)=>{}},warn:()=>{this.warn=o?console.warn.bind(this,...this.warnPadStartText):(...o)=>{}},log:()=>{this.log=o?console.log.bind(this,...this.logPadStartText):(...o)=>{}}};t?e[t]?e[t]():console.error(`type:${t} not supported`):o?(this.info=console.info.bind(this,...this.infoPadStartText),this.error=console.error.bind(this,...this.errorPadStartText),this.warn=console.warn.bind(this,...this.warnPadStartText),this.log=console.log.bind(this,...this.logPadStartText)):(this.info=(...o)=>{},this.error=(...o)=>{},this.warn=(...o)=>{},this.log=(...o)=>{})}open(o){return this.setShowLog(!0,o),this}close(o){return this.setShowLog(!1,o),this}setPadStartText(o,t){const e={info:()=>{this.info=console.info.bind(this,...s[i](t))},error:()=>{this.error=console.error.bind(this,...s[l](t))},warn:()=>{this.warn=console.warn.bind(this,...s[n](t))},log:()=>{this.log=console.log.bind(this,...s.log(t))}};return e[o]?e[o]():console.error(`type:${o} not supported`),this}}t.BeautifyConsole=a}},t={};function e(r){var s=t[r];if(void 0!==s)return s.exports;var i=t[r]={exports:{}};return o[r](i,i.exports,e),i.exports}var r={};return(()=>{var o=r;Object.defineProperty(o,"__esModule",{value:!0});const t=e(943);o.default=t.BeautifyConsole})(),r})()));
//# sourceMappingURL=index.js.map
{
"name": "beautify-console-log",
"version": "1.0.16",
"version": "1.0.17",
"description": "This is a further beautification and encapsulation of the 'console' object, including console. log, console. info, console. warn, and console. error.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -13,4 +13,4 @@ # beautify-console-log

### Effect demonstration
![node.js 控制台](https://img-blog.csdnimg.cn/7b0204dc2f7b4b78aab9e6ea43de256c.jpeg#pic_center)
![web端 控制台](https://img-blog.csdnimg.cn/35ebf4b72e574e4e9ecf0a9a6b148809.jpeg#pic_center)
![node.js 控制台](https://img-blog.csdnimg.cn/aa33e1eb915842abb8e7cc2df0da85ca.jpeg#pic_center)
![web端 控制台](https://img-blog.csdnimg.cn/e6fd73b06baf4d9390f3db92da23eb91.jpeg#pic_center)

@@ -17,0 +17,0 @@

@@ -9,4 +9,4 @@ # beautify-console-log

### 效果
![node.js 控制台](https://img-blog.csdnimg.cn/7b0204dc2f7b4b78aab9e6ea43de256c.jpeg#pic_center)
![web端 控制台](https://img-blog.csdnimg.cn/35ebf4b72e574e4e9ecf0a9a6b148809.jpeg#pic_center)
![node.js 控制台](https://img-blog.csdnimg.cn/aa33e1eb915842abb8e7cc2df0da85ca.jpeg#pic_center)
![web端 控制台](https://img-blog.csdnimg.cn/e6fd73b06baf4d9390f3db92da23eb91.jpeg#pic_center)

@@ -13,0 +13,0 @@ #### 安装教程

Sorry, the diff of this file is not supported yet

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