repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixes to performance:
[e-mobility-charging-stations-simulator.git]
/
src
/
utils
/
Utils.ts
diff --git
a/src/utils/Utils.ts
b/src/utils/Utils.ts
index 2fde488376ad9a2c74a75b86c925abf577c6353c..08e87320ce2c83f9ab563c46e53ec01718723cb1 100644
(file)
--- a/
src/utils/Utils.ts
+++ b/
src/utils/Utils.ts
@@
-165,6
+165,10
@@
export default class Utils {
);
}
);
}
+ public static isObject(item: unknown): boolean {
+ return item && typeof item === 'object' && Array.isArray(item) === false;
+ }
+
public static cloneObject<T extends object>(object: T): T {
return clone<T>(object);
}
public static cloneObject<T extends object>(object: T): T {
return clone<T>(object);
}
@@
-255,7
+259,7
@@
export default class Utils {
}
public static JSONStringifyWithMapSupport(
}
public static JSONStringifyWithMapSupport(
- obj: Record<string, unknown> | Record<string, unknown>[],
+ obj: Record<string, unknown> | Record<string, unknown>[]
| Map<string, unknown>
,
space?: number
): string {
return JSON.stringify(
space?: number
): string {
return JSON.stringify(