build/min/transistor-backbone.js in transistor-0.1.4 vs build/min/transistor-backbone.js in transistor-0.1.5

- old
+ new

@@ -1 +1 @@ -if(window.Transistor===undefined){window.Transistor={}}(function(f){var j=(function(){return function(k,l){var m,a,c,i;m=(function(){return{}}());a=new Backbone.Collection();c={add:a.add,remove:a.remove,reset:a.reset,set:a.set};(function(e){var h=true,g=function(d){e[d]=(function(b){return function(){if(h){throw"BackboneCollection is not mutable by user.";}else{return c[b].apply(a,arguments)}}}(d))};c.unfreeze=function(){h=false};c.freeze=function(){h=true};c.unfrozen=function(b){c.unfreeze();b();c.freeze()};g('add');g('remove');g('reset');g('set')}(a));i=f.Binder({set:function(e){c.unfrozen(function(){var d=_.map(e,function(b){return new Backbone.Model(b)});a.reset(d)})},insert:function(b){c.unfrozen(function(){a.add(new Backbone.Model(b))})},update:function(d,e){c.unfrozen(function(){var b=a.get(d);b.clear({silent:true});b.set(e)})},remove:function(d){c.unfrozen(function(){var b=a.get(d);a.remove(b)})}});k.tune(l,i);return a}}());if(f.Backbone===undefined){f.Backbone={}}f.Backbone.Collection=j}(window.Transistor)); +if(window.Transistor===undefined){window.Transistor={}}(function(i){var o=(function(){return function(k){var e,m,f,p,b,d,g,n;e=k.channel;m=k.radio;f=k.control;p=(function(){return{}}());b=new Backbone.Collection();d={add:b.add,remove:b.remove,reset:b.reset,set:b.set};g={add:function(a){f.insert(e,a)},remove:function(a){f.remove(e,a.id)},set:function(a){f.set(e,a)}};g.reset=g.set;(function(h){var l=true,j=function(c){h[c]=(function(a){return function(){if(l){if(!f){throw"BackboneCollection is not mutable by user.";}else{g[a].apply(g,arguments)}}else{return d[a].apply(b,arguments)}}}(c))};d.unfrozen=function(a){l=false;a();l=true};j('add');j('remove');j('reset');j('set')}(b));n=i.Binder({set:function(h){d.unfrozen(function(){var c=_.map(h,function(a){return new Backbone.Model(a)});b.reset(c)})},insert:function(a){d.unfrozen(function(){b.add(new Backbone.Model(a))})},update:function(c,h){d.unfrozen(function(){var a=b.get(c);a.clear({silent:true});a.set(h)})},remove:function(c){d.unfrozen(function(){var a=b.get(c);b.remove(a)})}});m.tune(e,n);return b}}());if(i.Backbone===undefined){i.Backbone={}}i.Backbone.Collection=o}(window.Transistor)); \ No newline at end of file