Add and use array helper.
[e-mobility-charging-stations-simulator.git] / src / utils / Utils.js
index f25f48b2b8a81d03b78a72a2c56dd6a4fd5ebf6e..15ee30711ec2c3645626b0e6af071abd212c71aa 100644 (file)
@@ -145,6 +145,13 @@ class Utils {
     }
     return false;
   }
+
+  static isEmptyArray(object) {
+    if (Array.isArray(object) && object.length > 0) {
+      return false;
+    }
+    return true;
+  }
 }
 
 module.exports = Utils;