Socket
Socket
Sign inDemoInstall

boom

Package Overview
Dependencies
Maintainers
2
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

boom - npm Package Compare versions

Comparing version 2.4.2 to 2.5.0

5

lib/index.js

@@ -236,3 +236,8 @@ // Load modules

exports.badData = function (message, data) {
return exports.create(422, message, data);
};
// 5xx Server Errors

@@ -239,0 +244,0 @@

6

package.json
{
"name": "boom",
"description": "HTTP-friendly error objects",
"version": "2.4.2",
"repository": "git://github.com/spumko/boom",
"version": "2.5.0",
"repository": "git://github.com/hapijs/boom",
"main": "index",

@@ -26,5 +26,5 @@ "keywords": [

"type": "BSD",
"url": "http://github.com/spumko/boom/raw/master/LICENSE"
"url": "http://github.com/hapijs/boom/raw/master/LICENSE"
}
]
}

@@ -1,8 +0,9 @@

<a href="https://github.com/spumko"><img src="https://raw.github.com/spumko/spumko/master/images/from.png" align="right" /></a>
![boom Logo](https://raw.github.com/spumko/boom/master/images/boom.png)
![boom Logo](https://raw.github.com/hapijs/boom/master/images/boom.png)
HTTP-friendly error objects
[![Build Status](https://secure.travis-ci.org/spumko/boom.png)](http://travis-ci.org/spumko/boom)
[![Build Status](https://secure.travis-ci.org/hapijs/boom.png)](http://travis-ci.org/hapijs/boom)
Lead Maintainer: [Eran Hammer](https://github.com/hueniverse)
#List of friendly errors available

@@ -180,2 +181,12 @@

###Boom.badData
example payload for `Boom.badData('your message');`
```json
{
"statusCode": 422,
"error": "Unprocessable Entity",
"message": "your message"
}
```
###Boom.notImplemented

@@ -182,0 +193,0 @@ example payload for `Boom.notImplemented('your message');`

@@ -410,2 +410,18 @@ // Load modules

describe('#badData', function () {
it('returns a 422 error statusCode', function (done) {
expect(Boom.badData().output.statusCode).to.equal(422);
done();
});
it('sets the message with the passed in message', function (done) {
expect(Boom.badData('my message').message).to.equal('my message');
done();
});
});
describe('#serverTimeout', function () {

@@ -412,0 +428,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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