2019-09-21 06:49:40 +09:00
|
|
|
"use strict";
|
|
|
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
2019-09-18 09:59:07 +09:00
|
|
|
function getOS(platform) {
|
2019-09-21 10:11:39 +09:00
|
|
|
if (platform === 'linux') {
|
|
|
|
|
return 'Linux';
|
2019-09-21 06:49:40 +09:00
|
|
|
}
|
2019-09-21 10:11:39 +09:00
|
|
|
else if (platform === 'darwin') {
|
|
|
|
|
return 'macOS';
|
2019-09-21 06:49:40 +09:00
|
|
|
}
|
2019-09-21 10:11:39 +09:00
|
|
|
else if (platform === 'win32') {
|
|
|
|
|
return 'Windows';
|
2019-09-21 06:49:40 +09:00
|
|
|
// throw new Error("Windows is not supported");
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
throw new Error(`${platform} is not supported`);
|
|
|
|
|
}
|
2019-09-18 09:59:07 +09:00
|
|
|
}
|
2019-09-21 06:49:40 +09:00
|
|
|
exports.default = getOS;
|