mirror of
https://github.com/gchq/CyberChef
synced 2025-12-12 06:13:31 +00:00
Add Jump
This commit is contained in:
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]);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user