UNPKG

@wmfs/asl-choice-processor

Version:

For determining the next state given an Amazon States Language 'Choices' definition and a set of values.

10 lines (8 loc) 267 B
'use strict' module.exports = function includesOperator (inputValue, comparisonValue, candidateStateName, cache) { let nextState if (Array.isArray(inputValue) && inputValue.includes(comparisonValue)) { nextState = candidateStateName } return nextState }