Skip to content

Instantly share code, notes, and snippets.

View gitfvb's full-sized avatar
👋

Florian von Bracht gitfvb

👋
View GitHub Profile
@gitfvb
gitfvb / array_addons.js
Created October 10, 2015 14:34
Get the size of javascript associative arrays
// get the size of associative arrays
$.assocArraySize = function(obj) {
var size = 0, key;
for (key in obj) {
if (obj.hasOwnProperty(key)) size++;
}
return size;
};