1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-11-14 18:57:41 +01:00
upscayl/electron/utils/get-device-specs.ts
2023-09-11 08:37:07 +05:30

33 lines
537 B
TypeScript

"use strict";
import { platform, arch } from "os";
export const getPlatform = () => {
switch (platform()) {
case "aix":
case "freebsd":
case "linux":
case "openbsd":
case "android":
return "linux";
case "darwin":
case "sunos":
return "mac";
case "win32":
return "win";
}
};
export const getArch = () => {
switch (arch()) {
case "x64":
return "x64";
case "x32":
return "x86";
case "arm":
return "arm";
case "arm64":
return "arm64";
}
};