Comparing version 3.3.2 to 4.0.0
@@ -31,5 +31,7 @@ var run = require('./run'), | ||
dependencies, | ||
fn; | ||
fn, | ||
isReturnless; | ||
if(!names.length){ | ||
isReturnless = true; | ||
names.push((returnlessId++).toString() + '__returnless'); | ||
@@ -94,2 +96,3 @@ } | ||
tasks[name] = { | ||
returnless: isReturnless, | ||
names: names, | ||
@@ -96,0 +99,0 @@ args: dependencies, |
{ | ||
"name": "kgo", | ||
"version": "3.3.2", | ||
"version": "4.0.0", | ||
"description": "Flow control the super easy way", | ||
@@ -5,0 +5,0 @@ "main": "kgo.js", |
@@ -42,3 +42,7 @@ var symbols = require('./symbols'), | ||
try{ | ||
this._task.fn.apply(this, this._args.concat([complete])); | ||
var args = this._args.slice(); | ||
if(!this._task.returnless){ | ||
args.push(complete); | ||
} | ||
this._task.fn.apply(this, args); | ||
}catch(error){ | ||
@@ -45,0 +49,0 @@ throw cleanError(step._task.stack, error); |
@@ -179,5 +179,4 @@ var test = require('tape'), | ||
}) | ||
(['foo'], function(foo, done){ | ||
(['foo'], function(foo){ | ||
t.equal(foo, 1); | ||
done(); | ||
}) | ||
@@ -317,5 +316,5 @@ (['bar'], function(bar){ | ||
}) | ||
(['*', '!result'], function(error, shouldBeDoneFn){ | ||
(['*', '!result'], function(error){ | ||
t.notOk(error); | ||
t.equal(typeof shouldBeDoneFn, 'function'); | ||
t.equal(arguments.length, 1, 'no result, no done'); | ||
}); | ||
@@ -322,0 +321,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
26821
738