1
0
Files
stale/node_modules/universal-user-agent/dist-src/node.js
T

13 lines
358 B
JavaScript
Raw Normal View History

2020-05-15 15:25:57 -04:00
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>";
}
}