glob-events
Advanced tools
Comparing version 1.1.0 to 1.1.1
# Changes | ||
## 1.1.1 | ||
- Retain custom args property in `toScope` | ||
- Prefer arguments over `scope.args` in `toScope` | ||
- Expose `args` on listener scope object | ||
## 1.1.0 | ||
@@ -4,0 +10,0 @@ |
@@ -30,7 +30,11 @@ /* | ||
} | ||
var l = args.length, a = [], j; | ||
for (j = 1; j < l; j++) { | ||
a[j - 1] = args[j]; | ||
if (args.length > 1) { | ||
var l = args.length, a = [], j; | ||
for (j = 1; j < l; j++) { | ||
a[j - 1] = args[j]; | ||
} | ||
scope.args = a; | ||
} else if (!scope.args) { | ||
scope.args = []; | ||
} | ||
scope.args = a; | ||
return scope; | ||
@@ -162,2 +166,5 @@ } | ||
do { | ||
if (o.scope) { | ||
o.scope.args = scope.args; | ||
} | ||
try { | ||
@@ -184,2 +191,6 @@ o.fn.apply(o.scope || scope, scope.args || []); | ||
} | ||
} finally { | ||
if (o.scope) { | ||
delete o.scope.args; | ||
} | ||
} | ||
@@ -190,3 +201,3 @@ } while ((o = i.next()) !== undefined); | ||
} | ||
}, | ||
} | ||
@@ -193,0 +204,0 @@ }; |
{ | ||
"name" : "glob-events", | ||
"version" : "1.1.0", | ||
"version" : "1.1.1", | ||
"description" : "Event emitter with glob support on event names", | ||
@@ -5,0 +5,0 @@ "keywords" : ["event", "emitter", "glob", "listener"], |
13117
185