forgot this

This commit is contained in:
Nuckyz 2024-07-02 20:01:15 -03:00
parent bc34d72b57
commit 3331ed2155
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -841,17 +841,17 @@ export const cacheFindModuleFactory = traceFunction("cacheFindModuleFactory", fu
* Search modules by keyword. This searches the factory methods,
* meaning you can search all sorts of things, methodName, strings somewhere in the code, etc.
*
* @param filters One or more strings or regexes
* @param code One or more strings or regexes
* @returns Mapping of found modules
*/
export function search(...filters: CodeFilter) {
export function search(...code: CodeFilter) {
const results = {} as Record<number, Function>;
const factories = wreq.m;
for (const id in factories) {
const factory = factories[id];
if (stringMatches(String(factory), filters)) {
if (stringMatches(String(factory), code)) {
results[id] = factory;
}
}