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

verror

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

verror - npm Package Compare versions

Comparing version 1.5.1 to 1.6.0

16

lib/verror.js

@@ -39,4 +39,16 @@ /*

{
var args, causedBy, ctor, tailmsg;
var args, obj, causedBy, ctor, tailmsg;
/*
* This is a regrettable pattern, but JavaScript's built-in Error class
* is defined to work this way, so we allow the constructor to be called
* without "new".
*/
if (!(this instanceof VError)) {
args = Array.prototype.slice.call(arguments, 0);
obj = Object.create(VError.prototype);
VError.apply(obj, arguments);
return (obj);
}
if (options instanceof Error || typeof (options) === 'object') {

@@ -105,2 +117,4 @@ args = Array.prototype.slice.call(arguments, 1);

}
return (this);
}

@@ -107,0 +121,0 @@

2

package.json
{
"name": "verror",
"version": "1.5.1",
"version": "1.6.0",
"description": "richer JavaScript errors",

@@ -5,0 +5,0 @@ "main": "./lib/verror.js",

@@ -163,1 +163,8 @@ /*

mod_assert.equal('my undefined string', err.message);
/* invoked without "new" */
err = VError('my %s string', 'testing!');
mod_assert.equal(err.name, 'VError');
mod_assert.ok(err instanceof VError);
mod_assert.ok(err instanceof Error);
mod_assert.equal(err.message, 'my testing! string');
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