MCPcopy Index your code
hub / github.com/github/awesome-copilot / signatureMatches

Function signatureMatches

extensions/java-modernization-studio/scan.mjs:359–372  ·  view source on GitHub ↗
(text, sig)

Source from the content-addressed store, hash-verified

357// hikari -> "hikaricp", s3 -> "...-s3"). Signatures that intentionally start with a
358// separator (e.g. ".jks") are matched as plain substrings.
359function signatureMatches(text, sig) {
360 const s = sig.toLowerCase();
361 if (!s) return false;
362 const alnum = (c) => (c >= "a" && c <= "z") || (c >= "0" && c <= "9");
363 if (!alnum(s[0])) return text.includes(s);
364 let from = 0;
365 for (;;) {
366 const i = text.indexOf(s, from);
367 if (i < 0) return false;
368 const before = i === 0 ? "" : text[i - 1];
369 if (before === "" || !alnum(before)) return true; // signature begins a token
370 from = i + 1;
371 }
372}
373
374function detectDependencies(buildText) {
375 const text = (buildText || "").toLowerCase();

Callers 1

detectDependenciesFunction · 0.85

Calls 1

alnumFunction · 0.85

Tested by

no test coverage detected