getOS
A function that returns the OS value based on the userAgent
.
- server: Server Environment
- ios: iOS Environment
- android: Android Environment
- otherMobile: Other Mobile Environment(ex: BlackBerry)
- web: Web Environment
Interface
const getOS: () => "server" | "ios" | "android" | "otherMobile" | "web"
Usage
import { getOS } from '@devgrace/utils';
const os = getOS();