I tried this myself and I suppose its some sort of closure catch but I dont see the difference in this:
(function() {
var tvLib = {}
window.tvLib = tvLib
})();
from the jQuery way of :
(function(window, undefined) {
var jq;
window.jq = jq;
})(window);
Im confused why I need to send in window object if I can call it anyway.
One reason is to let minifiers rename the variable to make it more compact.