MCPcopy Create free account
hub / github.com/dailydotdev/apps / wrap

Function wrap

oxlint-plugins/eslint-compat.mjs:11–23  ·  view source on GitHub ↗
(target, overrides)

Source from the content-addressed store, hash-verified

9};
10
11const wrap = (target, overrides) =>
12 new Proxy(
13 {},
14 {
15 get: (_, key) => {
16 if (key in overrides) {
17 return overrides[key];
18 }
19 const value = Reflect.get(target, key);
20 return typeof value === 'function' ? value.bind(target) : value;
21 },
22 },
23 );
24
25const withParserServices = (context) => {
26 const sourceCode = wrap(context.sourceCode, { parserServices });

Callers 1

withParserServicesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected