summaryrefslogtreecommitdiff
path: root/std
diff options
context:
space:
mode:
authorRubin Bhandari <roobin.bhandari@gmail.com>2020-06-11 22:56:26 +0545
committerGitHub <noreply@github.com>2020-06-11 13:11:26 -0400
commit6ccf9037a6b36c81ea0e6ac12d0e2dbd793f6114 (patch)
treeabb74317f03844454306c6d6b52b963ffe8e1d16 /std
parent818a8010928cb8cef0b7043bd881c8cdce9b6efc (diff)
feat: add Deno.osName() (#5714)
Diffstat (limited to 'std')
-rw-r--r--std/node/os.ts4
-rw-r--r--std/node/os_test.ts7
2 files changed, 2 insertions, 9 deletions
diff --git a/std/node/os.ts b/std/node/os.ts
index 27b054f4d..65b158b3f 100644
--- a/std/node/os.ts
+++ b/std/node/os.ts
@@ -190,9 +190,9 @@ export function totalmem(): number {
notImplemented(SEE_GITHUB_ISSUE);
}
-/** Not yet implemented */
+/** Returns the operating system name as returned by uname(3) */
export function type(): string {
- notImplemented(SEE_GITHUB_ISSUE);
+ return Deno.osName();
}
/** Not yet implemented */
diff --git a/std/node/os_test.ts b/std/node/os_test.ts
index f0b9ca79d..c67879d23 100644
--- a/std/node/os_test.ts
+++ b/std/node/os_test.ts
@@ -246,13 +246,6 @@ test({
);
assertThrows(
() => {
- os.type();
- },
- Error,
- "Not implemented"
- );
- assertThrows(
- () => {
os.uptime();
},
Error,