Files
release-action/node_modules/universal-user-agent/dist-src/index.js
Nick Cipollo 65f33a2c24
Some checks failed
Test / check_pr (push) Has been cancelled
Prepare release 1.8.7
2021-08-05 16:52:42 -04:00

10 lines
350 B
JavaScript

export function getUserAgent() {
if (typeof navigator === "object" && "userAgent" in navigator) {
return navigator.userAgent;
}
if (typeof process === "object" && "version" in process) {
return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`;
}
return "<environment undetectable>";
}