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

Function buildGroupFilter

frontend/src/react/stores/app/group.ts:31–41  ·  view source on GitHub ↗
(params: GroupFilter)

Source from the content-addressed store, hash-verified

29};
30
31export const buildGroupFilter = (params: GroupFilter) => {
32 const filter = [];
33 const search = params.query?.trim()?.toLowerCase();
34 if (search) {
35 filter.push(`(title.contains("${search}") || email.contains("${search}"))`);
36 }
37 if (isValidProjectName(params.project)) {
38 filter.push(`project == "${params.project}"`);
39 }
40 return filter.join(" && ");
41};
42
43export const createGroupSlice: AppSliceCreator<GroupSlice> = (set, get) => ({
44 groupsByName: {},

Callers 1

createGroupSliceFunction · 0.85

Calls 1

isValidProjectNameFunction · 0.90

Tested by

no test coverage detected