@hapi/accept
Advanced tools
Comparing version 5.0.2 to 6.0.0
@@ -125,5 +125,3 @@ 'use strict'; | ||
if (options.equivalents && | ||
options.equivalents.has(token)) { | ||
if (options.equivalents?.has(token)) { | ||
token = options.equivalents.get(token); | ||
@@ -188,5 +186,3 @@ } | ||
if (!preferences || | ||
!preferences.length) { | ||
if (!preferences?.length) { | ||
return values; | ||
@@ -193,0 +189,0 @@ } |
@@ -241,5 +241,3 @@ 'use strict'; | ||
if (!preferences || | ||
!preferences.length) { | ||
if (!preferences?.length) { | ||
return selections.map((selection) => selection.token + selection.original); | ||
@@ -267,3 +265,3 @@ } | ||
lowers[type] = lowers[type] || Object.create(null); | ||
lowers[type] = lowers[type] ?? Object.create(null); | ||
lowers[type][subtype] = preference; | ||
@@ -270,0 +268,0 @@ } |
@@ -1,4 +0,5 @@ | ||
Copyright (c) 2014-2020, Sideway Inc, and project contributors | ||
Copyright (c) 2015-2016, Mark Bradshaw | ||
Copyright (c) 2014, Walmart. | ||
Copyright (c) 2014-2022, Project contributors | ||
Copyright (c) 2014-2020, Sideway Inc | ||
Copyright (c) 2015-2016, Mark Bradshaw | ||
Copyright (c) 2014, Walmart. | ||
All rights reserved. | ||
@@ -5,0 +6,0 @@ |
{ | ||
"name": "@hapi/accept", | ||
"description": "HTTP Accept-* headers parsing", | ||
"version": "5.0.2", | ||
"repository": "git://github.com/hapijs/accept", | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"files": [ | ||
"lib" | ||
], | ||
"keywords": [ | ||
"HTTP", | ||
"header", | ||
"accept", | ||
"accept-encoding" | ||
], | ||
"dependencies": { | ||
"@hapi/boom": "9.x.x", | ||
"@hapi/hoek": "9.x.x" | ||
}, | ||
"devDependencies": { | ||
"@hapi/code": "8.x.x", | ||
"@hapi/lab": "24.x.x", | ||
"typescript": "~4.0.2" | ||
}, | ||
"scripts": { | ||
"test": "lab -a @hapi/code -t 100 -L -Y", | ||
"test-cov-html": "lab -a @hapi/code -r html -o coverage.html" | ||
}, | ||
"license": "BSD-3-Clause" | ||
"name": "@hapi/accept", | ||
"description": "HTTP Accept-* headers parsing", | ||
"version": "6.0.0", | ||
"repository": "git://github.com/hapijs/accept", | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"files": [ | ||
"lib" | ||
], | ||
"keywords": [ | ||
"HTTP", | ||
"header", | ||
"accept", | ||
"accept-encoding" | ||
], | ||
"eslintConfig": { | ||
"extends": [ | ||
"plugin:@hapi/module" | ||
] | ||
}, | ||
"dependencies": { | ||
"@hapi/boom": "^10.0.0", | ||
"@hapi/hoek": "^10.0.0" | ||
}, | ||
"devDependencies": { | ||
"@hapi/code": "^9.0.0", | ||
"@hapi/eslint-plugin": "*", | ||
"@hapi/lab": "^25.0.1", | ||
"@types/node": "^17.0.31", | ||
"typescript": "~4.6.4" | ||
}, | ||
"scripts": { | ||
"test": "lab -a @hapi/code -t 100 -L -Y", | ||
"test-cov-html": "lab -a @hapi/code -r html -o coverage.html" | ||
}, | ||
"license": "BSD-3-Clause" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
23412
5
526
+ Added@hapi/boom@10.0.1(transitive)
+ Added@hapi/hoek@10.0.111.0.7(transitive)
- Removed@hapi/boom@9.1.4(transitive)
- Removed@hapi/hoek@9.3.0(transitive)
Updated@hapi/boom@^10.0.0
Updated@hapi/hoek@^10.0.0