Add logs rotation.
[e-mobility-charging-stations-simulator.git] / src / utils / Utils.ts
index 52a2b0ee7dc420682bfccb4b29f786dec6ee707a..167e299df27c075641927e0b884ee6bd76d7dbc6 100644 (file)
@@ -149,7 +149,7 @@ export default class Utils {
     return typeof value === 'string';
   }
 
-  static isUndefined(value) {
+  static isUndefined(value): boolean {
     return typeof value === 'undefined';
   }
 
@@ -171,4 +171,6 @@ export default class Utils {
   static isEmptyObject(obj): boolean {
     return !Object.keys(obj).length;
   }
+
+  static insertAt = (str: string, subStr: string, pos: number): string => `${str.slice(0, pos)}${subStr}${str.slice(pos)}`;
 }