MCPcopy Create free account
hub / github.com/VitoHowe/glm-coding / makeNoopProxy

Function makeNoopProxy

app/services/tdc_vm_runner.cjs:36–50  ·  view source on GitHub ↗
(target = {})

Source from the content-addressed store, hash-verified

34}
35
36function makeNoopProxy(target = {}) {
37 return new Proxy(target, {
38 get(obj, prop) {
39 if (prop === Symbol.toPrimitive) {
40 return () => '';
41 }
42 if (prop in obj) {
43 return obj[prop];
44 }
45 return function noop() {
46 return undefined;
47 };
48 },
49 });
50}
51
52function createElementStub(extra = {}) {
53 return makeNoopProxy({

Callers 4

createElementStubFunction · 0.85
buildWindowFunction · 0.85
getContextFunction · 0.85
createRangeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected