MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / searchCode

Method searchCode

src/app/service/service_worker/script.ts:670–686  ·  view source on GitHub ↗
(keyword: string)

Source from the content-addressed store, hash-verified

668 return stringMatching(script.name, keyword);
669 };
670 const searchCode = (keyword: string) => {
671 let c = codeCache[script.uuid];
672 if (!c) {
673 const code = scriptCode;
674 if (code && code.uuid === script.uuid) {
675 codeCache[script.uuid] = c = code.code;
676 c = code.code;
677 }
678 }
679 if (c) {
680 if (OPTION_CASE_INSENSITIVE) {
681 return stringMatching(c.toLowerCase(), keyword.toLowerCase());
682 }
683 return stringMatching(c, keyword);
684 }
685 return false;
686 };
687
688 let codeMatched = true;
689 let nameMatched = true;

Callers

nothing calls this directly

Calls 1

stringMatchingFunction · 0.90

Tested by

no test coverage detected