MCPcopy Index your code
hub / github.com/simstudioai/sim / normalizeCredentialEnvKey

Function normalizeCredentialEnvKey

apps/sim/lib/api/contracts/credentials.ts:7–11  ·  view source on GitHub ↗
(raw: string)

Source from the content-addressed store, hash-verified

5const ENV_VAR_NAME_REGEX = /^[A-Za-z0-9_]+$/
6
7export function normalizeCredentialEnvKey(raw: string): string {
8 const trimmed = raw.trim()
9 const wrappedMatch = /^\{\{\s*([A-Za-z0-9_]+)\s*\}\}$/.exec(trimmed)
10 return wrappedMatch ? wrappedMatch[1] : trimmed
11}
12
13export const workspaceCredentialTypeSchema = z.enum([
14 'oauth',

Callers 2

route.tsFile · 0.90
credentials.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected