Closure is equipped with a rich set of object/array processing (forEach, map, etc.) and DOM manipulation tools. Until recently, I had to include underscore.js along with jQuery to get the equivalent functionality.
It’s also a very stable library. Closure is so deeply entrenched in many Google applications that they cannot make significant breaking changes at this point. It also means that new code is heavily vetted to ensure longevity. For example, to watch for events in Closure, use
listenOnce. How would you do it in jQuery?
on? Which of these is deprecated? How do their signatures differ? (On a side note, I really dislike jQuery’s “function overloading” which uses different types for arguments and determines intent by doing type checks).
The real boon, however, is in Closure’s ability to verify types and check for errors during compile.
fixjsstyle are useful pre-compile tools for error checking and automatically fixing formatting issues to ensure consistent readability.
See the API documentation to browse the library.