X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=js%2Feuphorik.js;h=1d6f3e87eb1e46fa3b71cd4242136780add13e4f;hp=34888c308627c0a006e304ab2b1de8d5f31a267e;hb=6dd1bccff42c25fd646f2538cafa1cb19e45f88c;hpb=8e5165990c3ddd5582bdb65561b51e5272769022 diff --git a/js/euphorik.js b/js/euphorik.js index 34888c3..1d6f3e8 100755 --- a/js/euphorik.js +++ b/js/euphorik.js @@ -77,6 +77,16 @@ var objectEach = function(o, f) { } } }; + +var objectMemberCount = function(o) { + var nb = 0; + for (var k in o) { + if (o.hasOwnProperty(k)) { + nb += 1; + } + } + return nb; +}; Array.prototype.each = function(f) { for (var i = 0; i < this.length; i++) {