Socket
Socket
Sign inDemoInstall

hardware-info

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

10

index.d.ts
export function getCpus(): {
total: number;
model: string;
speed: number;
total: number;
model: string;
speed: number;
};
export function getRam(): {
total: string;
free: string;
total: string;
free: string;
};
{
"name": "hardware-info",
"version": "1.0.1",
"version": "1.0.2",
"description": "A lightweight way to get the hardware information.",

@@ -24,3 +24,13 @@ "main": "index.js",

"xo": "^0.56.0"
}
},
"keywords": [
"cpu",
"arm",
"x64",
"x86",
"64-bit",
"32-bit",
"hardware",
"iot"
]
}

@@ -12,9 +12,9 @@ # hardware-info

console.log(await getCpus());
console.log(getCpus());
// => { total: 16, model: 'Intel(R) Core(TM) i7-10700F CPU @ 2.90GHz', speed: 2904 }'
console.log(await getRam());
console.log(getRam());
//=> '{ total: '15.93 GB', free: '7.15 GB' }'
```
## Unpacked Size
1.23 kB
Less than 5 kB
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc