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

cedar

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cedar - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

28

lib/base.js

@@ -27,2 +27,4 @@ var logMethods = ['error', 'warn', 'info', 'log', 'trace', 'debug'];

var breakIndent = '\n ';
var format = function (message, type) {

@@ -62,3 +64,2 @@ return type.toUpperCase() + ': ' + message;

prefixes = value;
breakIndent = '\n' + Array((prefixes.log || '').length + 1).join(' ');
};

@@ -82,2 +83,3 @@

jsonSpace = value;
breakIndent = '\n' + value;
};

@@ -94,9 +96,27 @@

} else {
line = JSON.stringify(line, null, jsonSpace);
line = logger.stringify(line, null, jsonSpace);
}
}
lines.push(line);
lines.push(line.replace(/\n/g, breakIndent));
}
return lines.join('\n ');
return lines.join(breakIndent);
};
logger.stringify = function stringify(object) {
try {
Object.defineProperty(object, 'IS_STRINGIFY_INITIATOR', {
enumerable: false,
value: true
});
}
catch (e) {
}
var isInitiated = false;
var string = JSON.stringify(object, function (key, value) {
value = value.IS_STRINGIFY_INITIATOR && isInitiated ? '[Circular]' : value;
isInitiated = true;
return value;
}, jsonSpace);
delete object.IS_STRINGIFY_INITIATOR;
return string;
};

@@ -103,0 +123,0 @@ logger.write = function (args, type) {

6

lib/console.js

@@ -14,7 +14,6 @@ var fs = require('fs');

var cwd = process.cwd();
var breakIndent = '\n ';
var specialPattern = /(\.\?\*\+\(\)\[\]\{\}\\)/g;
var escCwd = cwd.replace(specialPattern, '\\$1') + '/';
var stackPattern = new RegExp(
'\n at ([^\n]*)' + escCwd + '([^:\n]*?)([^\\/:]+):([0-9]+):([0-9]+)([^\n]*)',
'\n +at ([^\n]*)' + escCwd + '([^:\n]*?)([^\\/:]+):([0-9]+):([0-9]+)([^\n]*)',
'g'

@@ -88,5 +87,2 @@ );

}
else {
string = string.replace(/\n/, breakIndent);
}
return logger.getPrefixes()[type] + string;

@@ -93,0 +89,0 @@ });

@@ -15,3 +15,3 @@ {

],
"version": "0.0.6",
"version": "0.0.7",
"main": "cedar.js",

@@ -18,0 +18,0 @@ "homepage": "http://github.com/zerious/cedar",

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