MCPcopy
hub / github.com/electron/forge / getOwnPropertyDescriptor

Function getOwnPropertyDescriptor

packages/api/core/src/util/forge-config.ts:80–98  ·  view source on GitHub ↗
(target, name)

Source from the content-addressed store, hash-verified

78 return value;
79 },
80 getOwnPropertyDescriptor(target, name) {
81 const envValue =
82 process.env[`${envPrefix}_${underscoreCase(name as string)}`];
83 // eslint-disable-next-line no-prototype-builtins
84 if (target.hasOwnProperty(name)) {
85 return Reflect.getOwnPropertyDescriptor(target, name);
86 }
87
88 if (envValue) {
89 return {
90 writable: true,
91 enumerable: true,
92 configurable: true,
93 value: envValue,
94 };
95 }
96
97 return undefined;
98 },
99 });
100};
101/* eslint-enable @typescript-eslint/no-explicit-any */

Callers

nothing calls this directly

Calls 1

underscoreCaseFunction · 0.85

Tested by

no test coverage detected