systeminformation 5.14.2 → 5.14.3

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/cpu.js CHANGED
@@ -525,11 +525,11 @@ function getSocketTypesByName(str) {
525
525
  let result = '';
526
526
  for (const key in socketTypesByName) {
527
527
  const names = socketTypesByName[key].split(' ');
528
- for (let i = 0; i < names.length; i++) {
529
- if (str.indexOf(names[i]) >= 0) {
528
+ names.forEach(element => {
529
+ if (str.indexOf(element) >= 0) {
530
530
  result = key;
531
531
  }
532
- }
532
+ });
533
533
  }
534
534
  return result;
535
535
  }
package/lib/docker.js CHANGED
@@ -458,7 +458,7 @@ function dockerContainerStats(containerIDs, callback) {
458
458
  containerIDsSanitized = '';
459
459
  const s = (util.isPrototypePolluted() ? '' : util.sanitizeShellString(containerIDs, true)).trim();
460
460
  for (let i = 0; i <= util.mathMin(s.length, 2000); i++) {
461
- if (!(s[i] === undefined)) {
461
+ if (s[i] !== undefined) {
462
462
  s[i].__proto__.toLowerCase = util.stringToLower;
463
463
  const sl = s[i].toLowerCase();
464
464
  if (sl && sl[0] && !sl[1]) {
package/lib/graphics.js CHANGED
@@ -864,10 +864,13 @@ function graphics(callback) {
864
864
  if (_pixelDepth) {
865
865
  result.displays[0].pixelDepth = _pixelDepth;
866
866
  }
867
- if (_refreshRate && !result.displays[0].currentRefreshRate) {
868
- result.displays[0].currentRefreshRate = _refreshRate;
869
- }
870
867
  }
868
+ result.displays = result.displays.map(element => {
869
+ if (_refreshRate && !element.currentRefreshRate) {
870
+ element.currentRefreshRate = _refreshRate;
871
+ }
872
+ return element;
873
+ });
871
874
 
872
875
  if (callback) {
873
876
  callback(result);
package/lib/internet.js CHANGED
@@ -46,7 +46,7 @@ function inetChecksite(url, callback) {
46
46
  let urlSanitized = '';
47
47
  const s = util.sanitizeShellString(url, true);
48
48
  for (let i = 0; i <= util.mathMin(s.length, 2000); i++) {
49
- if (!(s[i] === undefined)) {
49
+ if (!s[i] !== undefined) {
50
50
  s[i].__proto__.toLowerCase = util.stringToLower;
51
51
  const sl = s[i].toLowerCase();
52
52
  if (sl && sl[0] && !sl[1] && sl[0].length === 1) {
package/lib/network.js CHANGED
@@ -305,7 +305,6 @@ function getWindowsDNSsuffixes() {
305
305
 
306
306
  return dnsSuffixes;
307
307
  } catch (error) {
308
- // console.log('An error occurred trying to bring the Connection-specific DNS suffix', error.message);
309
308
  return {
310
309
  primaryDNS: '',
311
310
  exitCode: 0,
package/lib/system.js CHANGED
@@ -47,7 +47,6 @@ function system(callback) {
47
47
 
48
48
  if (_linux || _freebsd || _openbsd || _netbsd) {
49
49
  exec('export LC_ALL=C; dmidecode -t system 2>/dev/null; unset LC_ALL', function (error, stdout) {
50
- // if (!error) {
51
50
  let lines = stdout.toString().split('\n');
52
51
  result.manufacturer = util.getValue(lines, 'manufacturer');
53
52
  result.model = util.getValue(lines, 'product name');
@@ -55,7 +54,6 @@ function system(callback) {
55
54
  result.serial = util.getValue(lines, 'serial number');
56
55
  result.uuid = util.getValue(lines, 'uuid').toLowerCase();
57
56
  result.sku = util.getValue(lines, 'sku number');
58
- // }
59
57
  // Non-Root values
60
58
  const cmd = `echo -n "product_name: "; cat /sys/devices/virtual/dmi/id/product_name 2>/dev/null; echo;
61
59
  echo -n "product_serial: "; cat /sys/devices/virtual/dmi/id/product_serial 2>/dev/null; echo;
package/lib/users.js CHANGED
@@ -350,7 +350,6 @@ function parseWinUsersQuery(lines) {
350
350
  if (lines[i].trim()) {
351
351
  const user = lines[i].substring(headerDelimiter[0] + 1, headerDelimiter[1]).trim() || '';
352
352
  const tty = lines[i].substring(headerDelimiter[1] + 1, headerDelimiter[2] - 2).trim() || '';
353
- // const dateTime = util.parseDateTime(lines[i].substring(headerDelimiter[5] + 1, 2000).trim(), culture) || '';
354
353
  result.push({
355
354
  user: user,
356
355
  tty: tty,
package/lib/util.js CHANGED
@@ -254,7 +254,6 @@ function parseHead(head, rights) {
254
254
  let result = [];
255
255
  for (let i = 0; i < head.length; i++) {
256
256
  if (count <= rights) {
257
- // if (head[i] === ' ' && !space) {
258
257
  if (/\s/.test(head[i]) && !space) {
259
258
  to = i - 1;
260
259
  result.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "systeminformation",
3
- "version": "5.14.2",
3
+ "version": "5.14.3",
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)",