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:
Divy Srivastava 2021-07-30 01:15:11 +05:30 committed by GitHub
parent eece46f0d8
commit 2b13bb6945
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 46 additions and 66 deletions

View 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);
});