Comparing version 3.1.3 to 3.2.0
@@ -72,3 +72,3 @@ /*global Map Promise Set*/ | ||
if (!s.cancel) { | ||
var out = fn(p.arr, a, r.dot, p.event, s) | ||
var out = fn(p.arr, s.arg || a, r.dot, p.event, s) | ||
if (out && out.then) { | ||
@@ -75,0 +75,0 @@ pr.push(out) |
@@ -67,2 +67,20 @@ /*global Promise*/ | ||
test("on arg", function() { | ||
var arg | ||
dot.on(["a", "b"], "c", function(p, a, d, e, sig) { | ||
sig.arg = { test: true } | ||
}) | ||
dot.on(["a", "b"], "c", function(p, a) { | ||
arg = a | ||
}) | ||
return dot("a", "b", "c", { failed: true }).then( | ||
function() { | ||
expect(arg).toEqual({ test: true }) | ||
} | ||
) | ||
}) | ||
test("on cancel", function() { | ||
@@ -69,0 +87,0 @@ var called |
{ | ||
"name": "dot-event", | ||
"version": "3.1.3", | ||
"version": "3.2.0", | ||
"description": "Powerful event emitter", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
16587
376