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
refactor(simulator): sort exports
[e-mobility-charging-stations-simulator.git]
/
src
/
utils
/
Utils.ts
diff --git
a/src/utils/Utils.ts
b/src/utils/Utils.ts
index 1f17fe8735dce9bb1b794075aefd318da22e06a9..bac9705da1ba8e37f67418f86aebbc630529595e 100644
(file)
--- a/
src/utils/Utils.ts
+++ b/
src/utils/Utils.ts
@@
-3,10
+3,10
@@
import util from 'node:util';
import clone from 'just-clone';
import clone from 'just-clone';
-import
Constants from './Constants
';
-import { WebSocketCloseEventStatusString } from '../types
/WebSocket
';
+import
{ Constants } from './internal
';
+import { WebSocketCloseEventStatusString } from '../types';
-export
default
class Utils {
+export class Utils {
private constructor() {
// This is intentional
}
private constructor() {
// This is intentional
}
@@
-214,13
+214,17
@@
export default class Utils {
}
public static isEmptyArray(object: unknown | unknown[]): boolean {
}
public static isEmptyArray(object: unknown | unknown[]): boolean {
- if (
!Array.isArray(object)
) {
+ if (
Array.isArray(object) && object.length === 0
) {
return true;
}
return true;
}
- if (object.length > 0) {
- return false;
+ return false;
+ }
+
+ public static isNotEmptyArray(object: unknown | unknown[]): boolean {
+ if (Array.isArray(object) && object.length > 0) {
+ return true;
}
}
- return
tru
e;
+ return
fals
e;
}
public static isEmptyObject(obj: object): boolean {
}
public static isEmptyObject(obj: object): boolean {