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

magnet-uri

Package Overview
Dependencies
Maintainers
9
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 6.2.0 to 7.0.0

CHANGELOG.md

15

index.js
/*! magnet-uri. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
module.exports = magnetURIDecode
module.exports.decode = magnetURIDecode
module.exports.encode = magnetURIEncode
import base32 from 'thirty-two'
import { parse, compose } from 'bep53-range'
const base32 = require('thirty-two')
const bep53Range = require('bep53-range')
/**

@@ -50,3 +46,3 @@ * Parse a magnet URI and return an object of keys/values

// bep53
if (key === 'so') val = bep53Range.parse(decodeURIComponent(val).split(','))
if (key === 'so') val = parse(decodeURIComponent(val).split(','))

@@ -174,3 +170,3 @@ // If there are repeated parameters, return an array of values

})
if (key === 'so') result += `${key}=${bep53Range.compose(values)}`
if (key === 'so') result += `${key}=${compose(values)}`
})

@@ -180,1 +176,4 @@

}
export default magnetURIDecode
export { magnetURIDecode as decode, magnetURIEncode as encode }
{
"name": "magnet-uri",
"description": "Parse a magnet URI and return an object of keys/values",
"version": "6.2.0",
"version": "7.0.0",
"author": {

@@ -13,9 +13,12 @@ "name": "WebTorrent LLC",

},
"type": "module",
"dependencies": {
"bep53-range": "^1.1.0",
"bep53-range": "^2.0.0",
"thirty-two": "^1.0.2"
},
"devDependencies": {
"@webtorrent/semantic-release-config": "1.0.8",
"semantic-release": "20.1.0",
"standard": "*",
"tape": "^5.2.2"
"tape": "5.6.3"
},

@@ -47,3 +50,8 @@ "funding": [

"license": "MIT",
"main": "index.js",
"engines": {
"node": ">=12.20.0"
},
"exports": {
"import": "./index.js"
},
"repository": {

@@ -55,3 +63,12 @@ "type": "git",

"test": "standard && tape test/*.js"
},
"renovate": {
"extends": [
"github>webtorrent/renovate-config"
],
"rangeStrategy": "bump"
},
"release": {
"extends": "@webtorrent/semantic-release-config"
}
}

@@ -29,3 +29,3 @@ # magnet-uri [![ci][ci-image]][ci-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]

```js
const magnet = require('magnet-uri')
import magnet from 'magnet-uri'

@@ -74,3 +74,3 @@ // "Leaves of Grass" by Walt Whitman

```js
const magnet = require('magnet-uri')
import magnet from 'magnet-uri'

@@ -77,0 +77,0 @@ const uri = magnet.encode({

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