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

No files matched your search

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