Socket
Socket
Sign inDemoInstall

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 7.0.4 to 7.0.5

7

CHANGELOG.md

@@ -0,1 +1,8 @@

## [7.0.5](https://github.com/webtorrent/magnet-uri/compare/v7.0.4...v7.0.5) (2023-05-30)
### Bug Fixes
* replace 32 with maintained version ([#73](https://github.com/webtorrent/magnet-uri/issues/73)) ([2c041f4](https://github.com/webtorrent/magnet-uri/commit/2c041f40f77f5f7ca928faa1d919366ee1a4c53c))
## [7.0.4](https://github.com/webtorrent/magnet-uri/compare/v7.0.3...v7.0.4) (2023-05-27)

@@ -2,0 +9,0 @@

7

index.js
/*! magnet-uri. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
import base32 from 'thirty-two'
import { decode } from '@thaunknown/thirty-two'
import { parse, compose } from 'bep53-range'
import { hex2arr, arr2hex, bin2hex } from 'uint8-util'
import { hex2arr, arr2hex } from 'uint8-util'

@@ -69,4 +69,3 @@ /**

} else if ((m = xt.match(/^urn:btih:(.{32})/))) {
const decodedStr = base32.decode(m[1])
result.infoHash = bin2hex(decodedStr.toString('binary'))
result.infoHash = arr2hex(decode(m[1]))
} else if ((m = xt.match(/^urn:btmh:1220(.{64})/))) {

@@ -73,0 +72,0 @@ result.infoHashV2 = m[1].toLowerCase()

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

@@ -15,4 +15,4 @@ "name": "WebTorrent LLC",

"dependencies": {
"@thaunknown/thirty-two": "^1.0.3",
"bep53-range": "^2.0.0",
"thirty-two": "^1.0.2",
"uint8-util": "^2.1.9"

@@ -19,0 +19,0 @@ },

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