mirror of https://github.com/statping/statping
fix: fixed linting issues
parent
1f1b823f60
commit
9871164539
|
@ -6,10 +6,10 @@ export function findStatus(data) {
|
|||
const uptime = data.every((d) => d.online === true);
|
||||
const degraded = data.some((d) => d.online === false);
|
||||
const downtime = data.every((d) => d.online === false);
|
||||
if (uptime) return 'uptime';
|
||||
if (downtime) return 'downtime';
|
||||
if (degraded) return 'degraded';
|
||||
return '';
|
||||
if (uptime) return "uptime";
|
||||
if (downtime) return "downtime";
|
||||
if (degraded) return "degraded";
|
||||
return "";
|
||||
}
|
||||
|
||||
// export function inRange(message) {
|
||||
|
@ -23,7 +23,7 @@ export function findStatus(data) {
|
|||
// }
|
||||
|
||||
export const isObject = (obj) => {
|
||||
if (Object.prototype.toString.call(obj) === '[object Object]') {
|
||||
if (Object.prototype.toString.call(obj) === "[object Object]") {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -58,14 +58,6 @@ export const calcPer = (uptime, downtime) => {
|
|||
// 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) => {
|
||||
localStorage.setItem('stat_user_id',id);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue