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
Add and use array helper.
[e-mobility-charging-stations-simulator.git]
/
src
/
utils
/
Utils.js
diff --git
a/src/utils/Utils.js
b/src/utils/Utils.js
index 216790bc368bc0e7664810138391d0e41129aa13..15ee30711ec2c3645626b0e6af071abd212c71aa 100644
(file)
--- a/
src/utils/Utils.js
+++ b/
src/utils/Utils.js
@@
-128,7
+128,7
@@
class Utils {
static basicFormatLog(prefixString = '') {
const date = new Date();
static basicFormatLog(prefixString = '') {
const date = new Date();
- return date.to
ISOString().substr(0, 19
) + prefixString;
+ return date.to
LocaleString(
) + prefixString;
}
static objectHasOwnProperty(object, property) {
}
static objectHasOwnProperty(object, property) {
@@
-145,6
+145,13
@@
class Utils {
}
return false;
}
}
return false;
}
+
+ static isEmptyArray(object) {
+ if (Array.isArray(object) && object.length > 0) {
+ return false;
+ }
+ return true;
+ }
}
module.exports = Utils;
}
module.exports = Utils;