MCPcopy
hub / github.com/promptfoo/promptfoo / get

Function get

src/util/processShim.ts:101–114  ·  view source on GitHub ↗
(target, prop)

Source from the content-addressed store, hash-verified

99
100 cachedNodeProcessShim = new Proxy(process, {
101 get(target, prop) {
102 if (prop === 'mainModule') {
103 return {
104 require: esmRequire,
105 exports: {},
106 id: '.',
107 filename: '',
108 loaded: true,
109 children: [],
110 paths: [],
111 };
112 }
113 return Reflect.get(target, prop);
114 },
115 });
116 } catch {
117 // If createRequire fails for any reason, return browser shim as fallback

Callers 5

evalConfig.tsFile · 0.50
store.tsFile · 0.50
store.tsFile · 0.50

Calls 1

getMethod · 0.45

Tested by

no test coverage detected