MCPcopy Index your code
hub / github.com/angular/angular-cli / getGlobalVariable

Function getGlobalVariable

tests/e2e/utils/env.ts:11–17  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

9}
10
11export function getGlobalVariable<T = any>(name: string): T {
12 const value = process.env[ENV_PREFIX + name];
13 if (value === undefined) {
14 throw new Error(`Trying to access variable "${name}" but it's not defined.`);
15 }
16 return JSON.parse(value) as T;
17}
18
19export function getGlobalVariablesEnv(): NodeJS.ProcessEnv {
20 return Object.keys(process.env)

Callers 15

runInitializerFunction · 0.90
findPackageTarsFunction · 0.90
deleteTemporaryRootFunction · 0.90
getActivePackageManagerFunction · 0.90
setRegistryFunction · 0.90
copyProjectAssetFunction · 0.90
getTestAssetsDirFunction · 0.90
createNpmRegistryFunction · 0.90
ngServeFunction · 0.90
prepareProjectForE2eFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected