mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
ESM: Tidied up FlowControl ops
This commit is contained in:
parent
1472f82205
commit
28b24b725f
9 changed files with 6 additions and 34 deletions
|
@ -50,8 +50,6 @@ class ConditionalJump extends Operation {
|
|||
}
|
||||
|
||||
/**
|
||||
* Conditional Jump operation.
|
||||
*
|
||||
* @param {Object} state - The current state of the recipe.
|
||||
* @param {number} state.progress - The current position in the recipe.
|
||||
* @param {Dish} state.dish - The Dish being operated on.
|
||||
|
@ -62,10 +60,7 @@ class ConditionalJump extends Operation {
|
|||
async run(state) {
|
||||
const ings = state.opList[state.progress].ingValues,
|
||||
dish = state.dish,
|
||||
regexStr = ings[0],
|
||||
invert = ings[1],
|
||||
label = ings[2],
|
||||
maxJumps = ings[3],
|
||||
[regexStr, invert, label, maxJumps] = ings,
|
||||
jmpIndex = getLabelIndex(label, state);
|
||||
|
||||
if (state.numJumps >= maxJumps || jmpIndex === -1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue