Added a very complicated AsyncIterableReader class.
The class was already implemented in "https://deno.land/std@0.144.0/streams/conversion.ts". So, I litterally lost 1 day of work! I hate myself.
This commit is contained in:
1 parent
17a1b4bed3
commit
0d627c9051
125 files changed
+26943
-83
No files matched your search
+23
@@ -0,0 +1,23 @@
|
||||
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
||||
// This module is browser compatible.
|
||||
|
||||
export type OSType = "windows" | "linux" | "darwin" | "freebsd";
|
||||
|
||||
export const osType: OSType = (() => {
|
||||
// deno-lint-ignore no-explicit-any
|
||||
const { Deno } = globalThis as any;
|
||||
if (typeof Deno?.build?.os === "string") {
|
||||
return Deno.build.os;
|
||||
}
|
||||
|
||||
// deno-lint-ignore no-explicit-any
|
||||
const { navigator } = globalThis as any;
|
||||
if (navigator?.appVersion?.includes?.("Win")) {
|
||||
return "windows";
|
||||
}
|
||||
|
||||
return "linux";
|
||||
})();
|
||||
|
||||
export const isWindows = osType === "windows";
|
||||
export const isLinux = osType === "linux";
|
||||
Reference in new issue
Block a user