systeminformation
Advanced tools
Comparing version 3.26.0 to 3.26.1
@@ -101,2 +101,3 @@ # Changelog | ||
| -------------- | -------------- | -------- | | ||
| 3.26.1 | 2017-08-23 | fixed `cpu().speed` windows / AMD, updated docs | | ||
| 3.26.0 | 2017-08-21 | extended `getDynamicData()` (windows), updated docs | | ||
@@ -103,0 +104,0 @@ | 3.25.1 | 2017-08-07 | updated docs | |
@@ -164,6 +164,11 @@ 'use strict'; | ||
let name = getValue(lines, 'name', '=') || ''; | ||
result.brand = name.split('@')[0].trim(); | ||
result.speed = name.split('@')[1].trim(); | ||
result.speed = parseFloat(result.speed.replace(/GHz+/g, "").trim()).toFixed(2); | ||
_cpu_speed = result.speed; | ||
if (name.indexOf('@') >= 0) { | ||
result.brand = name.split('@')[0].trim(); | ||
result.speed = name.split('@')[1].trim(); | ||
result.speed = parseFloat(result.speed.replace(/GHz+/g, "").trim()).toFixed(2); | ||
_cpu_speed = result.speed; | ||
} else { | ||
result.brand = name.split('@')[0].trim(); | ||
result.speed = 0; | ||
} | ||
result = cpuBrandManufacturer(result); | ||
@@ -179,3 +184,6 @@ result.revision = getValue(lines, 'revision', '='); | ||
result.speedmax = Math.round(parseFloat(getValue(lines, 'maxclockspeed', '=').replace(/,/g, '.')) / 10.0) / 100; | ||
result.speedmax = result.speedmax ? parseFloat(result.speedmax).toFixed(2) : '' | ||
result.speedmax = result.speedmax ? parseFloat(result.speedmax).toFixed(2) : ''; | ||
if (!result.speed) { | ||
result.speed = result.speedmax | ||
} | ||
@@ -182,0 +190,0 @@ let description = getValue(lines, 'description', '=').split(' '); |
{ | ||
"name": "systeminformation", | ||
"version": "3.26.0", | ||
"version": "3.26.1", | ||
"description": "Simple system and OS information library", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -13,3 +13,3 @@ # systeminformation | ||
Collection of 35+ functions to retrieve detailed hardware, system and OS information (Linux, OSX and partial Windows support) | ||
Lightweight collection of 35+ functions to retrieve detailed hardware, system and OS information (Linux, OSX and partial Windows support) - no npm dependencies. | ||
@@ -54,3 +54,3 @@ ### Installation | ||
### Latest Activity | ||
- Version 3.26.0: extended `getDynamicData()` (windows), updated docs | ||
- Version 3.26.0: improved windows support `getDynamicData()`, updated docs | ||
- Version 3.25.0: improved windows support `networkStats()`, `cpuCache()`, bug fix `getStaticData()` | ||
@@ -205,3 +205,3 @@ - Version 3.24.0: extended windows support `networkStats()`, `networkConnections()` | ||
| | percent | X | X | X | charging level in percent | | ||
| si.graphics(cb) | {...} | X | X | | arrays of graphics controllers and displays | | ||
| si.graphics(cb) | {...} | X | X | X | arrays of graphics controllers and displays | | ||
| | controllers[0].model | X | X | X | graphics controller model | | ||
@@ -419,3 +419,3 @@ | | controllers[0].vendor | X | X | X | e.g. ATI | | ||
Remember: all functions (except `version` and `time`) are implemented as asynchronous functions! There are now two ways to consume them: | ||
Remember: all functions (except `version` and `time`) are implemented as asynchronous functions! There are now three ways to consume them: | ||
@@ -463,3 +463,3 @@ **Callback Style** | ||
Since node 7.6 you can ylso use the `async` / `await pattern. The example would then loog like this: | ||
Since node v7.6 you can also use the `async` / `await` pattern. The example would then look like this: | ||
@@ -558,3 +558,3 @@ ```js | ||
Windows is a registered trademark of Microsoft Corporation. Node.js is a trademark of Joyent Inc., | ||
Intel is a trademark of Intel Corporation, Raspberry Pi is a trademark of the Raspberry Pi Foundation, | ||
Intel is a trademark of Intel Corporation, AMD is a trademark of Advanced Micro Devices Inc., Raspberry Pi is a trademark of the Raspberry Pi Foundation, | ||
Debian is a trademark of the Debian Project, Ubuntu is a trademark of Canonical Ltd., Docker is a trademark of Docker, Inc. | ||
@@ -561,0 +561,0 @@ All other trademarks are the property of their respective owners. |
220102
4595