swc/bundler/tests/.cache/deno/013993bd641a8f773adbcb8f51d7fa01cc2065ad.ts
강동윤 bbaf619f63
fix(bundler): Fix bugs (#1437)
swc_bundler:
 - [x] Fix wrapped esms. (denoland/deno#9307)
 - [x] Make test secure.
2021-03-02 17:33:03 +09:00

22 lines
514 B
TypeScript

// Loaded from https://deno.land/std@0.79.0/_util/os.ts
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
export const osType = (() => {
if (globalThis.Deno != null) {
return Deno.build.os;
}
// deno-lint-ignore no-explicit-any
const navigator = (globalThis as any).navigator;
if (navigator?.appVersion?.includes?.("Win") ?? false) {
return "windows";
}
return "linux";
})();
export const isWindows = osType === "windows";