summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/_util/os.ts
blob: 421d5d9da0837f57d7c75ace2bc65689e2bdd7d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

import { op_node_build_os } from "ext:core/ops";

export type OSType =
  | "windows"
  | "linux"
  | "android"
  | "darwin"
  | "freebsd"
  | "openbsd";

export const osType: OSType = op_node_build_os();

export const isWindows = osType === "windows";
export const isLinux = osType === "linux" || osType === "android";