build/min/transistor-backbone.js in transistor-0.1.7 vs build/min/transistor-backbone.js in transistor-0.1.8

- old
+ new

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