-
Notifications
You must be signed in to change notification settings - Fork 0
/
zippy.js
38 lines (35 loc) · 1.03 KB
/
zippy.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
Zippy - get computer info, fast!
*/
const os = require('os');
function zippy() {
console.log("Zippy's getting to work...\n")
try {
return {
"name": os.type(),
"total-memory": os.totalmem(),
"free-memory": os.freemem(),
"user-info": os.userInfo(),
"network-int": os.networkInterfaces(),
"os-info": {
"hostname": os.hostname(),
"type": os.type(),
"constants": os.constants,
"EOL": os.EOL,
"platform": os.platform(),
"release": os.release(),
"homedir": os.cpus(),
"load-avg": os.loadavg(),
"uptime": os.uptime(),
"version": os.version(),
},
"cpu-info": {
"arch": os.arch(),
"cpus": os.cpus(),
},
}
} catch (err) {
return console.log(`Something went wrong! Error:\n${err.stack}`)
}
}
module.exports = { zippy }