chore: dedupe platform consts

This commit is contained in:
Lewis Crichton
2023-10-28 12:46:48 +01:00
parent bfb48b4faf
commit ba53acdca7
4 changed files with 12 additions and 9 deletions

View File

@ -389,3 +389,10 @@ export const DevsById = /* #__PURE__*/ (() =>
.map(([_, v]) => [v.id, v] as const)
))
)() as Record<string, Dev>;
const { platform } = navigator;
export const isWindows = platform.startsWith("Win");
export const isMac = platform.startsWith("Mac");
export const isLinux = platform.startsWith("Linux");