{"size": 1944, "ext": "js", "max_stars_repo_path": "emberfire-latest.min.js", "max_stars_repo_name": "mjackson/emberFire", "max_stars_repo_stars_event_min_datetime": "2019-05-23T02:47:29.000Z", "max_stars_repo_stars_event_max_datetime": "2019-06-15T10:19:33.000Z", "max_issues_repo_path": "public/assets/emberfire-latest.min.js", "max_issues_repo_name": "atsjj/EmDi", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "public/assets/emberfire-latest.min.js", "max_forks_repo_name": "atsjj/EmDi", "max_forks_repo_forks_event_min_datetime": "2016-12-10T16:48:01.000Z", "max_forks_repo_forks_event_max_datetime": "2016-12-10T16:48:01.000Z"}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 1944.0, "max_line_length": 1944, "alphanum_fraction": 0.7098765432}
"use strict";var EmberFire=Ember.Namespace.create();EmberFire._checkType=function(a,b,c){var d=a.val(),e=d._type;switch(e){case"object":b.call(c,EmberFire.Object.create({ref:a.ref()}));break;case"array":b.call(c,EmberFire.Array.create({ref:a.ref()}));break;default:b.call(c,d)}},EmberFire.Object=Ember.ObjectProxy.extend({init:function(){function a(a){var c=a.name();EmberFire._checkType(a,function(a){Ember.set(b,c,a)},this)}var b={};this.set("content",b),this.ref.child("_type").set("object"),this.ref.on("child_added",a,this),this.ref.on("child_changed",a,this),this.ref.on("child_removed",function(a){this.set(a.name(),null)},this),this._super()},willDestroy:function(){this.ref.off()},toJSON:function(){var a={},b=this.get("content");for(var c in b)a[c]=Ember.get(b,c);return a._type="object",a},setUnknownProperty:function(a,b){return b instanceof EmberFire.Object||b instanceof EmberFire.Array?(b.ref=this.ref.child(a),b.ref.set(b.toJSON()),void 0):(this.ref.child(a).set(b),this._super(a,b))},ref:null}),EmberFire.Array=Ember.ArrayProxy.extend({init:function(){var a=Ember.A([]);this._index=Ember.A([]),this.set("content",a),this.ref.child("_type").set("array"),this.ref.on("child_added",function(b){"_type"!=b.name()&&EmberFire._checkType(b,function(c){this._index.pushObject(b.name()),a.pushObject(c)},this)},this),this.ref.on("child_removed",function(b){if("_type"!=b.name()){var c=this._index.indexOf(b.name());this._index.removeAt(c),a.removeAt(c)}},this),this.ref.on("child_changed",function(b){if("_type"!=b.name()){var c=this._index.indexOf(b.name());a.replace(c,1,[b.val()])}},this),this._super()},replaceContent:function(a,b,c){for(var d=0;b>d;d++){var e=this._index[a+d];this.ref.child(e).remove()}c.forEach(function(a){var b=a;return a.toJSON&&(b=a.toJSON()),this.ref.push(b).name()},this)},toJSON:function(){for(var a={},b=this.get("content"),c=0;c<this._index.length;c++)a[this._index[c]]=b[c];return a._type="array",a}});