cpu() clean brand string
This commit is contained in:
parent
3da3240962
commit
133b557eb6
@ -1186,7 +1186,7 @@ All other trademarks are the property of their respective owners.
|
||||
[daviddm-url]: https://david-dm.org/sebhildebrandt/systeminformation
|
||||
[issues-img]: https://img.shields.io/github/issues/sebhildebrandt/systeminformation.svg?style=flat-square
|
||||
[issues-url]: https://github.com/sebhildebrandt/systeminformation/issues
|
||||
[closed-issues-img]: https://img.shields.io/github/issues-closed-raw/sebhildebrandt/systeminformation.svg?style=flat-square&color=brightgreen
|
||||
[closed-issues-img]: https://img.shields.io/github/issues-search?query=repo%3Asebhildebrandt/systeminformation+is%3Aclosed&style=flat-square&color=brightgreen&label=Issues+closed
|
||||
[closed-issues-url]: https://github.com/sebhildebrandt/systeminformation/issues?q=is%3Aissue+is%3Aclosed
|
||||
[new-issue]: https://github.com/sebhildebrandt/systeminformation/issues/new/choose
|
||||
[mmon-npm-url]: https://npmjs.org/package/mmon
|
||||
|
||||
@ -737,6 +737,7 @@ function getCpu() {
|
||||
}
|
||||
modelline = util.getValue(lines, 'model name') || modelline;
|
||||
modelline = util.getValue(lines, 'bios model name') || modelline;
|
||||
modelline = util.cleanString(modelline);
|
||||
const modellineParts = modelline.split('@');
|
||||
result.brand = modellineParts[0].trim();
|
||||
result.speed = modellineParts[1] ? parseFloat(modellineParts[1].trim()) : 0;
|
||||
|
||||
@ -2535,6 +2535,9 @@ function checkWebsite(url, timeout = 5000) {
|
||||
});
|
||||
};
|
||||
|
||||
function cleanString(str) {
|
||||
return str.replace(/To Be Filled By O.E.M./g, '');
|
||||
}
|
||||
function noop() { }
|
||||
|
||||
exports.toInt = toInt;
|
||||
@ -2591,3 +2594,4 @@ exports.getFilesInPath = getFilesInPath;
|
||||
exports.semverCompare = semverCompare;
|
||||
exports.getAppleModel = getAppleModel;
|
||||
exports.checkWebsite = checkWebsite;
|
||||
exports.cleanString = cleanString;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user