mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-23 16:26:16 -04:00
Add Jump
This commit is contained in:
parent
bca73b496f
commit
bfb405c4a6
3 changed files with 111 additions and 32 deletions
13
src/core/lib/FlowControl.mjs
Normal file
13
src/core/lib/FlowControl.mjs
Normal file
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
* Returns the index of a label.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} state
|
||||
* @param {string} name
|
||||
* @returns {number}
|
||||
*/
|
||||
export function getLabelIndex(name, state) {
|
||||
return state.opList.findIndex((operation) => {
|
||||
return (operation.name === "Label") && (name === operation.ingValues[0]);
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue