Skip to content


OS object is used to get OS details.

  • Module: platform/os
  • Source: /platform/os.ts
  • Status: stable
  • Group: platform

Basic Usage

import { os } from "sdk/platform";

if (os.isWindows()) {
    // Windows logic here

if (os.isUnix()) {
    // Unix logic here

const osName =;
console.log("OS is: " + osName);


Constant Description Returns
name The name of the current OS which corresponds to the system property string


Function Description Returns
isWindows() Check whether current OS is Windows boolean
isUnix() Check whether current OS is Unix boolean