Comparing version 3.0.12 to 3.0.13
20
dot.js
@@ -70,3 +70,5 @@ /*global Map Promise Set*/ | ||
return Promise.all(promises).then(a) | ||
return Promise.all(promises).then(function() { | ||
return a | ||
}) | ||
} else { | ||
@@ -112,3 +114,5 @@ return Promise.resolve(a) | ||
}) | ||
.then(arg) | ||
.then(function() { | ||
return arg | ||
}) | ||
@@ -177,4 +181,12 @@ var value = sig1.value || sig2.value | ||
function nsEmit() { | ||
var a = arguments | ||
a[0] = this.p.ns + period + a[0] | ||
var a = Array.prototype.slice.call(arguments) | ||
if (typeof a[0] === "string") { | ||
a[0] = this.p.ns + period + a[0] | ||
} else if (Array.isArray(a[0])) { | ||
a[0][0] = this.p.ns + period + a[0][0] | ||
} else { | ||
a.unshift(this.p.ns) | ||
} | ||
return setup.apply(this, a) | ||
@@ -181,0 +193,0 @@ } |
@@ -177,2 +177,14 @@ /* eslint-env jest */ | ||
}) | ||
test("emit helper without props", function() { | ||
var called | ||
dot.on("a", function() { | ||
called = true | ||
}) | ||
return dot.a().then(function() { | ||
expect(called).toBe(true) | ||
}) | ||
}) | ||
}) |
{ | ||
"name": "dot-event", | ||
"version": "3.0.12", | ||
"version": "3.0.13", | ||
"description": "Powerful event emitter", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
10876
396