mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-23 08:16:17 -04:00
14 lines
314 B
JavaScript
14 lines
314 B
JavaScript
![]() |
/**
|
||
|
* 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]);
|
||
|
});
|
||
|
}
|