1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-24 08:09:08 -05:00
denoland-deno/ext/node/polyfills/_util/os.ts
Bartek Iwańczuk 345423cf76
refactor: Use virtul ops module (#22175)
Follow up to #22157.

This leaves us with 4 usages of `ensureFastOps()` in `deno` itself.
There's also about 150 usages of `Deno.core.ops.<op_name>` left as well.
2024-01-29 22:02:26 +01:00

16 lines
395 B
TypeScript

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