(token: string)
| 638 | * user chose (#516, #1262). |
| 639 | */ |
| 640 | export 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 | } |
no test coverage detected