MCPcopy
hub / github.com/ing-bank/lion / get

Function get

packages/singleton-manager/src/lazifyInstantiation.js:27–39  ·  view source on GitHub ↗
(_target, prop)

Source from the content-addressed store, hash-verified

25 {},
26 {
27 get(_target, prop) {
28 const instance = getSingletonInstance();
29 // Somehow addEventListener and removeEventListner throws Illegal Invocation error without binding
30 if (prop === 'addEventListener' || prop === 'removeEventListener') {
31 return Reflect.get(instance, prop).bind(instance);
32 }
33
34 if (prop === '__instance_for_testing') {
35 return instance;
36 }
37
38 return Reflect.get(instance, prop, instance);
39 },
40 set(_target, prop, value) {
41 return Reflect.set(getSingletonInstance(), prop, value);
42 },

Callers

nothing calls this directly

Calls 2

getSingletonInstanceFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected