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

logformat

Package Overview
Dependencies
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

logformat - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

9

index.js

@@ -58,3 +58,10 @@ "use strict";

_.each(getKeys(obj), function (key) {
var keys = getKeys(obj);
if (_.isError(obj)) {
r.push('ERROR');
r.push(toString(obj.message));
keys = _.difference(keys, ['stack', 'message']);
}
_.each(keys, function (key) {
var val = obj[key];

@@ -61,0 +68,0 @@ if (_.isNull(val) || _.isUndefined(val)) {

2

LICENCE.md

@@ -5,3 +5,3 @@ MIT License

```
Copyright (C) 2015, 2016 SSi Micro, Ltd. and other contributors.
Copyright (C) 2015, 2016, 2017 SSi Micro, Ltd. and other contributors.

@@ -8,0 +8,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

{
"name": "logformat",
"version": "1.0.5",
"version": "1.0.6",
"description": "stringify objects into searchable strings",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -38,4 +38,6 @@ "use strict";

it('should return a string when given an Error object', function () {
expect(logformat(new Error('Test'))).to.be('message=Test');
expect(logformat({ err: new Error('Test') })).to.be('err.message=Test');
var err = new Error('Test');
err.name = 'logformat.test.err';
expect(logformat(err)).to.be('ERROR Test name=logformat.test.err');
expect(logformat({ err: err })).to.be('err.name=logformat.test.err err.message=Test');
});

@@ -42,0 +44,0 @@ it('should return a string of key=value pairs for objects', function () {

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