Rewrites the option values a condition compares one Choice question's answer with.
Reads the comparisons DecisionChoiceTestOf recognizes, wherever they sit in a condition:
decisions.<step>.<question>.value against a string literal by ===, ==, !== or !=, with the
literal on either side. A literal is matched by its raw text, as the Choice test and the fork check
read it, and written back with DecisionConditionLiteral; a new value no literal can carry
verbatim leaves its literal as written. Other reads of the answer — probabilities.<value>, a
literal passed to a function — are not comparisons of value and are left alone.
Parameters
condition: string
the condition to rewrite
step: string
the step whose answer is compared, as the condition names it (a flow's step key)
question: string
the Choice question's key
rename: (value:string)=>string
maps an option value to its new value, or undefined to leave it
Rewrites the option values a condition compares one Choice question's answer with.
Reads the comparisons DecisionChoiceTestOf recognizes, wherever they sit in a condition:
decisions.<step>.<question>.valueagainst a string literal by===,==,!==or!=, with the literal on either side. A literal is matched by its raw text, as the Choice test and the fork check read it, and written back with DecisionConditionLiteral; a new value no literal can carry verbatim leaves its literal as written. Other reads of the answer —probabilities.<value>, a literal passed to a function — are not comparisons ofvalueand are left alone.