chore: switch coding style to JS standard
[e-mobility-charging-stations-simulator.git] / ui / web / src / composables / Utils.ts
index 07848f36d41b8a8f285ae817b117ddaf6bdb2178..4ff26db62f0580a28025f56c2007e83f828ac6b2 100644 (file)
@@ -1,23 +1,23 @@
 const isUndefined = (value: unknown): boolean => {
-  return typeof value === 'undefined';
-};
+  return typeof value === 'undefined'
+}
 
 export const ifUndefined = <T>(value: T | undefined, isValue: T): T => {
-  if (isUndefined(value) === true) return isValue;
-  return value as T;
-};
+  if (isUndefined(value) === true) return isValue
+  return value as T
+}
 
 // const isIterable = <T>(obj: T): boolean => {
 //   if (obj === null || obj === undefined) {
-//     return false;
+//     return false
 //   }
-//   return typeof (obj as unknown as Iterable<T>)[Symbol.iterator] === 'function';
-// };
+//   return typeof (obj as unknown as Iterable<T>)[Symbol.iterator] === 'function'
+// }
 
 // const ifNotIterableDo = <T>(obj: T, cb: () => void): void => {
-//   if (isIterable(obj) === false) cb();
-// };
+//   if (isIterable(obj) === false) cb()
+// }
 
 // export const compose = <T>(...fns: ((arg: T) => T)[]): ((x: T) => T) => {
-//   return (x: T) => fns.reduceRight((y, fn) => fn(y), x);
-// };
+//   return (x: T) => fns.reduceRight((y, fn) => fn(y), x)
+// }