thunkify-wrap
Advanced tools
Comparing version 0.1.0 to 0.1.1
0.1.1 / 2014-03-18 | ||
================== | ||
* update thunkify.event, fix unremove listener error | ||
0.1.0 / 2014-03-17 | ||
@@ -3,0 +8,0 @@ ================== |
22
index.js
@@ -111,3 +111,7 @@ /**! | ||
function _done(err, data) { | ||
e.removeListener('error', error); | ||
if (called) { | ||
return; | ||
} | ||
called = true; | ||
e.removeListener('error', _done); | ||
endEvents.forEach(function (name) { | ||
@@ -119,19 +123,7 @@ e.removeListener(name, end); | ||
function error(err) { | ||
if (called) { | ||
return; | ||
} | ||
called = true; | ||
done(err); | ||
} | ||
function end(data) { | ||
if (called) { | ||
return; | ||
} | ||
called = true; | ||
done(null, data); | ||
_done(null, data); | ||
} | ||
e.once('error', error); | ||
e.once('error', _done); | ||
endEvents.forEach(function (name) { | ||
@@ -138,0 +130,0 @@ e.once(name, end); |
{ | ||
"name": "thunkify-wrap", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"repository": "dead-horse/node-thunkify-wrap", | ||
@@ -5,0 +5,0 @@ "description": "Turn callbacks, arrays, generators, generator functions, and promises into a thunk", |
@@ -7,3 +7,3 @@ | ||
describe.only('thunkify(object)', function(){ | ||
describe('thunkify(object)', function(){ | ||
before(function () { | ||
@@ -10,0 +10,0 @@ thunkify(read); |
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
13673
385