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

@hapi/boom

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hapi/boom - npm Package Compare versions

Comparing version 7.4.3 to 7.4.4

lib/index.d.ts

28

lib/index.js

@@ -98,3 +98,3 @@ 'use strict';

return (err instanceof Error && !!err.isBoom);
return err instanceof Error && !!err.isBoom;
}

@@ -121,3 +121,3 @@

if (options.override === false || // Defaults to true
(!options.statusCode && !options.message)) {
!options.statusCode && !options.message) {

@@ -137,3 +137,3 @@ return err;

static unauthorized(message, scheme, attributes) { // Or function (message, wwwAuthenticate[])
static unauthorized(message, scheme, attributes) { // Or (message, wwwAuthenticate[])

@@ -184,3 +184,2 @@ const err = new internals.Boom(message, { statusCode: 401, ctor: internals.Boom.unauthorized });

if (message) {

@@ -197,15 +196,16 @@ if (attributes) {

}
err.output.headers['WWW-Authenticate'] = wwwAuthenticate;
return err;
}
else {
// function (message, wwwAuthenticate[])
// function (message, wwwAuthenticate[])
const wwwArray = scheme;
for (let i = 0; i < wwwArray.length; ++i) {
if (i) {
wwwAuthenticate = wwwAuthenticate + ', ';
}
const wwwArray = scheme;
for (let i = 0; i < wwwArray.length; ++i) {
if (i) {
wwwAuthenticate = wwwAuthenticate + ', ';
}
wwwAuthenticate = wwwAuthenticate + wwwArray[i];
}
wwwAuthenticate = wwwAuthenticate + wwwArray[i];
}

@@ -408,3 +408,3 @@

if (message) {
err.message = (message + (err.message ? ': ' + err.message : ''));
err.message = message + (err.message ? ': ' + err.message : '');
err.output.payload.message = err.message;

@@ -411,0 +411,0 @@ }

{
"name": "@hapi/boom",
"description": "HTTP-friendly error objects",
"version": "7.4.3",
"version": "7.4.4",
"repository": "git://github.com/hapijs/boom",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"keywords": [

@@ -11,2 +12,5 @@ "error",

],
"files": [
"lib"
],
"dependencies": {

@@ -20,6 +24,6 @@ "@hapi/hoek": "8.x.x"

"scripts": {
"test": "lab -a @hapi/code -t 100 -L",
"test-cov-html": "lab -a @hapi/code -r html -o coverage.html -L"
"test": "lab -a @hapi/code -t 100 -L -Y",
"test-cov-html": "lab -a @hapi/code -t 100 -L -r html -o coverage.html"
},
"license": "BSD-3-Clause"
}
<a href="http://hapijs.com"><img src="https://raw.githubusercontent.com/hapijs/assets/master/images/family.png" width="180px" align="right" /></a>
# boom
# @hapi/boom

@@ -5,0 +5,0 @@ HTTP-friendly error objects

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