ggez-banking-sdk
Version:
A Node.js package to handle GGEZ Banking API endpoints, Simplify the process of managing CRUD operations with this efficient and easy-to-use package.
35 lines (34 loc) • 871 B
JavaScript
import { UAParser } from "ua-parser-js";
class ClientHelper {
clientBrowserData;
constructor() {
const uaParser = new UAParser();
this.clientBrowserData = uaParser.getResult();
}
getBrowser() {
return this.clientBrowserData.browser.name;
}
getBrowserVersion() {
return this.clientBrowserData.browser.version;
}
getOS() {
return this.clientBrowserData.os.name;
}
getOSVersion() {
return this.clientBrowserData.os.version;
}
getCPU() {
return this.clientBrowserData.cpu.architecture;
}
getUserAgent() {
return this.clientBrowserData.ua;
}
getSystemLanguage() {
return window.navigator.language;
}
isHostOnly() {
const host = window.location.hostname;
return host === "localhost";
}
}
export { ClientHelper };