fix: fixed linting issues

pull/1097/head
smit95tpatel 2022-05-13 11:42:15 +05:30
parent 1f1b823f60
commit 9871164539
1 changed files with 19 additions and 27 deletions

View File

@ -6,10 +6,10 @@ export function findStatus(data) {
const uptime = data.every((d) => d.online === true); const uptime = data.every((d) => d.online === true);
const degraded = data.some((d) => d.online === false); const degraded = data.some((d) => d.online === false);
const downtime = data.every((d) => d.online === false); const downtime = data.every((d) => d.online === false);
if (uptime) return 'uptime'; if (uptime) return "uptime";
if (downtime) return 'downtime'; if (downtime) return "downtime";
if (degraded) return 'degraded'; if (degraded) return "degraded";
return ''; return "";
} }
// export function inRange(message) { // export function inRange(message) {
@ -23,7 +23,7 @@ export function findStatus(data) {
// } // }
export const isObject = (obj) => { export const isObject = (obj) => {
if (Object.prototype.toString.call(obj) === '[object Object]') { if (Object.prototype.toString.call(obj) === "[object Object]") {
return true; return true;
} }
@ -58,14 +58,6 @@ export const calcPer = (uptime, downtime) => {
// return arrayStr.join("<br/>"); // return arrayStr.join("<br/>");
// } // }
/* Delimiters are space / underscore */
export function titleCase(sentence) {
return (sentence || '')
.split(/\s+|_/)
.map((word) => word.charAt(0).toUpperCase() + word.substr(1).toLowerCase())
.join(' ');
}
export const setUerId = (id) => { export const setUerId = (id) => {
localStorage.setItem('stat_user_id',id); localStorage.setItem('stat_user_id',id);
} }