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

discord-verify

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discord-verify - npm Package Compare versions

Comparing version 0.0.2-beta.22 to 0.0.2-beta.23

22

dist/node.js

@@ -120,6 +120,22 @@ "use strict";

function getAlgo(major, minor) {
if (major > 16 || major === 16 && minor >= 17) {
return PlatformAlgorithm.Node18;
switch (major) {
case 18: {
if (minor < 4) {
return PlatformAlgorithm.Node16_Old;
}
return PlatformAlgorithm.Node18;
}
case 17: {
return PlatformAlgorithm.Node16_Old;
}
case 16: {
if (minor >= 17) {
return PlatformAlgorithm.Node16;
}
return PlatformAlgorithm.Node16_Old;
}
default: {
return PlatformAlgorithm.Node18;
}
}
return PlatformAlgorithm.Node16;
}

@@ -126,0 +142,0 @@ async function isValidRequest2(request, publicKey, algorithm) {

5

package.json
{
"name": "discord-verify",
"version": "0.0.2-beta.22",
"version": "0.0.2-beta.23",
"author": "Ian Mitchell",

@@ -57,3 +57,6 @@ "description": "A library for verifying the authenticity of requests coming from the Discord Interactions API",

"node": ">=16"
},
"volta": {
"node": "17.9.1"
}
}

@@ -21,7 +21,27 @@ // eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error

function getAlgo(major: number, minor: number) {
if (major > 16 || (major === 16 && minor >= 17)) {
return PlatformAlgorithm.Node18;
switch (major) {
case 18: {
if (minor < 4) {
return PlatformAlgorithm.Node16_Old;
}
return PlatformAlgorithm.Node18;
}
case 17: {
return PlatformAlgorithm.Node16_Old;
}
case 16: {
if (minor >= 17) {
return PlatformAlgorithm.Node16;
}
return PlatformAlgorithm.Node16_Old;
}
default: {
return PlatformAlgorithm.Node18;
}
}
return PlatformAlgorithm.Node16;
}

@@ -28,0 +48,0 @@

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