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

grant

Package Overview
Dependencies
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grant - npm Package Compare versions

Comparing version 5.1.0 to 5.1.1

3

CHANGELOG.md
# Change Log
## v5.1.1 (2020/05/25)
- **Fix:** The upcoming Grant constructor
## v5.1.0 (2020/05/25)

@@ -5,0 +8,0 @@ - **New:** Support for `private_key_jwt` client authentication

19

grant.js
function grant ({handler, ...rest}) {
var version = () => ({
express: 4,
koa: parseInt(require('koa/package.json').version.split('.')[0]) >= 2 ? 2 : 1,
hapi: (() => {
if (handler === 'express') {
var version = 4
}
else if (handler === 'koa') {
var version =
parseInt(require('koa/package.json').version.split('.')[0]) >= 2 ? 2 : 1
}
else if (handler === 'hapi') {
var version = (() => {
var pkg

@@ -16,6 +21,6 @@ try {

})() >= 17 ? 17 : 16
}[handler])
}
if (/express|koa|hapi/.test(handler) && !/-\d+$/.test(handler)) {
return require(`./lib/handler/${handler}-${version()}`)(rest)
if (/^(?:express|koa|hapi)$/.test(handler)) {
return require(`./lib/handler/${handler}-${version}`)(rest)
}

@@ -22,0 +27,0 @@ else {

{
"name": "grant",
"version": "5.1.0",
"version": "5.1.1",
"description": "OAuth Proxy",

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

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