some tweaks (#22)

This commit is contained in:
botato 2022-10-01 16:05:15 -07:00 committed by GitHub
parent 57d586fab7
commit acf06203b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 7 deletions

View file

@ -135,7 +135,7 @@ export function search(...filters: Array<string | RegExp>) {
const factories = wreq.m;
outer:
for (const id in factories) {
const factory = factories[id];
const factory = factories[id].original ?? factories[id];
const str: string = factory.toString();
for (const filter of filters) {
if (typeof filter === "string" && !str.includes(filter)) continue outer;