mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
15 lines
434 B
TypeScript
15 lines
434 B
TypeScript
import is from '@sindresorhus/is';
|
|
import os from 'os';
|
|
import semver from 'semver';
|
|
|
|
export const isMacOS = () => process.platform === 'darwin';
|
|
export const isLinux = () => process.platform === 'linux';
|
|
export const isWindows = (minVersion?: string) => {
|
|
const osRelease = os.release();
|
|
|
|
if (process.platform !== 'win32') {
|
|
return false;
|
|
}
|
|
|
|
return is.undefined(minVersion) ? true : semver.gte(osRelease, minVersion);
|
|
};
|