Comparing version 3.0.18 to 3.0.19
@@ -71,3 +71,8 @@ /*global Map Promise Set*/ | ||
if (!s.cancel) { | ||
promises.push(fn(p.arr, a, r.dot, p.event, s)) | ||
var out = fn(p.arr, a, r.dot, p.event, s) | ||
if (out && out.then) { | ||
promises.push(out) | ||
} else if (out !== undefined) { | ||
s.value = out | ||
} | ||
} | ||
@@ -74,0 +79,0 @@ }) |
@@ -108,2 +108,10 @@ /* eslint-env jest */ | ||
test("on value (from return)", function() { | ||
dot.beforeOn("a.b", "c", function() { | ||
return true | ||
}) | ||
expect(dot("a.b.c", {})).toBe(true) | ||
}) | ||
test("onAny empty", function() { | ||
@@ -110,0 +118,0 @@ var called |
{ | ||
"name": "dot-event", | ||
"version": "3.0.18", | ||
"version": "3.0.19", | ||
"description": "Powerful event emitter", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -23,3 +23,3 @@ # dot-event | ||
dot.any("someEvent", function(prop, arg, dot, event) { | ||
// ^—— event ^—— Array.<String> | ||
// ^—— event ^—— listener | ||
}) | ||
@@ -26,0 +26,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
11907
369