MCPcopy
hub / github.com/codeaashu/claude-code / isValidApiKey

Function isValidApiKey

src/utils/auth.ts:1089–1092  ·  view source on GitHub ↗
(apiKey: string)

Source from the content-addressed store, hash-verified

1087)
1088
1089function isValidApiKey(apiKey: string): boolean {
1090 // Only allow alphanumeric characters, dashes, and underscores
1091 return /^[a-zA-Z0-9-_]+$/.test(apiKey)
1092}
1093
1094export async function saveApiKey(apiKey: string): Promise<void> {
1095 if (!isValidApiKey(apiKey)) {

Callers 1

saveApiKeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected