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

fancy-node-logger

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fancy-node-logger - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

2

dist/index.js

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

"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault"),_slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray")),_classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")),_defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty")),Type=require("./Type"),SeverityStyles=require("./SeverityStyles"),TitleStyles=require("./TitleStyles"),chalk=require("chalk"),FancyNodeLogger=function e(){var i=this;(0,_classCallCheck2.default)(this,e),(0,_defineProperty2.default)(this,"parseMessages",function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];switch(null==r?void 0:r.length){case 1:return[r[0]];case 2:return[r[0],null,r[1]];case 3:return[r[0],r[1],r[2]];default:return[]}}),(0,_defineProperty2.default)(this,"formatText",function(e,r){if(!e)return"";if(!r||(null==r?void 0:r.length)<1)return e;var t=chalk;return null!=r&&r.forEach(function(e){return t=null===t||void 0===t?void 0:t[e]}),t?t("",e,""):e}),(0,_defineProperty2.default)(this,"print",function(e,r,t,n,a,o){r=i.formatText(e,r),r=r?"".concat(r," "):"",t=i.formatText(t,n),n=t?"".concat(t," "):"",o=i.formatText(a,o),o=o?"".concat(t?"\n":"").concat(o,"\n"):"";console.log("".concat(r).concat(n).concat(o))}),(0,_defineProperty2.default)(this,"output",function(e){for(var r=arguments.length,t=new Array(1<r?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];var a=i.parseMessages.apply(i,t),o=(0,_slicedToArray2.default)(a,3),u=o[0],a=o[1],o=o[2];i.print(u,SeverityStyles[e],a,TitleStyles[e],o)}),(0,_defineProperty2.default)(this,"createLogger",function(n,a){return function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return i.output.apply(i,[n,a].concat(r))}}),(0,_defineProperty2.default)(this,"registLogger",function(e,r){return i[e]=r}),(0,_defineProperty2.default)(this,"verbose",function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return i.output.apply(i,[Type.VERBOSE,"VERBOSE"].concat(r)),i}),(0,_defineProperty2.default)(this,"note",function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return i.output.apply(i,[Type.VERBOSE,"NOTE"].concat(r)),i}),(0,_defineProperty2.default)(this,"info",function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return i.output.apply(i,[Type.INFO,"INFO"].concat(r)),i}),(0,_defineProperty2.default)(this,"wait",function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return i.output.apply(i,[Type.INFO,"WAIT"].concat(r)),i}),(0,_defineProperty2.default)(this,"success",function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return i.output.apply(i,[Type.SUCCESS,"SUCCESS"].concat(r)),i}),(0,_defineProperty2.default)(this,"done",function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return i.output.apply(i,[Type.SUCCESS,"DONE"].concat(r)),i}),(0,_defineProperty2.default)(this,"warning",function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return i.output.apply(i,[Type.WARNING,"WARNING"].concat(r)),i}),(0,_defineProperty2.default)(this,"issue",function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return i.output.apply(i,[Type.WARNING,"ISSUE"].concat(r)),i}),(0,_defineProperty2.default)(this,"error",function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return i.output.apply(i,[Type.ERROR,"ERROR"].concat(r)),i}),(0,_defineProperty2.default)(this,"failure",function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return i.output.apply(i,[Type.ERROR,"FAILURE"].concat(r)),i})},fancyNodeLogger=new FancyNodeLogger;fancyNodeLogger.Type=Type,fancyNodeLogger.SeverityStyles=SeverityStyles,fancyNodeLogger.TitleStyles=TitleStyles,module.exports=fancyNodeLogger;
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault"),_slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray")),_classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")),_defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty")),Type=require("./Type"),SeverityStyles=require("./SeverityStyles"),TitleStyles=require("./TitleStyles"),chalk=require("chalk"),FancyNodeLogger=function e(){var i=this;(0,_classCallCheck2.default)(this,e),(0,_defineProperty2.default)(this,"parseMessages",function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];switch(null==r?void 0:r.length){case 1:return[r[0]];case 2:return[r[0],null,r[1]];case 3:return[r[0],r[1],r[2]];default:return[]}}),(0,_defineProperty2.default)(this,"formatText",function(e,r){if(!e)return"";if(!r||(null==r?void 0:r.length)<1)return e;var t=chalk;return null!=r&&r.forEach(function(e){return t=null===t||void 0===t?void 0:t[e]}),t?t(e):e}),(0,_defineProperty2.default)(this,"print",function(e,r,t,n,a,o){r=e?i.formatText(" ".concat(e," "),r)+" ":"",n=t?i.formatText(t,n)+" ":"",o=a?i.formatText(a,o)+" ":"";console.log("".concat(r).concat(n).concat(o))}),(0,_defineProperty2.default)(this,"output",function(e){for(var r=arguments.length,t=new Array(1<r?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];var a=i.parseMessages.apply(i,t),o=(0,_slicedToArray2.default)(a,3),u=o[0],a=o[1],o=o[2];i.print(u,SeverityStyles[e],a,TitleStyles[e],o)}),(0,_defineProperty2.default)(this,"createLogger",function(n,a){return function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return i.output.apply(i,[n,a].concat(r))}}),(0,_defineProperty2.default)(this,"registLogger",function(e,r){return i[e]=r}),(0,_defineProperty2.default)(this,"verbose",function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return i.output.apply(i,[Type.VERBOSE,"VERBOSE"].concat(r)),i}),(0,_defineProperty2.default)(this,"note",function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return i.output.apply(i,[Type.VERBOSE,"NOTE"].concat(r)),i}),(0,_defineProperty2.default)(this,"info",function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return i.output.apply(i,[Type.INFO,"INFO"].concat(r)),i}),(0,_defineProperty2.default)(this,"wait",function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return i.output.apply(i,[Type.INFO,"WAIT"].concat(r)),i}),(0,_defineProperty2.default)(this,"success",function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return i.output.apply(i,[Type.SUCCESS,"SUCCESS"].concat(r)),i}),(0,_defineProperty2.default)(this,"done",function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return i.output.apply(i,[Type.SUCCESS,"DONE"].concat(r)),i}),(0,_defineProperty2.default)(this,"warning",function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return i.output.apply(i,[Type.WARNING,"WARNING"].concat(r)),i}),(0,_defineProperty2.default)(this,"issue",function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return i.output.apply(i,[Type.WARNING,"ISSUE"].concat(r)),i}),(0,_defineProperty2.default)(this,"error",function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return i.output.apply(i,[Type.ERROR,"ERROR"].concat(r)),i}),(0,_defineProperty2.default)(this,"failure",function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return i.output.apply(i,[Type.ERROR,"FAILURE"].concat(r)),i})},fancyNodeLogger=new FancyNodeLogger;fancyNodeLogger.Type=Type,fancyNodeLogger.SeverityStyles=SeverityStyles,fancyNodeLogger.TitleStyles=TitleStyles,module.exports=fancyNodeLogger;
{
"name": "fancy-node-logger",
"author": "liangxiaojun",
"version": "0.1.1",
"version": "0.2.0",
"description": "Fancy logger in Node with Chalk",

@@ -6,0 +6,0 @@ "main": "./dist/index.js",

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