magnet-uri
Advanced tools
Comparing version 5.1.5 to 5.1.6
@@ -71,7 +71,7 @@ module.exports = magnetURIDecode | ||
var decodedStr = base32.decode(m[1]) | ||
result.infoHash = new Buffer(decodedStr, 'binary').toString('hex') | ||
result.infoHash = Buffer.from(decodedStr, 'binary').toString('hex') | ||
} | ||
}) | ||
} | ||
if (result.infoHash) result.infoHashBuffer = new Buffer(result.infoHash, 'hex') | ||
if (result.infoHash) result.infoHashBuffer = Buffer.from(result.infoHash, 'hex') | ||
@@ -78,0 +78,0 @@ if (result.dn) result.name = result.dn |
{ | ||
"name": "magnet-uri", | ||
"description": "Parse a magnet URI and return an object of keys/values", | ||
"version": "5.1.5", | ||
"version": "5.1.6", | ||
"author": { | ||
"name": "Feross Aboukhadijeh", | ||
"email": "feross@feross.org", | ||
"url": "http://feross.org/" | ||
"name": "WebTorrent, LLC", | ||
"email": "feross@webtorrent.io", | ||
"url": "https://webtorrent.io" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/feross/magnet-uri/issues" | ||
"url": "https://github.com/webtorrent/magnet-uri/issues" | ||
}, | ||
@@ -23,3 +23,2 @@ "dependencies": { | ||
}, | ||
"homepage": "https://github.com/feross/magnet-uri", | ||
"keywords": [ | ||
@@ -39,3 +38,3 @@ "magnet", | ||
"type": "git", | ||
"url": "git://github.com/feross/magnet-uri.git" | ||
"url": "git://github.com/webtorrent/magnet-uri.git" | ||
}, | ||
@@ -42,0 +41,0 @@ "scripts": { |
@@ -1,5 +0,5 @@ | ||
# magnet-uri [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] | ||
# magnet-uri [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] | ||
[travis-image]: https://img.shields.io/travis/feross/magnet-uri/master.svg | ||
[travis-url]: https://travis-ci.org/feross/magnet-uri | ||
[travis-image]: https://img.shields.io/travis/webtorrent/magnet-uri/master.svg | ||
[travis-url]: https://travis-ci.org/webtorrent/magnet-uri | ||
[npm-image]: https://img.shields.io/npm/v/magnet-uri.svg | ||
@@ -9,2 +9,4 @@ [npm-url]: https://npmjs.org/package/magnet-uri | ||
[downloads-url]: https://npmjs.org/package/magnet-uri | ||
[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg | ||
[standard-url]: https://standardjs.com | ||
@@ -108,2 +110,2 @@ ### Parse a magnet URI and return an object of keys/values. | ||
MIT. Copyright (c) [Feross Aboukhadijeh](http://feross.org). | ||
MIT. Copyright (c) [Feross Aboukhadijeh](https://feross.org) and [WebTorrent, LLC](https://webtorrent.io). |
@@ -33,3 +33,3 @@ var magnet = require('../') | ||
infoHash: 'd2474e86c95b19b8bcfdb92bc12c9d44667cfa36', | ||
infoHashBuffer: new Buffer('d2474e86c95b19b8bcfdb92bc12c9d44667cfa36', 'hex'), | ||
infoHashBuffer: Buffer.from('d2474e86c95b19b8bcfdb92bc12c9d44667cfa36', 'hex'), | ||
tr: [ | ||
@@ -68,3 +68,3 @@ 'udp://tracker.example1.com:1337', | ||
var obj = { | ||
infoHashBuffer: new Buffer('d2474e86c95b19b8bcfdb92bc12c9d44667cfa36', 'hex') | ||
infoHashBuffer: Buffer.from('d2474e86c95b19b8bcfdb92bc12c9d44667cfa36', 'hex') | ||
} | ||
@@ -74,3 +74,3 @@ var result = magnet.encode(obj) | ||
t.deepEqual(magnet.decode(result), { | ||
infoHashBuffer: new Buffer('d2474e86c95b19b8bcfdb92bc12c9d44667cfa36', 'hex'), | ||
infoHashBuffer: Buffer.from('d2474e86c95b19b8bcfdb92bc12c9d44667cfa36', 'hex'), | ||
infoHash: 'd2474e86c95b19b8bcfdb92bc12c9d44667cfa36', | ||
@@ -77,0 +77,0 @@ xt: 'urn:btih:d2474e86c95b19b8bcfdb92bc12c9d44667cfa36', |
Sorry, the diff of this file is not supported yet
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
No website
QualityPackage does not have a website.
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
19763
110
1