This commit is contained in:
d98762625 2018-05-18 12:50:23 +01:00
parent bca73b496f
commit bfb405c4a6
3 changed files with 111 additions and 32 deletions

View 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]);
});
}