0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 09:31:22 -05:00

fix(ext/node): simplified array.from + map (#20653)

`Array.from` has optional second argument. Calling `map` is not required
for this case.
This commit is contained in:
Mikhail 2023-09-24 12:23:25 +03:00 committed by GitHub
parent d955d66a3f
commit 0e2637f851
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -126,7 +126,7 @@ export function arch(): string {
(uptime as any)[Symbol.toPrimitive] = (): number => uptime();
export function cpus(): CPUCoreInfo[] {
return Array.from(Array(navigator.hardwareConcurrency)).map(() => {
return Array.from(Array(navigator.hardwareConcurrency), () => {
return {
model: "",
speed: 0,