Socket
Socket
Sign inDemoInstall

boom

Package Overview
Dependencies
1
Maintainers
2
Versions
69
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.1.1

2

lib/index.js

@@ -15,3 +15,3 @@ // Load modules

Hoek.assert(this.constructor === internals.Boom, 'Error must be instantiated using new');
Hoek.assert(this instanceof internals.Boom, 'Error must be instantiated using new');

@@ -18,0 +18,0 @@ Error.call(this);

{
"name": "boom",
"description": "HTTP-friendly error objects",
"version": "1.1.0",
"version": "1.1.1",
"repository": "git://github.com/spumko/boom",

@@ -6,0 +6,0 @@ "main": "index",

@@ -5,4 +5,4 @@ // Load modules

var Boom = require('../lib');
var Util = require('util');
// Declare internals

@@ -505,4 +505,18 @@

});
describe('Boom subclasses', function () {
it('can be subclassed to create custom errors', function (done) {
function BoomSubclass(err) {
Boom.call(this, err);
this.upcaseMsg = err.message.toUpperCase();
}
Util.inherits(BoomSubclass, Boom);
var boomSubclass = new BoomSubclass(new Error('foo'));
expect(boomSubclass.upcaseMsg).to.contain('FOO');
done();
});
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc