MCPcopy
hub / github.com/colbymchenry/codegraph / isDistinctiveIdentifier

Function isDistinctiveIdentifier

src/search/query-utils.ts:433–441  ·  view source on GitHub ↗
(token: string)

Source from the content-addressed store, hash-verified

431 * identifier signals.
432 */
433export function isDistinctiveIdentifier(token: string): boolean {
434 if (!token) return false;
435 // snake_case / SCREAMING_SNAKE, or an embedded digit → a deliberate identifier.
436 if (/[_0-9]/.test(token)) return true;
437 // An uppercase letter anywhere AFTER the first char → a camelCase/PascalCase
438 // boundary (setLastEmail, OrgUserStore) or an acronym (REST, HTTP).
439 if (/[A-Z]/.test(token.slice(1))) return true;
440 return false;
441}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected