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

Function filterNode

frontend/src/react/components/sql-editor/filterNode.ts:10–17  ·  view source on GitHub ↗
(rootPath: string)

Source from the content-addressed store, hash-verified

8 */
9export const filterNode =
10 (rootPath: string) =>
11 (pattern: string, option: WorksheetFolderNode): boolean => {
12 const keyword = pattern.trim().toLowerCase();
13 if (option.key === rootPath || !keyword) {
14 return true;
15 }
16 return option.label?.toLowerCase().includes(keyword) ?? false;
17 };

Callers 1

SheetTreeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected