MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / getEnvVar

Function getEnvVar

packages/cloudflare/src/options.ts:21–25  ·  view source on GitHub ↗
(env: unknown, varName: keyof T)

Source from the content-addressed store, hash-verified

19}
20
21function getEnvVar<T extends Record<string, unknown>>(env: unknown, varName: keyof T): string | undefined {
22 return typeof env === 'object' && env !== null && varName in env && typeof (env as T)[varName] === 'string'
23 ? ((env as T)[varName] as string)
24 : undefined;
25}
26
27/**
28 * Merges the options passed in from the user with the options we read from

Callers 1

getFinalOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected