MCPcopy Create free account
hub / github.com/bytebase/bytebase / extractRoleResourceName

Function extractRoleResourceName

frontend/src/utils/role.ts:17–21  ·  view source on GitHub ↗
(resourceId: string)

Source from the content-addressed store, hash-verified

15};
16
17export const extractRoleResourceName = (resourceId: string): string => {
18 const pattern = /(?:^|\/)roles\/([^/]+)(?:$|\/)/;
19 const matches = resourceId.match(pattern);
20 return matches?.[1] ?? "";
21};
22
23export const displayRoleTitle = (role: string): string => {
24 switch (role) {

Callers 3

RoleSheetFunction · 0.90
displayRoleTitleFunction · 0.70
displayRoleDescriptionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected