1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 23:34:47 -05:00
denoland-deno/ext/node/polyfills/_util/os.ts

17 lines
395 B
TypeScript
Raw Normal View History

// 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";