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

magnet-uri

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

magnet-uri - npm Package Compare versions

Comparing version 4.2.0 to 4.2.1

vlc-log.txt

12

index.js

@@ -37,4 +37,5 @@ module.exports = magnetURIDecode

// URIs, so decode them
if (key === 'tr' || key === 'xs' || key === 'as' || key === 'ws')
if (key === 'tr' || key === 'xs' || key === 'as' || key === 'ws') {
val = decodeURIComponent(val)
}

@@ -83,6 +84,8 @@ // Return keywords as an array

result.urlList = []
if (typeof result.as === 'string' || Array.isArray(result.as))
if (typeof result.as === 'string' || Array.isArray(result.as)) {
result.urlList = result.urlList.concat(result.as)
if (typeof result.ws === 'string' || Array.isArray(result.ws))
}
if (typeof result.ws === 'string' || Array.isArray(result.ws)) {
result.urlList = result.urlList.concat(result.ws)
}

@@ -118,4 +121,5 @@ return result

if (key === 'dn') val = encodeURIComponent(val).replace(/%20/g, '+')
if (key === 'tr' || key === 'xs' || key === 'as' || key === 'ws')
if (key === 'tr' || key === 'xs' || key === 'as' || key === 'ws') {
val = encodeURIComponent(val)
}
if (key === 'kt') val = encodeURIComponent(val)

@@ -122,0 +126,0 @@

{
"name": "magnet-uri",
"description": "Parse a magnet URI and return an object of keys/values",
"version": "4.2.0",
"version": "4.2.1",
"author": {

@@ -6,0 +6,0 @@ "name": "Feross Aboukhadijeh",

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