MCPcopy Create free account
hub / github.com/scriptscat/scriptcat / lcs

Function lcs

src/pkg/utils/regex_to_glob.ts:132–137  ·  view source on GitHub ↗
(strs: string[])

Source from the content-addressed store, hash-verified

130 return p;
131 }
132 function lcs(strs: string[]): string {
133 if (strs.length === 0) return "";
134 const rev = strs.map((s) => [...s].reverse().join(""));
135 const r = lcp(rev);
136 return [...r].reverse().join("");
137 }
138 function isEscaped(s: string, idx: number): boolean {
139 let k = idx - 1,
140 cnt = 0;

Callers 1

parseGroupFunction · 0.85

Calls 1

lcpFunction · 0.85

Tested by

no test coverage detected