src/js/utils.js
branchpopcorn-port
changeset 354 002c314cabbf
parent 308 495ef0f3e483
child 358 430c1a7a09de
--- a/src/js/utils.js	Tue Nov 29 15:47:46 2011 +0100
+++ b/src/js/utils.js	Tue Nov 29 16:35:20 2011 +0100
@@ -72,6 +72,17 @@
   return i3;
 };
 
+IriSP.countProperties = function(obj) {
+    var count = 0;
+
+    for(var prop in obj) {
+        if(obj.hasOwnProperty(prop))
+                ++count;
+    }
+
+    return count;
+};
+
 /* for ie compatibility
 if (Object.prototype.__defineGetter__&&!Object.defineProperty) {
    Object.defineProperty=function(obj,prop,desc) {