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

Function getUserConfigStr

src/pkg/utils/utils.ts:422–429  ·  view source on GitHub ↗
(code: string)

Source from the content-addressed store, hash-verified

420}
421
422export function getUserConfigStr(code: string): string | null {
423 const start = code.indexOf("==UserConfig==");
424 const end = code.indexOf("==/UserConfig==");
425 if (start === -1 || end === -1) {
426 return null;
427 }
428 return `/* ${code.substring(start, end + 15)} */`;
429}
430
431export const obtainBlackList = (strBlacklist: string | null | undefined) => {
432 const blacklist = strBlacklist

Callers 5

script.test.tsFile · 0.90
enableScriptMethod · 0.90
runScriptMethod · 0.90
parseScriptLoadInfoFunction · 0.90
getScriptsForTabMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected