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.7 to 0.0.8

35

lib/base.js

@@ -100,19 +100,26 @@ var logMethods = ['error', 'warn', 'info', 'log', 'trace', 'debug'];

};
logger.stringify = function stringify(object) {
try {
Object.defineProperty(object, 'IS_STRINGIFY_INITIATOR', {
enumerable: false,
value: true
});
if (object === null) {
return 'null';
}
catch (e) {
switch (typeof object) {
case 'function':
return object.toString();
case 'object':
Object.defineProperty(object, 'IS_STRINGIFY_INITIATOR', {
enumerable: false,
value: true
});
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;
default:
return '' + object;
}
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;
};

@@ -119,0 +126,0 @@

2

package.json

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

],
"version": "0.0.7",
"version": "0.0.8",
"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