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

Function getInstanceAndDatabaseId

frontend/src/store/modules/v1/common.ts:182–193  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

180};
181
182export const getInstanceAndDatabaseId = (name: string): string[] => {
183 const tokens = getNameParentTokens(name, [
184 instanceNamePrefix,
185 databaseNamePrefix,
186 ]);
187
188 if (tokens.length !== 2) {
189 return ["", ""];
190 }
191
192 return tokens;
193};
194
195export const extractGroupEmail = (emailResource: string) => {
196 const matches = emailResource.match(/^(?:group:|groups\/)(.+)$/);

Callers

nothing calls this directly

Calls 1

getNameParentTokensFunction · 0.85

Tested by

no test coverage detected