MCPcopy
hub / github.com/redpanda-data/console / addProp

Function addProp

frontend/src/utils/env.ts:84–91  ·  view source on GitHub ↗
(key: string, value: unknown)

Source from the content-addressed store, hash-verified

82const envVarDebugAr: { name: string; value: string }[] = [];
83
84const addProp = (key: string, value: unknown) => {
85 if (value === undefined || value === null || value === '') {
86 return;
87 }
88 const cleanedKey = key.removePrefix('REACT_APP_CONSOLE_').removePrefix('REACT_APP_');
89 envVarDebugObj[cleanedKey] = String(value);
90 envVarDebugAr.push({ name: cleanedKey, value: String(value) });
91};
92// - add env vars
93for (const k in env) {
94 if (Object.hasOwn(env, k)) {

Callers 1

env.tsFile · 0.85

Calls 2

removePrefixMethod · 0.80
StringInterface · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…