X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Futils%2FUtils.ts;h=8eebc2abe64a2526984ee2f0eb2bf56ddcaa505f;hb=9204401a3d56a5fbada3d4d3cd08084583ac598d;hp=4fb2ce7bd2e5482a431b608f777e6b05475035f9;hpb=e7aeea18e189dd087c8f951cf77a253e2818ae90;p=e-mobility-charging-stations-simulator.git diff --git a/src/utils/Utils.ts b/src/utils/Utils.ts index 4fb2ce7b..8eebc2ab 100644 --- a/src/utils/Utils.ts +++ b/src/utils/Utils.ts @@ -171,6 +171,10 @@ export default class Utils { return typeof value === 'string'; } + public static isEmptyString(value: unknown): boolean { + return Utils.isString(value) && (value as string).length === 0; + } + public static isUndefined(value: unknown): boolean { return typeof value === 'undefined'; }