MCPcopy Create free account
hub / github.com/getsentry/sentry-javascript / getVercelEnv

Function getVercelEnv

packages/nextjs/src/common/getVercelEnv.ts:6–9  ·  view source on GitHub ↗
(isClient: boolean)

Source from the content-addressed store, hash-verified

4 * @param isClient Flag to indicate whether to use the `NEXT_PUBLIC_` prefixed version of the environment variable.
5 */
6export function getVercelEnv(isClient: boolean): string | undefined {
7 const vercelEnvVar = isClient ? process.env.NEXT_PUBLIC_VERCEL_ENV : process.env.VERCEL_ENV;
8 return vercelEnvVar ? `vercel-${vercelEnvVar}` : undefined;
9}

Callers 2

initFunction · 0.90
initFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected