cpu().brand removed extra spaces, tabs

This commit is contained in:
Sebastian Hildebrandt 2018-11-19 15:35:52 +01:00
parent b2f54a4374
commit 0bade091f5
2 changed files with 5 additions and 4 deletions

View File

@ -100,6 +100,7 @@ Other changes
| Version | Date | Comment | | Version | Date | Comment |
| -------------- | -------------- | -------- | | -------------- | -------------- | -------- |
| 3.49.1 | 2018-11-19 | `cpu().brand` removed extra spaces, tabs |
| 3.49.0 | 2018-11-19 | added system `uuid()` (os specific), `versions()` added postgresql | | 3.49.0 | 2018-11-19 | added system `uuid()` (os specific), `versions()` added postgresql |
| 3.48.4 | 2018-11-18 | windows: garbled output because of codepage | | 3.48.4 | 2018-11-18 | windows: garbled output because of codepage |
| 3.48.3 | 2018-11-18 | `dockerContainerStats()` fixed issue `cpu_percent` win | | 3.48.3 | 2018-11-18 | `dockerContainerStats()` fixed issue `cpu_percent` win |

View File

@ -115,10 +115,10 @@ const AMDBaseFrequencies = {
}; };
function cpuBrandManufacturer(res) { function cpuBrandManufacturer(res) {
res.brand = res.brand.replace(/\(R\)+/g, '®'); res.brand = res.brand.replace(/\(R\)+/g, '®').replace(/\s+/g, ' ').trim();
res.brand = res.brand.replace(/\(TM\)+/g, '™'); res.brand = res.brand.replace(/\(TM\)+/g, '™').replace(/\s+/g, ' ').trim();
res.brand = res.brand.replace(/\(C\)+/g, '©'); res.brand = res.brand.replace(/\(C\)+/g, '©').replace(/\s+/g, ' ').trim();
res.brand = res.brand.replace(/CPU+/g, '').trim(); res.brand = res.brand.replace(/CPU+/g, '').replace(/\s+/g, ' ').trim();
res.manufacturer = res.brand.split(' ')[0]; res.manufacturer = res.brand.split(' ')[0];
let parts = res.brand.split(' '); let parts = res.brand.split(' ');