Comparing version 1.8.8 to 1.9.0
@@ -28,3 +28,14 @@ // Generated by CoffeeScript 1.3.3 | ||
return tasks.push(function(complete) { | ||
return listener(data, complete); | ||
var err, result; | ||
if (listener.length === 1) { | ||
result = listener(data); | ||
if (result instanceof Error) { | ||
err = result; | ||
} else { | ||
err = null; | ||
} | ||
return complete(err, result); | ||
} else { | ||
return listener(data, complete); | ||
} | ||
}); | ||
@@ -42,3 +53,14 @@ }); | ||
return tasks.push(function(complete) { | ||
return listener(data, complete); | ||
var err, result; | ||
if (listener.length === 1) { | ||
result = listener(data); | ||
if (result instanceof Error) { | ||
err = result; | ||
} else { | ||
err = null; | ||
} | ||
return complete(err, result); | ||
} else { | ||
return listener(data, complete); | ||
} | ||
}); | ||
@@ -45,0 +67,0 @@ }); |
{ | ||
"name": "bal-util", | ||
"version": "1.8.8", | ||
"version": "1.9.0", | ||
"description": "Common utility functions for Node.js used and maintained by Benjamin Lupton", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/balupton/bal-util", |
57695
1716