@browser-bunyan/console-formatted-stream
Advanced tools
Comparing version 1.3.1-pre.0 to 1.5.0
@@ -1,2 +0,2 @@ | ||
var e=10,s=20,l=30,o=40,r=50,c=60,t={trace:e,debug:s,info:l,warn:o,error:r,fatal:c},i={};Object.keys(t).forEach(function(e){i[t[e]]=e});var n={levels:{trace:"color: DeepPink",debug:"color: GoldenRod",info:"color: DarkTurquoise",warn:"color: Purple",error:"color: Crimson",fatal:"color: Black"},def:"color: DimGray",msg:"color: SteelBlue",src:"color: DimGray; font-style: italic; font-size: 0.9em"},a=function(e){void 0===e&&(e={});var s=e.logByLevel;void 0===s&&(s=!1);var l=e.css;void 0===l&&(l=n),this.logByLevel=s,this.css=l};a.prototype.write=function(t){var n,a,u=this.css.def,h=this.css.msg,v=this.css.src,p=t.childName?t.name+"/"+t.childName:t.name,f=i[t.level],g=(Array(6-f.length).join(" ")+f).toUpperCase();this.logByLevel?(t.level===e?f="debug":t.level===c&&(f="error"),a="function"==typeof console[f]?console[f]:console.log):a=console.log,n=t.level<s?this.css.levels.trace:t.level<l?this.css.levels.debug:t.level<o?this.css.levels.info:t.level<r?this.css.levels.warn:t.level<c?this.css.levels.error:this.css.levels.fatal;var m=function(e,s){return Array(s+1-(e+"").length).join("0")+e},d=[];d.push("[%s:%s:%s:%s] %c%s%c: %s: %c%s "+(t.src?"%c%s":"")),d.push(m(t.time.getHours(),2)),d.push(m(t.time.getMinutes(),2)),d.push(m(t.time.getSeconds(),2)),d.push(m(t.time.getMilliseconds(),4)),d.push(n),d.push(g),d.push(u),d.push(p),d.push(h),d.push(t.msg),t.src&&(d.push(v),d.push(t.src)),a.apply(console,d),t.err&&t.err.stack&&a.call(console,"%c%s,",n,t.err.stack),t.obj&&a.call(console,t.obj)},a.getDefaultCss=function(){return n},exports.ConsoleFormattedStream=a; | ||
var h=10,v=20,p=30,f=40,g=50,m=60,s={trace:h,debug:v,info:p,warn:f,error:g,fatal:m},d={};Object.keys(s).forEach(function(e){d[s[e]]=e});var o={levels:{trace:"color: DeepPink",debug:"color: GoldenRod",info:"color: DarkTurquoise",warn:"color: Purple",error:"color: Crimson",fatal:"color: Black"},def:"color: DimGray",msg:"color: SteelBlue",src:"color: DimGray; font-style: italic; font-size: 0.9em"},e=function(e){void 0===e&&(e={});var s=e.logByLevel;void 0===s&&(s=!1);var l=e.css;void 0===l&&(l=o),this.logByLevel=s,this.css=l};e.prototype.write=function(e){var s,l,o=this.css.def,r=this.css.msg,c=this.css.src,t=e.childName?e.name+"/"+e.childName:e.name,i=d[e.level],n=(Array(6-i.length).join(" ")+i).toUpperCase();l=this.logByLevel?(e.level===h?i="debug":e.level===m&&(i="error"),"function"==typeof console[i]?console[i]:console.log):console.log,s=e.level<v?this.css.levels.trace:e.level<p?this.css.levels.debug:e.level<f?this.css.levels.info:e.level<g?this.css.levels.warn:e.level<m?this.css.levels.error:this.css.levels.fatal;var a=function(e,s){return Array(s+1-(e+"").length).join("0")+e},u=[];u.push("[%s:%s:%s:%s] %c%s%c: %s: %c%s "+(e.src?"%c%s":"")),u.push(a(e.time.getHours(),2)),u.push(a(e.time.getMinutes(),2)),u.push(a(e.time.getSeconds(),2)),u.push(a(e.time.getMilliseconds(),4)),u.push(s),u.push(n),u.push(o),u.push(t),u.push(r),u.push(e.msg),e.src&&(u.push(c),u.push(e.src)),l.apply(console,u),e.err&&e.err.stack&&l.call(console,"%c%s,",s,e.err.stack),e.obj&&l.call(console,e.obj)},e.getDefaultCss=function(){return o},exports.ConsoleFormattedStream=e; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,s){"object"==typeof exports&&"undefined"!=typeof module?s(exports):"function"==typeof define&&define.amd?define(["exports"],s):s(e.consoleFormattedStream={})}(this,function(e){var s={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},o={};Object.keys(s).forEach(function(e){o[s[e]]=e});var l={levels:{trace:"color: DeepPink",debug:"color: GoldenRod",info:"color: DarkTurquoise",warn:"color: Purple",error:"color: Crimson",fatal:"color: Black"},def:"color: DimGray",msg:"color: SteelBlue",src:"color: DimGray; font-style: italic; font-size: 0.9em"},r=function(e){void 0===e&&(e={});var s=e.logByLevel;void 0===s&&(s=!1);var o=e.css;void 0===o&&(o=l),this.logByLevel=s,this.css=o};r.prototype.write=function(e){var s,l,r=this.css.def,t=this.css.msg,c=this.css.src,n=e.childName?e.name+"/"+e.childName:e.name,i=o[e.level],a=(Array(6-i.length).join(" ")+i).toUpperCase();this.logByLevel?(10===e.level?i="debug":60===e.level&&(i="error"),l="function"==typeof console[i]?console[i]:console.log):l=console.log,s=e.level<20?this.css.levels.trace:e.level<30?this.css.levels.debug:e.level<40?this.css.levels.info:e.level<50?this.css.levels.warn:e.level<60?this.css.levels.error:this.css.levels.fatal;var u=function(e,s){return Array(s+1-(e+"").length).join("0")+e},h=[];h.push("[%s:%s:%s:%s] %c%s%c: %s: %c%s "+(e.src?"%c%s":"")),h.push(u(e.time.getHours(),2)),h.push(u(e.time.getMinutes(),2)),h.push(u(e.time.getSeconds(),2)),h.push(u(e.time.getMilliseconds(),4)),h.push(s),h.push(a),h.push(r),h.push(n),h.push(t),h.push(e.msg),e.src&&(h.push(c),h.push(e.src)),l.apply(console,h),e.err&&e.err.stack&&l.call(console,"%c%s,",s,e.err.stack),e.obj&&l.call(console,e.obj)},r.getDefaultCss=function(){return l},e.ConsoleFormattedStream=r}); | ||
!function(e,s){"object"==typeof exports&&"undefined"!=typeof module?s(exports):"function"==typeof define&&define.amd?define(["exports"],s):s(e.consoleFormattedStream={})}(this,function(e){var s={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},h={};Object.keys(s).forEach(function(e){h[s[e]]=e});var l={levels:{trace:"color: DeepPink",debug:"color: GoldenRod",info:"color: DarkTurquoise",warn:"color: Purple",error:"color: Crimson",fatal:"color: Black"},def:"color: DimGray",msg:"color: SteelBlue",src:"color: DimGray; font-style: italic; font-size: 0.9em"},o=function(e){void 0===e&&(e={});var s=e.logByLevel;void 0===s&&(s=!1);var o=e.css;void 0===o&&(o=l),this.logByLevel=s,this.css=o};o.prototype.write=function(e){var s,o,l=this.css.def,r=this.css.msg,t=this.css.src,c=e.childName?e.name+"/"+e.childName:e.name,n=h[e.level],i=(Array(6-n.length).join(" ")+n).toUpperCase();o=this.logByLevel?(10===e.level?n="debug":60===e.level&&(n="error"),"function"==typeof console[n]?console[n]:console.log):console.log,s=e.level<20?this.css.levels.trace:e.level<30?this.css.levels.debug:e.level<40?this.css.levels.info:e.level<50?this.css.levels.warn:e.level<60?this.css.levels.error:this.css.levels.fatal;var a=function(e,s){return Array(s+1-(e+"").length).join("0")+e},u=[];u.push("[%s:%s:%s:%s] %c%s%c: %s: %c%s "+(e.src?"%c%s":"")),u.push(a(e.time.getHours(),2)),u.push(a(e.time.getMinutes(),2)),u.push(a(e.time.getSeconds(),2)),u.push(a(e.time.getMilliseconds(),4)),u.push(s),u.push(i),u.push(l),u.push(c),u.push(r),u.push(e.msg),e.src&&(u.push(t),u.push(e.src)),o.apply(console,u),e.err&&e.err.stack&&o.call(console,"%c%s,",s,e.err.stack),e.obj&&o.call(console,e.obj)},o.getDefaultCss=function(){return l},e.ConsoleFormattedStream=o}); | ||
//# sourceMappingURL=index.umd.js.map |
{ | ||
"name": "@browser-bunyan/console-formatted-stream", | ||
"version": "1.3.1-pre.0", | ||
"version": "1.5.0", | ||
"description": "Bunyan stream for outputting nicely formatted records to the browser console", | ||
@@ -14,3 +14,3 @@ "publishConfig": { | ||
"build": "../../node_modules/.bin/microbundle --name consoleFormattedStream", | ||
"test": "exit 0" | ||
"test": "../../node_modules/.bin/babel-tap src/*.test.js" | ||
}, | ||
@@ -29,3 +29,3 @@ "repository": { | ||
"dependencies": { | ||
"@browser-bunyan/levels": "^1.3.1-pre.0" | ||
"@browser-bunyan/levels": "^1.3.0" | ||
}, | ||
@@ -37,3 +37,7 @@ "author": "Phil Mander", | ||
}, | ||
"homepage": "https://github.com/philmander/browser-bunyan#readme" | ||
"homepage": "https://github.com/philmander/browser-bunyan#readme", | ||
"devDependencies": { | ||
"std-mocks": "^1.0.1" | ||
}, | ||
"gitHead": "5092a572fc3a2b6d547ba325c946229e08976ea1" | ||
} |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
9298
0
1