stash
This commit is contained in:
parent
32addb8ed1
commit
2f8683add1
15 changed files with 610 additions and 134 deletions
|
|
@ -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;
|
||||
},
|
||||
}
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue