@browser-bunyan/console-raw-stream
Advanced tools
Comparing version 1.6.0 to 1.8.0
@@ -1,2 +0,2 @@ | ||
var o=10,e=20,r=30,n=40,l=50,c=60,t={trace:o,debug:e,info:r,warn:n,error:l,fatal:c};Object.keys(t).forEach(function(o){});var a=function(){};a.prototype.write=function(o){o.level<r?console.log(o):o.level<n?console.info(o):o.level<l?console.warn(o):console.error(o),o.err&&o.err.stack&&console.error(o.err.stack),o.obj&&console.log(o.obj)},exports.ConsoleRawStream=a; | ||
var e=require("@browser-bunyan/levels");exports.ConsoleRawStream=/*#__PURE__*/function(){function o(){}return o.prototype.write=function(o){o.level<e.INFO?console.log(o):o.level<e.WARN?console.info(o):o.level<e.ERROR?console.warn(o):console.error(o),o.err&&o.err.stack&&console.error(o.err.stack),o.obj&&console.log(o.obj)},o}(); | ||
//# sourceMappingURL=index.js.map |
@@ -1,40 +0,2 @@ | ||
var TRACE = 10; | ||
var DEBUG = 20; | ||
var INFO = 30; | ||
var WARN = 40; | ||
var ERROR = 50; | ||
var FATAL = 60; | ||
var levelFromName = { | ||
'trace': TRACE, | ||
'debug': DEBUG, | ||
'info': INFO, | ||
'warn': WARN, | ||
'error': ERROR, | ||
'fatal': FATAL | ||
}; | ||
Object.keys(levelFromName).forEach(function (name) { | ||
}); | ||
var ConsoleRawStream = function ConsoleRawStream () {}; | ||
ConsoleRawStream.prototype.write = function write (rec) { | ||
if (rec.level < INFO) { | ||
console.log(rec); | ||
} else if (rec.level < WARN) { | ||
console.info(rec); | ||
} else if (rec.level < ERROR) { | ||
console.warn(rec); | ||
} else { | ||
console.error(rec); | ||
} | ||
if (rec.err && rec.err.stack) { | ||
console.error(rec.err.stack); | ||
} | ||
if (rec.obj) { | ||
console.log(rec.obj); | ||
} | ||
}; | ||
export { ConsoleRawStream }; | ||
import{INFO as o,WARN as e,ERROR as r}from"@browser-bunyan/levels";var n=/*#__PURE__*/function(){function n(){}return n.prototype.write=function(n){n.level<o?console.log(n):n.level<e?console.info(n):n.level<r?console.warn(n):console.error(n),n.err&&n.err.stack&&console.error(n.err.stack),n.obj&&console.log(n.obj)},n}();export{n as ConsoleRawStream}; | ||
//# sourceMappingURL=index.m.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports):"function"==typeof define&&define.amd?define(["exports"],o):o(e.consoleRawStream={})}(this,function(e){var o={trace:10,debug:20,info:30,warn:40,error:50,fatal:60};Object.keys(o).forEach(function(e){});var n=function(){};n.prototype.write=function(e){e.level<30?console.log(e):e.level<40?console.info(e):e.level<50?console.warn(e):console.error(e),e.err&&e.err.stack&&console.error(e.err.stack),e.obj&&console.log(e.obj)},e.ConsoleRawStream=n}); | ||
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@browser-bunyan/levels")):"function"==typeof define&&define.amd?define(["exports","@browser-bunyan/levels"],o):o((e||self).consoleRawStream={},e.levels)}(this,function(e,o){e.ConsoleRawStream=/*#__PURE__*/function(){function e(){}return e.prototype.write=function(e){e.level<o.INFO?console.log(e):e.level<o.WARN?console.info(e):e.level<o.ERROR?console.warn(e):console.error(e),e.err&&e.err.stack&&console.error(e.err.stack),e.obj&&console.log(e.obj)},e}()}); | ||
//# sourceMappingURL=index.umd.js.map |
{ | ||
"name": "@browser-bunyan/console-raw-stream", | ||
"version": "1.6.0", | ||
"version": "1.8.0", | ||
"description": "Bunyan stream for outputting raw JSON records to the browser console", | ||
@@ -8,3 +8,4 @@ "publishConfig": { | ||
}, | ||
"main": "./lib/index.js", | ||
"type": "module", | ||
"main": "./lib/index.cjs", | ||
"module": "./lib/index.m.js", | ||
@@ -17,3 +18,3 @@ "typings": "./lib/index.d.ts", | ||
"build": "../../node_modules/.bin/microbundle --name consoleRawStream", | ||
"test": "exit 0" | ||
"test": "echo \"No tests for this module\" && exit 0" | ||
}, | ||
@@ -32,3 +33,3 @@ "repository": { | ||
"dependencies": { | ||
"@browser-bunyan/levels": "^1.6.0" | ||
"@browser-bunyan/levels": "^1.8.0" | ||
}, | ||
@@ -41,3 +42,3 @@ "author": "Phil Mander", | ||
"homepage": "https://github.com/philmander/browser-bunyan#readme", | ||
"gitHead": "ad020a76f6708f55a36021e4b4a43bccaf28c1ea" | ||
"gitHead": "61158191e36c4ab922dd0609c4e1d36667243622" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
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
9552
13
Yes
20
2