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

laeh2

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

laeh2 - npm Package Compare versions

Comparing version 0.2.6 to 0.2.7

24

lib/laeh2.js

@@ -40,2 +40,22 @@

// Errors captured in async.parallel() or async.series() will
// end up in an object or an array, where default error serialization
// is next to useless, so let's serialize their stacks here.
// Exported and overridable.
exports.laehStringify = function(e) {
var o = e instanceof Object;
var a = Array.isArray(e);
if(o || a) {
for(var k in (o ? Object.keys(e) : e))
if(e[k] instanceof Error)
e[k] = String(e[k].stack);
}
return JSON.stringify(e);
}
// Check, wrap and throw error (optional convenience method)

@@ -48,3 +68,3 @@ // e: object to throw

if(!(e instanceof Error))
e = new Error(e instanceof Object ? JSON.stringify(e) : e);
e = new Error(e instanceof Object ? exports.laehStringify(e) : e);
if(meta)

@@ -88,3 +108,3 @@ e.meta = meta;

if(!(e instanceof Error))
e = new Error(e instanceof Object ? JSON.stringify(e) : e);
e = new Error(e instanceof Object ? exports.laehStringify(e) : e);

@@ -91,0 +111,0 @@ e.prev = prev;

2

package.json

@@ -6,3 +6,3 @@ {

"keywords": [ "error", "handling", "asynchronous" ],
"version": "0.2.6",
"version": "0.2.7",
"homepage": "http://github.com/ypocat/laeh2",

@@ -9,0 +9,0 @@ "repository": {

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