Specs for Windows 🪟:
Installation:
It is a NodeJS module to get hardware informacions.
npm install specs_window
Project info:
Features:
- Get CPU Thread number;
- Get PC Name (Host Name);
- Get CPU Architecture ⚠️;
- Get Total RAM Memory install;
- Get Free RAM Memory;
- Get Available Drives (Units: C:\, G:\, F:\, ...);
- Get Size Drives;
- Get Mouse position;
- Get Screen Size
Get CPU Threads number 🧠:
const specs = require('specs_window')
console.log(specs.getProcessorsNumber())
Get PC Name (Host Name) 🖥️:
const specs = require('specs_window')
console.log(specs.getPCName())
Get CPU Architecture ⚠️:
This func is under maintenance.
const specs = require('specs_window')
console.log(specs.getProcessorArchitecture())
Get Total RAM Memory install 🗄️:
There are two func to get the Total Memory:
- getTotalMemory()
- getTotalMemoryGB()
getTotalMemory():
const specs = require('specs_window')
console.log(specs.getTotalMemory())
The fist func, getTotalMemory, return the following object:
{
Bytes: 17041244160,
KiloBytes: 16641840,
MegaBytes: 16251.796875,
GigaBytes: 15.870895385742188
}
getTotalMemoryGB():
const specs = require('specs_window')
console.log(specs.getTotalMemoryGB())
The second func, getTotalMemoryGB, return just GB:
15.870895385742188
Get Free RAM Memory 🗄️🆓:
There are two func to get the Free Memory:
- getFreeMemory()
- getFreeMemoryGB()
getFreeMemory():
const specs = require('specs_window')
console.log(specs.getFreeMemory())
The first func, getFreeMemory, return the following object:
{
Bytes: 3957870592,
KiloBytes: 3865108,
MegaBytes: 3774.51953125,
GigaBytes: 3.686054229736328
}
getFreeMemoryGB():
const specs = require('specs_window')
console.log(specs.getFreeMemoryGB())
The second func, getFreeMemoryGB, return just GB:
3.686054229736328
Get Available Drive ☑️💿:
This func return all available drive path, include:
- Internal drives:
- External drives:
- pendrives;
- external disk (HD or SSD)
- ...
Does not work with smarphones, tables, nintendo switch, ...
const specs = require('specs_window')
console.log(specs.getAvailableDrives())
[ 'C:\\', 'G:\\' ]
Get Size Drives 🗄️💿:
This func return the Free Memory and Full Memory of Path Drive.
Path Dive is for exemple:
This func can you recive a individual Path Drive or a array with many Path Drive.
const specs = require('specs_window')
const Drives = specs.getAvailableDrives()
console.log(specs.getSizeDrives(Drives))
[
{ FreeMemory: 9531, FullMemory: 425668.99609375 },
{ FreeMemory: -1, FullMemory: -1 }
]
If the func can´t read a Memory of Drive return -1.
Get Mouse position 🐁🗺️:
Return the mouse position in the screen not in the window.
const specs = require('specs_window')
console.log(specs.getMousePos())
{ X: 1642, Y: 847 }
Get Screen Size 📺📐:
Return the Screen Size in pixeis.
const specs = require('specs_window')
console.log(specs.getScreenSize())
{ width: 1920, height: 1080 }