Comparing version 0.0.13 to 0.0.14
// Generated by CoffeeScript 1.9.1 | ||
(function() { | ||
var I, Q, Result, _, assert, buildDescription, crossCombineResults, describeScenario, getCounts, interpolate, lastResult, makeResult, resolveResultArgs, resolveResults, uuid, | ||
var I, Q, Result, _, assert, buildDescription, crossCombineResults, describeScenario, getCounts, interpolate, lastResult, makeResult, resolveResultArray, resolveResultObject, uuid, | ||
slice = [].slice; | ||
@@ -216,7 +216,7 @@ | ||
resolveResultArgs = function(context, args) { | ||
resolveResultArray = function(context, args) { | ||
var argsCopy, i, j, ref; | ||
argsCopy = _.clone(args); | ||
for (i = j = 0, ref = argsCopy.length; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) { | ||
argsCopy[i] = resolveResults(context, argsCopy[i]); | ||
argsCopy[i] = resolveResultObject(context, argsCopy[i]); | ||
} | ||
@@ -226,33 +226,26 @@ return argsCopy; | ||
resolveResults = function(context, object) { | ||
var i, j, key, objectCopy, ref, result; | ||
if (!object) { | ||
return; | ||
} | ||
if (typeof object !== 'object') { | ||
return object; | ||
} | ||
if (object instanceof Date) { | ||
return object; | ||
} | ||
if (object instanceof RegExp) { | ||
return object; | ||
} | ||
objectCopy = _.clone(object); | ||
if (Array.isArray(objectCopy)) { | ||
for (i = j = 0, ref = objectCopy.length; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) { | ||
result = objectCopy[i]; | ||
if (result instanceof Result) { | ||
objectCopy[i] = result.getFromContext(context); | ||
resolveResultObject = function(context, object) { | ||
var key, objectCopy, result; | ||
return ((function() { | ||
if (object instanceof Result) { | ||
return object.getFromContext(context); | ||
} else if (!object) { | ||
return object; | ||
} else if (typeof object !== 'object') { | ||
return object; | ||
} else if (object instanceof Date) { | ||
return object; | ||
} else if (object instanceof RegExp) { | ||
return object; | ||
} else if (Array.isArray(object)) { | ||
return resolveResultArray(context, object); | ||
} else { | ||
objectCopy = _.clone(object); | ||
for (key in objectCopy) { | ||
result = objectCopy[key]; | ||
objectCopy[key] = resolveResultObject(context, result); | ||
} | ||
return objectCopy; | ||
} | ||
return objectCopy; | ||
} | ||
for (key in objectCopy) { | ||
result = objectCopy[key]; | ||
if (result instanceof Result) { | ||
objectCopy[key] = result.getFromContext(context); | ||
} | ||
} | ||
return objectCopy; | ||
})()); | ||
}; | ||
@@ -279,3 +272,3 @@ | ||
newContext.updateContext(); | ||
return Q(fn.apply(newContext, resolveResultArgs((ref = crossCombineResults.getFromContext(context)) != null ? ref : {}, args))).then(function(result) { | ||
return Q(fn.apply(newContext, resolveResultArray((ref = crossCombineResults.getFromContext(context)) != null ? ref : {}, args))).then(function(result) { | ||
var nextStep; | ||
@@ -282,0 +275,0 @@ nextStep = function() { |
{ | ||
"name": "gwt", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"description": "Given, when, then", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
15171
411