code cleanup formatting

This commit is contained in:
Sebastian Hildebrandt 2021-10-17 19:39:18 +02:00
parent 836bd855f1
commit 23650f7079
4 changed files with 2882 additions and 2882 deletions

View File

@ -819,7 +819,7 @@ function getCpu() {
result.cores = result.cores * countProcessors;
result.physicalCores = result.physicalCores * countProcessors;
}
const parts = data[1].split(/\n\s*\n/);;
const parts = data[1].split(/\n\s*\n/);
parts.forEach(function (part) {
lines = part.split('\r\n');
const cacheType = util.getValue(lines, 'CacheType');
@ -1386,7 +1386,7 @@ function cpuCache(callback) {
}
util.powerShell('Get-WmiObject Win32_CacheMemory | select CacheType,InstalledSize,Purpose | fl ').then((stdout, error) => {
if (!error) {
const parts = data[1].split(/\n\s*\n/);;
const parts = stdout.split(/\n\s*\n/);
parts.forEach(function (part) {
const lines = part.split('\r\n');
const cacheType = util.getValue(lines, 'CacheType');

View File

@ -415,7 +415,7 @@ function wifiNetworks(callback) {
});
} else if (_windows) {
let cmd = 'netsh wlan show networks mode=Bssid';
util.powerShell(cmd).then((stdout, error) => {
util.powerShell(cmd).then((stdout) => {
const ssidParts = stdout.toString('utf8').split(os.EOL + os.EOL + 'SSID ');
ssidParts.shift();
@ -570,11 +570,11 @@ function wifiConnections(callback) {
});
} else if (_windows) {
let cmd = 'netsh wlan show interfaces';
util.powerShell(cmd).then(function (stdout, error) {
const allLines = stdout.toString().split('\r\n')
util.powerShell(cmd).then(function (stdout) {
const allLines = stdout.toString().split('\r\n');
for (let i = 0; i < allLines.length; i++) {
allLines[i] = allLines[i].trim()
};
allLines[i] = allLines[i].trim();
}
const parts = allLines.join('\r\n').split(':\r\n\r\n');
parts.shift();
parts.forEach(part => {
@ -670,11 +670,11 @@ function wifiInterfaces(callback) {
});
} else if (_windows) {
let cmd = 'netsh wlan show interfaces';
util.powerShell(cmd).then(function (stdout, error) {
const allLines = stdout.toString().split('\r\n')
util.powerShell(cmd).then(function (stdout) {
const allLines = stdout.toString().split('\r\n');
for (let i = 0; i < allLines.length; i++) {
allLines[i] = allLines[i].trim()
};
allLines[i] = allLines[i].trim();
}
const parts = allLines.join('\r\n').split(':\r\n\r\n');
parts.shift();
parts.forEach(part => {