Comparing version 0.3.0 to 0.3.1
@@ -65,10 +65,8 @@ /*! | ||
var self = this; | ||
var events = self.__events || (self.__events = {}); | ||
var events = self._events || (self._events = {}); | ||
context = arguments.length < 3 ? self : context; | ||
(events[name] || (events[name] = [])).push({ | ||
fn: listener, | ||
context: context | ||
}); | ||
// [...[listener, context]] | ||
(events[name] || (events[name] = [])).push([listener, context]); | ||
@@ -107,3 +105,3 @@ return self; | ||
var data = slice.call(arguments, 1); | ||
var events = context.__events || (context.__events = {}); | ||
var events = context._events || (context._events = {}); | ||
var listeners = events[name] || []; | ||
@@ -118,3 +116,3 @@ | ||
listener = listeners[i]; | ||
result = apply(listener.fn, listener.context, data); | ||
result = apply(listener[0], listener[1], data); | ||
@@ -139,7 +137,7 @@ if (returned !== false) { | ||
var length = arguments.length; | ||
var events = self.__events || (self.__events = {}); | ||
var events = self._events || (self._events = {}); | ||
switch (length) { | ||
case 0: | ||
self.__events = {}; | ||
self._events = {}; | ||
break; | ||
@@ -157,8 +155,8 @@ case 1: | ||
var event; | ||
var monitor; | ||
for (var i = 0; i < length; i++) { | ||
event = listeners[i]; | ||
monitor = listeners[i]; | ||
if (event.fn === listener && event.context === context) { | ||
if (monitor[0] === listener && monitor[1] === context) { | ||
listeners.splice(i, 1); | ||
@@ -165,0 +163,0 @@ break; |
{ | ||
"name": "fengine", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "A development tool for f2e", | ||
@@ -38,3 +38,3 @@ "author": { | ||
"js-yaml": "^3.8.4", | ||
"file-send": "^2.1.3", | ||
"file-send": "^2.1.4", | ||
"mime-types": "^2.1.15" | ||
@@ -41,0 +41,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
115899
1552
Updatedfile-send@^2.1.4