eventemitter3
Advanced tools
Comparing version 1.0.1 to 1.0.2
12
index.js
@@ -43,3 +43,3 @@ 'use strict'; | ||
EventEmitter.prototype.listeners = function listeners(event, exists) { | ||
var prefix = '~'+ event | ||
var prefix = typeof event !== 'symbol' ? '~' + event : event | ||
, available = this._events && this._events[prefix]; | ||
@@ -66,3 +66,3 @@ | ||
EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { | ||
var prefix = '~'+ event; | ||
var prefix = typeof event !== 'symbol' ? '~' + event : event; | ||
@@ -127,3 +127,3 @@ if (!this._events || !this._events[prefix]) return false; | ||
var listener = new EE(fn, context || this) | ||
, prefix = '~'+ event; | ||
, prefix = typeof event !== 'symbol' ? '~' + event : event; | ||
@@ -152,3 +152,3 @@ if (!this._events) this._events = {}; | ||
var listener = new EE(fn, context || this, true) | ||
, prefix = '~'+ event; | ||
, prefix = typeof event !== 'symbol' ? '~' + event : event; | ||
@@ -177,3 +177,3 @@ if (!this._events) this._events = {}; | ||
EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) { | ||
var prefix = '~'+ event; | ||
var prefix = typeof event !== 'symbol' ? '~' + event : event; | ||
@@ -228,3 +228,3 @@ if (!this._events || !this._events[prefix]) return this; | ||
if (event) delete this._events['~'+ event]; | ||
if (event) delete this._events[typeof event !== 'symbol' ? '~' + event : event]; | ||
else this._events = {}; | ||
@@ -231,0 +231,0 @@ |
{ | ||
"name": "eventemitter3", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "EventEmitter3 focuses on performance while maintaining a Node.js AND browser compatible interface.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -32,3 +32,3 @@ # EventEmitter3 | ||
$ component install primus/eventemitter3 # Component | ||
$ bower install primus/eventemitter3 # Bower | ||
$ bower install eventemitter3 # Bower | ||
``` | ||
@@ -35,0 +35,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
12420