bittorrent-protocol
Advanced tools
Comparing version 1.3.3 to 1.3.4
@@ -126,3 +126,4 @@ module.exports = Wire | ||
Wire.prototype.use = function (Extension) { | ||
if (!Extension.name) { | ||
var name = Extension.name || Extension.prototype.name | ||
if (!name) { | ||
throw new Error('Extension API requires a named function, e.g. function name() {}') | ||
@@ -146,5 +147,5 @@ } | ||
this.extendedMapping[ext] = Extension.name | ||
this._ext[Extension.name] = handler | ||
this[Extension.name] = handler | ||
this.extendedMapping[ext] = name | ||
this._ext[name] = handler | ||
this[name] = handler | ||
@@ -151,0 +152,0 @@ this._nextExt += 1 |
{ | ||
"name": "bittorrent-protocol", | ||
"description": "Simple, robust, BitTorrent peer wire protocol implementation", | ||
"version": "1.3.3", | ||
"version": "1.3.4", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Feross Aboukhadijeh", |
@@ -247,2 +247,3 @@ # bittorrent-protocol [![build](https://img.shields.io/travis/feross/bittorrent-protocol.svg)](https://travis-ci.org/feross/bittorrent-protocol) [![npm](https://img.shields.io/npm/v/bittorrent-protocol.svg)](https://npmjs.org/package/bittorrent-protocol) [![gittip](https://img.shields.io/gittip/feross.svg)](https://www.gittip.com/feross/) | ||
- [ut_metadata](https://github.com/feross/ut_metadata) - Extension for Peers to Send Metadata Files (BEP 9) | ||
- [ut_pex](https://github.com/fisch0920/ut_pex) - Extension for Peer Discovery (PEX) | ||
- *Add yours here! Send a pull request!* | ||
@@ -249,0 +250,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
34803
763
307