mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 17:34:47 -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:
parent
d955d66a3f
commit
0e2637f851
1 changed files with 1 additions and 1 deletions
|
@ -126,7 +126,7 @@ export function arch(): string {
|
||||||
(uptime as any)[Symbol.toPrimitive] = (): number => uptime();
|
(uptime as any)[Symbol.toPrimitive] = (): number => uptime();
|
||||||
|
|
||||||
export function cpus(): CPUCoreInfo[] {
|
export function cpus(): CPUCoreInfo[] {
|
||||||
return Array.from(Array(navigator.hardwareConcurrency)).map(() => {
|
return Array.from(Array(navigator.hardwareConcurrency), () => {
|
||||||
return {
|
return {
|
||||||
model: "",
|
model: "",
|
||||||
speed: 0,
|
speed: 0,
|
||||||
|
|
Loading…
Add table
Reference in a new issue