}
protected isRequest(message: JsonType[]): boolean {
- return Array.isArray(message) && message.length === 3;
+ return Array.isArray(message) === true && message.length === 3;
}
protected isResponse(message: JsonType[]): boolean {
- return Array.isArray(message) && message.length === 2;
+ return Array.isArray(message) === true && message.length === 2;
}
protected validateMessageEvent(messageEvent: MessageEvent): MessageEvent | false {
}
private median(dataSet: number[]): number {
- if (Array.isArray(dataSet) && dataSet.length === 1) {
+ if (Array.isArray(dataSet) === true && dataSet.length === 1) {
return dataSet[0];
}
const sortedDataSet = dataSet.slice().sort((a, b) => a - b);
this.statistics.statisticsData.get(entryName).avgTimeMeasurement =
this.statistics.statisticsData.get(entryName).totalTimeMeasurement /
this.statistics.statisticsData.get(entryName).countTimeMeasurement;
- Array.isArray(this.statistics.statisticsData.get(entryName).timeMeasurementSeries)
+ Array.isArray(this.statistics.statisticsData.get(entryName).timeMeasurementSeries) === true
? this.statistics.statisticsData
.get(entryName)
.timeMeasurementSeries.push({ timestamp: entry.startTime, value: entry.duration })
import type { RouteRecordRaw } from 'vue-router';
import ChargingStationsView from '@/views/ChargingStationsView.vue';
-const routes: Array<RouteRecordRaw> = [
+const routes: RouteRecordRaw[] = [
{
path: '/',
name: 'charging-stations',
if (!object) {
return true;
}
- if (Array.isArray(object) && object.length > 0) {
+ if (Array.isArray(object) === true && (object as unknown[]).length > 0) {
return false;
}
return true;