function detectOS
detectOS(): OS

Detects the user's operating system from the user agent string. Useful for platform-specific styling or functionality.

Examples

Example 1

import { detectOS } from "hibana/utils/dom_utils.ts";

const os = detectOS();
document.body.classList.add(`os-${os}`);

Return Type

The detected operating system

Usage

import { detectOS } from ".";