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

loglevel-mixin

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

loglevel-mixin - npm Package Compare versions

Comparing version 1.4.1 to 1.4.2

17

LogLevelMixin.js

@@ -155,10 +155,10 @@ /* jslint node: true, esnext: true */

} else {
if(arg === undefined) {
if (arg === undefined) {
return Object.assign(logevent, args);
}
if (arg instanceof Error && arg.stack) {
logevent.stack = arg.stack.split(/\n/).map(l => l.trim());
} else if (arg.error instanceof Error && arg.error.stack) {
logevent.stack = arg.error.stack.split(/\n/).map(l => l.trim());
if (arg instanceof Error) {
mapError(logevent, arg);
} else if (arg.error instanceof Error) {
mapError(logevent, arg.error);
}

@@ -169,1 +169,8 @@

};
function mapError(logevent, error) {
if (error.stack) {
logevent.stack = error.stack.split(/\n/).map(l => l.trim());
}
logevent.message = error.message;
}

@@ -22,7 +22,7 @@ {

"cracks": "3.1.2",
"cz-conventional-changelog": "^1.1.5",
"cz-conventional-changelog": "1.1.6",
"istanbul": "0.4.3",
"jsdoc": "3.4.0",
"mocha": "2.4.5",
"semantic-release": "6.2.1"
"semantic-release": "6.2.2"
},

@@ -43,3 +43,3 @@ "keywords": [

},
"version": "1.4.1"
"version": "1.4.2"
}

@@ -27,3 +27,3 @@ /* global describe, it*/

});
describe('error object', () => {

@@ -33,2 +33,3 @@ describe('direct', () => {

it('has stack', () => assert.isArray(le.stack));
it('has error message', () => assert.equal(le.message, 'the error'));
});

@@ -40,2 +41,3 @@ describe('indirect', () => {

it('has stack', () => assert.isArray(le.stack));
it('has error message', () => assert.equal(le.message, 'the error'));
});

@@ -42,0 +44,0 @@ });

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