magnet-uri
Advanced tools
Comparing version 7.0.4 to 7.0.5
@@ -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 @@ |
/*! 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 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14500
145
+ Added@thaunknown/thirty-two@1.0.5(transitive)
- Removedthirty-two@^1.0.2
- Removedthirty-two@1.0.2(transitive)