X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Futils%2FUtils.ts;h=1ad1a7924bb0b5e4eb5e8fc7778a9d89f953eda6;hb=5612b691da864fc2822629bbee32ed8008ee6472;hp=c7fd875f8f7f09130164ee3126eaebd192280e00;hpb=7c72977bb3400f474c8641fc91d9f54fba25cb64;p=e-mobility-charging-stations-simulator.git diff --git a/src/utils/Utils.ts b/src/utils/Utils.ts index c7fd875f..1ad1a792 100644 --- a/src/utils/Utils.ts +++ b/src/utils/Utils.ts @@ -1,7 +1,12 @@ import crypto from 'crypto'; + import { v4 as uuid } from 'uuid'; export default class Utils { + private constructor() { + // This is intentional + } + public static logPrefix(prefixString = ''): string { return new Date().toLocaleString() + prefixString; } @@ -10,10 +15,6 @@ export default class Utils { return uuid(); } - public static equals(obj1: unknown, obj2: unknown): boolean { - return JSON.stringify(obj1) === JSON.stringify(obj2); - } - public static async sleep(milliSeconds: number): Promise { return new Promise((resolve) => setTimeout(resolve as () => void, milliSeconds)); }