mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-22 22:10:03 +00:00
parent
41287d7859
commit
f217451fc5
@ -35,9 +35,7 @@ exports.trim = function(str) {
|
||||
Return the number of keys in an object
|
||||
*/
|
||||
exports.count = function(object) {
|
||||
var s = 0;
|
||||
$tw.utils.each(object,function() {s++;});
|
||||
return s;
|
||||
return Object.keys(object || {}).length;
|
||||
};
|
||||
|
||||
/*
|
||||
@ -645,4 +643,4 @@ exports.tagToCssSelector = function(tagName) {
|
||||
};
|
||||
|
||||
|
||||
})();
|
||||
})();
|
||||
|
Loading…
x
Reference in New Issue
Block a user