Reading the Jquery source code is fun. It seems like they're doing some really clever stuff there. For example, look at isEmptyObject in the code you linked.
What's the particular cleverness in that? It seems it would also fail for objects with non-enumerable properties and properties with ES6 Symbols for names.