systeminformation 5.10.3 → 5.10.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/battery.js +3 -3
- package/package.json +1 -1
package/lib/battery.js
CHANGED
|
@@ -244,13 +244,13 @@ module.exports = function (callback) {
|
|
|
244
244
|
batteries[batteries.length - 1].push(parts[i]);
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
|
-
let designCapacities = data.results[1].split('\r\n');
|
|
248
|
-
let fullChargeCapacities = data.results[2].split('\r\n');
|
|
247
|
+
let designCapacities = data.results[1].split('\r\n').filter(e => e);
|
|
248
|
+
let fullChargeCapacities = data.results[2].split('\r\n').filter(e => e);
|
|
249
249
|
if (batteries.length) {
|
|
250
250
|
let first = false;
|
|
251
251
|
let additionalBatteries = [];
|
|
252
252
|
for (let i = 0; i < batteries.length; i++) {
|
|
253
|
-
let lines = batteries[i];
|
|
253
|
+
let lines = batteries[i][0].split('\r\n');
|
|
254
254
|
const designedCapacity = designCapacities && designCapacities.length >= (i + 1) && designCapacities[i] ? util.toInt(designCapacities[i]) : 0;
|
|
255
255
|
const fullChargeCapacity = fullChargeCapacities && fullChargeCapacities.length >= (i + 1) && fullChargeCapacities[i] ? util.toInt(fullChargeCapacities[i]) : 0;
|
|
256
256
|
const parsed = parseWinBatteryPart(lines, designedCapacity, fullChargeCapacity);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "systeminformation",
|
|
3
|
-
"version": "5.10.
|
|
3
|
+
"version": "5.10.4",
|
|
4
4
|
"description": "Advanced, lightweight system and OS information library",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)",
|