This commit is contained in:
thororen 2024-04-18 19:53:52 -04:00
parent 74177ea025
commit 130af33415
7 changed files with 72 additions and 17 deletions

View file

@ -581,3 +581,11 @@ export const DevsById = /* #__PURE__*/ (() =>
.map(([_, v]) => [v.id, v] as const)
))
)() as Record<string, Dev>;
export const EquicordDevsById = /* #__PURE__*/ (() =>
Object.freeze(Object.fromEntries(
Object.entries(EquicordDevs)
.filter(d => d[1].id !== 0n)
.map(([_, v]) => [v.id, v] as const)
))
)() as Record<string, Dev>;

View file

@ -18,7 +18,7 @@
import { Clipboard, Toasts } from "@webpack/common";
import { DevsById } from "./constants";
import { DevsById, EquicordDevsById } from "./constants";
/**
* Recursively merges defaults into an object and returns the same object
@ -114,3 +114,4 @@ export function identity<T>(value: T): T {
export const isMobile = navigator.userAgent.includes("Mobi");
export const isPluginDev = (id: string) => Object.hasOwn(DevsById, id);
export const isEquicordPluginDev = (id: string) => Object.hasOwn(EquicordDevsById, id);