This commit is contained in:
j3d1 2026-08-01 12:17:37 +02:00
parent 32addb8ed1
commit 2f8683add1
15 changed files with 610 additions and 134 deletions

View file

@ -678,5 +678,17 @@ export default createStore({
}
return fallbackDefault
},
/**
* Extracts the human-readable name from a fully qualified handle.
* Handles look like "git:tools#tag:drill" or "git:base#property:length".
* If the given value does not look like a handle, it is returned unchanged.
*/
getNameFromHandle: () => (handle) => {
if (typeof handle !== 'string') {
return handle;
}
const match = handle.match(/#(?:tag|property):(.+)$/);
return match ? match[1] : handle;
},
}
})