@wmfs/asl-choice-processor
Version:
For determining the next state given an Amazon States Language 'Choices' definition and a set of values.
12 lines (9 loc) • 322 B
JavaScript
module.exports = function isBooleanOperator (inputValue, comparisonValue, candidateStateName, cache) {
const isBoolean = typeof inputValue === 'boolean'
if (isBoolean && comparisonValue === true) {
return candidateStateName
}
if (!isBoolean && comparisonValue !== true) {
return candidateStateName
}
}