X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Futils%2FUtils.ts;h=810267200fb1e3b1a4949918f264d8f57e085455;hb=8b7072dca602c80ec6ef9a3463b6d53b43aa8fa5;hp=6557a588446455506656c7f7133e8fe85c5881f0;hpb=4e276cc7fe5ba6090afa4cb7b45b0f0885d0f149;p=e-mobility-charging-stations-simulator.git diff --git a/src/utils/Utils.ts b/src/utils/Utils.ts index 6557a588..81026720 100644 --- a/src/utils/Utils.ts +++ b/src/utils/Utils.ts @@ -11,9 +11,9 @@ export default class Utils { // This is intentional } - public static logPrefix(prefixString = ''): string { + public static logPrefix = (prefixString = ''): string => { return `${new Date().toLocaleString()}${prefixString}`; - } + }; public static generateUUID(): string { return crypto.randomUUID(); @@ -184,7 +184,7 @@ export default class Utils { return clone(object); } - public static isIterable>(obj: T): boolean { + public static isIterable(obj: T): boolean { return !Utils.isNullOrUndefined(obj) ? typeof obj[Symbol.iterator] === 'function' : false; }