mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 10:59:13 +00:00
feat(runtime): implement navigator.hardwareConcurrency (#11448)
This commit implements "navigator.hardwareConcurrency" API, which supersedes "Deno.systemCpuInfo()" API (which was removed in this commit).
This commit is contained in:
parent
eece46f0d8
commit
2b13bb6945
15 changed files with 46 additions and 66 deletions
6
cli/tests/unit/navigator_test.ts
Normal file
6
cli/tests/unit/navigator_test.ts
Normal file
|
@ -0,0 +1,6 @@
|
|||
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
|
||||
import { assert, unitTest } from "./test_util.ts";
|
||||
|
||||
unitTest(function navigatorNumCpus(): void {
|
||||
assert(navigator.hardwareConcurrency > 0);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue