systeminformation 5.17.8 → 5.17.9

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/system.js CHANGED
@@ -216,7 +216,7 @@ function system(callback) {
216
216
  if (!error) {
217
217
  let lines = stdout.toString().replace(/[<>"]/g, '').split('\n');
218
218
  result.manufacturer = util.getValue(lines, 'manufacturer', '=', true);
219
- result.model = util.getValue(lines, 'model', '=', true);
219
+ result.model = util.getValue(lines, 'model', '=', true, true);
220
220
  result.version = util.getValue(lines, 'version', '=', true);
221
221
  result.serial = util.getValue(lines, 'ioplatformserialnumber', '=', true);
222
222
  result.uuid = util.getValue(lines, 'ioplatformuuid', '=', true).toLowerCase();
package/lib/util.js CHANGED
@@ -124,7 +124,7 @@ function getValue(lines, property, separator, trimmed, lineMatch) {
124
124
  if (trimmed) {
125
125
  lineLower = lineLower.trim();
126
126
  }
127
- if (lineLower.startsWith(property) && (lineMatch ? (lineLower.match(property + separator)) : true)) {
127
+ if (lineLower.startsWith(property) && (lineMatch ? (lineLower.match(property + separator)) || (lineLower.match(property + ' ' + separator)) : true)) {
128
128
  const parts = trimmed ? line.trim().split(separator) : line.split(separator);
129
129
  if (parts.length >= 2) {
130
130
  parts.shift();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "systeminformation",
3
- "version": "5.17.8",
3
+ "version": "5.17.9",
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)",