MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / i

Function i

scripts/backup/fb-proxy.js:90–240  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

88 });
89 const moduleNames = [];
90 function i(e) {
91 let [moduleName, dependencies, callback] = e;
92
93 if (typeof moduleName != "string" || moduleNames.includes(moduleName))
94 return;
95
96 moduleNames.push(moduleName);
97 e[2] = (function (orig, _moduleName) {
98 if (!w[_moduleName]) return orig;
99 const k = w[_moduleName];
100 k.sort((a, A) => a.options.order - A.options.order);
101 const E = k.find((a) => a.options.skipOthers);
102 return cacheFunction(
103 E
104 ? E.replacement(orig.toString())
105 : k.reduce((a, A) => (a = A.replacement(a)), orig.toString())
106 );
107 })(e[2], moduleName);
108
109 e[2] = (function (orig, _moduleName) {
110 return u[_moduleName]
111 ? new Proxy(orig, {
112 apply(target, thisArg, argsList) {
113 if (argsList[5] && argsList[5].dependencies)
114 for (let i = 0; i < argsList[5].dependencies.length; i++)
115 argsList.push(argsList[5].dependencies[i].exports);
116 const res = target.apply(thisArg, argsList);
117 return (
118 u[_moduleName].map((x) => {
119 x(argsList);
120 }),
121 res
122 );
123 },
124 })
125 : orig;
126 })(e[2], moduleName);
127
128 e[2] = (function (orig, _moduleName) {
129 if (
130 !moduleCached[_moduleName] ||
131 moduleCached[_moduleName].length === 0
132 )
133 return orig;
134 const k = moduleCached[_moduleName];
135 k.sort((a, A) => a.options.order - A.options.order);
136 const E = k.reduce((a, A) => {
137 const x = A.options.definerPath;
138 return (a[x] = a[x] || []), a[x].push(A), a;
139 }, {});
140 return new Proxy(orig, {
141 apply(target, thisArg, argsList) {
142 const L = target.apply(thisArg, argsList);
143 if (argsList[5] && argsList[5].dependencies)
144 for (let j = 0; j < argsList[5].dependencies.length; j++)
145 argsList.push(argsList[5].dependencies[j].exports);
146 const _import = argsList[3],
147 Q = (0, argsList[2])("CometErrorBoundary.react"),

Callers 1

fb-proxy.jsFile · 0.70

Calls 2

cacheFunctionFunction · 0.85
sortMethod · 0.80

Tested by

no test coverage detected