Initial commit

This commit is contained in:
anaarmas
2020-04-27 21:08:38 +02:00
commit ed9e55c0bf
13975 changed files with 2635882 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
export function getUserAgent() {
try {
return navigator.userAgent;
}
catch (e) {
return "<environment undetectable>";
}
}
+1
View File
@@ -0,0 +1 @@
export { getUserAgent } from "./node";
+12
View File
@@ -0,0 +1,12 @@
import osName from "os-name";
export function getUserAgent() {
try {
return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`;
}
catch (error) {
if (/wmic os get Caption/.test(error.message)) {
return "Windows <version undetectable>";
}
return "<environment undetectable>";
}
}