@protobufjs/eventemitter
Advanced tools
Comparing version 1.0.5 to 1.1.0
@@ -20,5 +20,2 @@ "use strict"; | ||
/** @alias util.EventEmitter.prototype */ | ||
var EventEmitterPrototype = EventEmitter.prototype; | ||
/** | ||
@@ -31,3 +28,3 @@ * Registers an event listener. | ||
*/ | ||
EventEmitterPrototype.on = function on(evt, fn, ctx) { | ||
EventEmitter.prototype.on = function on(evt, fn, ctx) { | ||
(this._listeners[evt] || (this._listeners[evt] = [])).push({ | ||
@@ -46,3 +43,3 @@ fn : fn, | ||
*/ | ||
EventEmitterPrototype.off = function off(evt, fn) { | ||
EventEmitter.prototype.off = function off(evt, fn) { | ||
if (evt === undefined) | ||
@@ -71,3 +68,3 @@ this._listeners = {}; | ||
*/ | ||
EventEmitterPrototype.emit = function emit(evt) { | ||
EventEmitter.prototype.emit = function emit(evt) { | ||
var listeners = this._listeners[evt]; | ||
@@ -74,0 +71,0 @@ if (listeners) { |
{ | ||
"name": "@protobufjs/eventemitter", | ||
"description": "A minimal event emitter.", | ||
"version": "1.0.5", | ||
"version": "1.1.0", | ||
"author": "Daniel Wirtz <dcode+protobufjs@dcode.io>", | ||
@@ -12,3 +12,11 @@ "repository": { | ||
"main": "index.js", | ||
"types": "index.d.ts" | ||
"types": "index.d.ts", | ||
"devDependencies": { | ||
"istanbul": "^0.4.5", | ||
"tape": "^4.6.3" | ||
}, | ||
"scripts": { | ||
"test": "tape tests/*.js", | ||
"coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js" | ||
} | ||
} |
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
7752
6
144
0
2