systeminformation 5.14.0 → 5.14.1

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.
Files changed (2) hide show
  1. package/lib/memory.js +6 -2
  2. package/package.json +1 -1
package/lib/memory.js CHANGED
@@ -323,12 +323,16 @@ function memLayout(callback) {
323
323
  let lines = device.split('\n');
324
324
  const sizeString = util.getValue(lines, 'Size');
325
325
  const size = sizeString.indexOf('GB') >= 0 ? parseInt(sizeString, 10) * 1024 * 1024 * 1024 : parseInt(sizeString, 10) * 1024 * 1024;
326
+ let bank = util.getValue(lines, 'Bank Locator');
327
+ if (bank.toLowerCase().indexOf('bad') >= 0) {
328
+ bank = '';
329
+ }
326
330
  if (parseInt(util.getValue(lines, 'Size'), 10) > 0) {
327
331
  const totalWidth = util.toInt(util.getValue(lines, 'Total Width'));
328
332
  const dataWidth = util.toInt(util.getValue(lines, 'Data Width'));
329
333
  result.push({
330
334
  size,
331
- bank: util.getValue(lines, 'Bank Locator'),
335
+ bank,
332
336
  type: util.getValue(lines, 'Type:'),
333
337
  ecc: dataWidth && totalWidth ? totalWidth > dataWidth : false,
334
338
  clockSpeed: (util.getValue(lines, 'Configured Clock Speed:') ? parseInt(util.getValue(lines, 'Configured Clock Speed:'), 10) : (util.getValue(lines, 'Speed:') ? parseInt(util.getValue(lines, 'Speed:'), 10) : null)),
@@ -343,7 +347,7 @@ function memLayout(callback) {
343
347
  } else {
344
348
  result.push({
345
349
  size: 0,
346
- bank: util.getValue(lines, 'Bank Locator'),
350
+ bank,
347
351
  type: 'Empty',
348
352
  ecc: null,
349
353
  clockSpeed: 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "systeminformation",
3
- "version": "5.14.0",
3
+ "version": "5.14.1",
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)",