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

logel

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

logel - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

lib/logel.js

2

lib/log.js

@@ -46,5 +46,5 @@ const LEVELS = require('./levels');

tmp(message, data){
temp(message, data){
this.trace(message, data);
}
}

@@ -56,2 +56,3 @@ const LEVELS = {

return this.serializeObject(v, depth);
default: return this.styler.null('null');
}

@@ -88,22 +89,25 @@ }

let keys = Object.keys(obj);
if(keys.length === 0){
return '{}';
}
let lines = [];
for(let k of keys){
let pathPart;
if(reIdent.test(k)){
pathPart = this.styler.field((depth !== 0) ? ('.'+k) : k);
}else{
pathPart = this.styler.string('['+escapeString(k)+']');
}
let v = obj[k];
if(v !== undefined){
let pathPart;
if(reIdent.test(k)){
pathPart = this.styler.field((depth !== 0) ? ('.'+k) : k);
}else{
pathPart = this.styler.string('['+escapeString(k)+']');
}
let serialized = this.serializeValue(obj[k], depth+1);
if(serialized.multi != null){
lines = lines.concat(serialized.multi.map(l => pathPart+l));
let serialized = this.serializeValue(v, depth+1);
if(serialized.multi != null){
lines = lines.concat(serialized.multi.map(l => pathPart+l));
}
else{
lines.push(pathPart+': '+serialized);
}
}
else{
lines.push(pathPart+': '+serialized);
}
}
if(lines.length === 0){
return '{}';
}
return {

@@ -118,3 +122,3 @@ multi: lines,

let cfg = PrettyFormatter.parseUrl(url);
this.color = (cfg.color === 'auto') ? PrettyFormatter.detectAutoColor() : (cfg.color === 'always');
this.color = (cfg.color === 'auto') ? PrettyFormatter.getColorAuto() : (cfg.color === 'always');
this.maxArrayItemsToDisplay = 10;

@@ -188,3 +192,3 @@

static detectAutoColor(){
static getColorAuto(){
return true;

@@ -191,0 +195,0 @@ }

{
"name": "logel",
"version": "0.0.2",
"version": "0.0.3",
"description": "Externally controlled logging subsystem",
"main": "lib/index.js",
"scripts": {

@@ -19,4 +18,3 @@ "test": "jest"

"chalk": "^2.4.2",
"sonic-boom": "^0.7.3",
"split2": "^3.1.0"
"sonic-boom": "^0.7.3"
},

@@ -23,0 +21,0 @@ "directories": {

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