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

Function setGlobalVariable

tests/e2e/utils/env.ts:3–9  ·  view source on GitHub ↗
(name: string, value: any)

Source from the content-addressed store, hash-verified

1const ENV_PREFIX = 'LEGACY_CLI__';
2
3export function setGlobalVariable(name: string, value: any) {
4 if (value === undefined) {
5 delete process.env[ENV_PREFIX + name];
6 } else {
7 process.env[ENV_PREFIX + name] = JSON.stringify(value);
8 }
9}
10
11export function getGlobalVariable<T = any>(name: string): T {
12 const value = process.env[ENV_PREFIX + name];

Callers 3

e2e_runner.tsFile · 0.90
001-npm-sandbox.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected