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

polog

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

polog - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

41

index.js

@@ -15,3 +15,2 @@ module.exports = function(options = {})

const writeSync = require("fs").writeSync
const EOL = require('os').EOL

@@ -21,21 +20,21 @@ const JEOL = '"]' + EOL

logger = json ? format ? {
info: (...msg) => { writeSync(1, '[' + JSON.stringify(prefix()) + ',"I","' + format(...msg) + JEOL )},
debug: !debugMode ? ()=>{} : (...msg) => { writeSync(1, '[' + JSON.stringify(prefix()) + ',"D","' + format(...msg) + JEOL )},
error: (...msg) => { writeSync(2, '[' + JSON.stringify(prefix()) + ',"E","' + format(...msg) + JEOL )},
warn: (...msg) => { writeSync(2, '[' + JSON.stringify(prefix()) + ',"W","' + format(...msg) + JEOL )}
info: (...msg) => { process.stdout.write('[' + JSON.stringify(prefix()) + ',"I","' + format(...msg) + JEOL )},
debug: !debugMode ? ()=>{} : (...msg) => { process.stdout.write('[' + JSON.stringify(prefix()) + ',"D","' + format(...msg) + JEOL )},
error: (...msg) => { process.stderr.write('[' + JSON.stringify(prefix()) + ',"E","' + format(...msg) + JEOL )},
warn: (...msg) => { process.stderr.write('[' + JSON.stringify(prefix()) + ',"W","' + format(...msg) + JEOL )}
} : {
info: msg => { writeSync(1, '[' + JSON.stringify(prefix()) + ',"I","' + msg + JEOL )},
debug: !debugMode ? ()=>{} : msg => { writeSync(1, '[' + JSON.stringify(prefix()) + ',"D","' + msg + JEOL )},
error: msg => { writeSync(2, '[' + JSON.stringify(prefix()) + ',"E","' + msg + JEOL )},
warn: msg => { writeSync(2, '[' + JSON.stringify(prefix()) + ',"W","' + msg + JEOL )}
info: msg => { process.stdout.write('[' + JSON.stringify(prefix()) + ',"I","' + msg + JEOL )},
debug: !debugMode ? ()=>{} : msg => { process.stdout.write('[' + JSON.stringify(prefix()) + ',"D","' + msg + JEOL )},
error: msg => { process.stderr.write('[' + JSON.stringify(prefix()) + ',"E","' + msg + JEOL )},
warn: msg => { process.stderr.write('[' + JSON.stringify(prefix()) + ',"W","' + msg + JEOL )}
} : format ? {
info: (...msg) => { writeSync(1, prefix() + " I " + format(...msg) + EOL )},
debug: !debugMode ? ()=>{} : (...msg) => { writeSync(1, prefix() + " D " + format(...msg) + EOL )},
error: (...msg) => { writeSync(2, prefix() + " E " + format(...msg) + EOL )},
warn: (...msg) => { writeSync(2, prefix() + " W " + format(...msg) + EOL )}
info: (...msg) => { process.stdout.write(prefix() + " I " + format(...msg) + EOL )},
debug: !debugMode ? ()=>{} : (...msg) => { process.stdout.write(prefix() + " D " + format(...msg) + EOL )},
error: (...msg) => { process.stderr.write(prefix() + " E " + format(...msg) + EOL )},
warn: (...msg) => { process.stderr.write(prefix() + " W " + format(...msg) + EOL )}
} : {
info: msg => { writeSync(1, prefix() + " I " + msg + EOL )},
debug: !debugMode ? ()=>{} : msg => { writeSync(1, prefix() + " D " + msg + EOL )},
error: msg => { writeSync(2, prefix() + " E " + msg + EOL )},
warn: msg => { writeSync(2, prefix() + " W " + msg + EOL )}
info: msg => { process.stdout.write(prefix() + " I " + msg + EOL )},
debug: !debugMode ? ()=>{} : msg => { process.stdout.write(prefix() + " D " + msg + EOL )},
error: msg => { process.stderr.write(prefix() + " E " + msg + EOL )},
warn: msg => { process.stderr.write(prefix() + " W " + msg + EOL )}
}

@@ -50,6 +49,6 @@

logger.debug = json ? format ?
(...msg) => { writeSync(1, '[' + JSON.stringify(prefix()) + ',"D","' + format(...msg) + JEOL )} :
msg => { writeSync(1, '[' + JSON.stringify(prefix()) + ',"D","' + msg + JEOL )} :
format ? (...msg) => { writeSync(1, prefix() + " D " + format(...msg) + EOL )} :
msg => { writeSync(1, prefix() + " D " + msg + EOL )}
(...msg) => { process.stdout.write('[' + JSON.stringify(prefix()) + ',"D","' + format(...msg) + JEOL )} :
msg => { process.stdout.write('[' + JSON.stringify(prefix()) + ',"D","' + msg + JEOL )} :
format ? (...msg) => { process.stdout.write(prefix() + " D " + format(...msg) + EOL )} :
msg => { process.stdout.write(prefix() + " D " + msg + EOL )}
}

@@ -56,0 +55,0 @@

{
"name": "polog",
"version": "1.2.3",
"version": "1.2.4",
"description": "very fast and simple console logging library",

@@ -5,0 +5,0 @@ "main": "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