MCPcopy Create free account
hub / github.com/Noumena-Network/code / isValidApiKey

Function isValidApiKey

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

Source from the content-addressed store, hash-verified

1161)
1162
1163function isValidApiKey(apiKey: string): boolean {
1164 // Only allow alphanumeric characters, dashes, and underscores
1165 return /^[a-zA-Z0-9-_]+$/.test(apiKey)
1166}
1167
1168export async function saveApiKey(apiKey: string): Promise<void> {
1169 if (!isValidApiKey(apiKey)) {

Callers 1

saveApiKeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected