2021-02-08 12:58:32 +08:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
|
|
|
|
|
function getUserAgent() {
|
2021-06-04 22:19:14 +08:00
|
|
|
if (typeof navigator === "object" && "userAgent" in navigator) {
|
|
|
|
return navigator.userAgent;
|
|
|
|
}
|
2021-02-08 12:58:32 +08:00
|
|
|
|
2021-06-04 22:19:14 +08:00
|
|
|
if (typeof process === "object" && "version" in process) {
|
|
|
|
return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`;
|
2021-02-08 12:58:32 +08:00
|
|
|
}
|
2021-06-04 22:19:14 +08:00
|
|
|
|
|
|
|
return "<environment undetectable>";
|
2021-02-08 12:58:32 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
exports.getUserAgent = getUserAgent;
|
|
|
|
//# sourceMappingURL=index.js.map
|