MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / isDistinctiveIdentifier

Function isDistinctiveIdentifier

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

Source from the content-addressed store, hash-verified

638 * user chose (#516, #1262).
639 */
640export function isDistinctiveIdentifier(token: string): boolean {
641 if (!token) return false;
642 if (hasCjk(token)) return true;
643 // snake_case / SCREAMING_SNAKE, or an embedded digit → a deliberate identifier.
644 if (/[_0-9]/.test(token)) return true;
645 // An uppercase letter anywhere AFTER the first char → a camelCase/PascalCase
646 // boundary (setLastEmail, OrgUserStore) or an acronym (REST, HTTP).
647 if (/[A-Z]/.test(token.slice(1))) return true;
648 return false;
649}

Callers 1

Calls 1

hasCjkFunction · 0.85

Tested by

no test coverage detected