Skip to content
Kunkun

OS

Docs: https://docs.api.kunkun.sh/interfaces/ui.IOs

This API provides some basic info about the OS.

  • platform: [ ]
  • arch: [ os:all ]
  • exeExtension: [ os:all ]
  • family: [ os:all ]
  • hostname: [ os:all ]
  • eol: [ os:all ]
  • version: [ os:all ]
  • locale: [ os:all ]
import { os } from "@kksh/api/ui/worker"
// or
import { os } from "@kksh/api/ui/iframe"
const platform = await os.platform()
console.log(platform) // "windows" | "mnacos" | "linux"