systeminformation
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -70,2 +70,3 @@ // ================================================================================== | ||
// version date comment | ||
// 2.0.2 2016-02-22 added CoreOS identification, optimized cpuCurrentspeed | ||
// 2.0.1 2016-01-07 minor patch | ||
@@ -258,2 +259,3 @@ // 2.0.0 2016-01-07 new major version 2.0 | ||
if (distro.toLowerCase().indexOf('centos') != -1) { result = 'centos' } else | ||
if (distro.toLowerCase().indexOf('coreos') != -1) { result = 'coreos' } else | ||
if (distro.toLowerCase().indexOf('debian') != -1) { result = 'debian' } else | ||
@@ -314,3 +316,3 @@ if (distro.toLowerCase().indexOf('elementary') != -1) { result = 'elementary' } else | ||
if (line.indexOf('=') != -1) { | ||
release[line.split('=')[0].trim().toUpperCase()] = line.split('=')[1].trim(); | ||
release[line.split('=')[0].trim().toUpperCase()] = line.split('=')[1].trim(); | ||
} | ||
@@ -367,3 +369,3 @@ }); | ||
brand : 'unknown', | ||
speed : 'unknown', | ||
speed : '0.00', | ||
cores : _cores | ||
@@ -390,4 +392,8 @@ }; | ||
result.brand = line.split('@')[0].trim(); | ||
result.speed = line.split('@')[1] ? parseFloat(line.split('@')[1].trim()) : getCpuCurrentSpeedSync(); | ||
_cpu_speed = result.speed; | ||
result.speed = line.split('@')[1] ? parseFloat(line.split('@')[1].trim()).toFixed(2) : '0.00'; | ||
if (result.speed == '0.00') { | ||
var current = getCpuCurrentSpeedSync(); | ||
if (current != '0.00') result.speed = current; | ||
} | ||
_cpu_speed = result.speed; | ||
} | ||
@@ -598,3 +604,3 @@ result = cpuBrandManufacturer(result); | ||
if(line[i].toLowerCase().indexOf('free') != -1) result.swapfree = parseFloat(line[i].split('=')[1].trim()) * 1024 * 1024; | ||
} | ||
@@ -1041,3 +1047,3 @@ } | ||
callback(data) | ||
} | ||
} | ||
}); | ||
@@ -1287,2 +1293,4 @@ } else callback(data) | ||
data.time = time(); | ||
data.node = process.versions.node; | ||
data.v8 = process.versions.v8; | ||
@@ -1289,0 +1297,0 @@ cpuCurrentspeed(function(res) { |
{ | ||
"name": "systeminformation", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Simple system and OS information library", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -232,2 +232,3 @@ # systeminformation | ||
| -------------- | -------------- | -------- | | ||
| 2.0.2 | 2016-02-22 | added CoreOS identification, optimized cpuCurrentspeed | | ||
| 2.0.1 | 2016-01-07 | minor patch | | ||
@@ -234,0 +235,0 @@ | 2.0.0 | 2016-01-07 | new major version 2.0 | |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
75364
1193
312