mustache_templates-8.x-1.0-beta4/js/bind/object.min.js

js/bind/object.min.js
!function(t){var e=t.___internals.item,i=e.init,s=e.ready,c=e.update,o=e.prepare,r=t.___internals.subset,n=function(t){var e=!1;return this.data&&(e=r(this.data,t)),!1===e&&window&&(e=r(window,t)),e};e.init=function(){var t,e;if(this.object=this.object||null,this.object)if("string"==typeof this.object&&(this.object=this.object.split("+")),Array.isArray(this.object)?this.object={selects:this.object,values:{}}:"string"==typeof this.object.selects&&(this.object.selects=[this.object.selects]),Array.isArray(this.object.selects))for(t=this.object.selects,e=0;e<t.length;e++)"string"==typeof t[e]&&(t[e]=t[e].split("."));else this.object=!1;return i.call(this)},e.ready=function(){var t,e;if(!1===this.object)return!1;if(this.object)for(t=this.object.selects,e=0;e<t.length;e++)if(!1===n.call(this,t[e]))return!1;return s.call(this)},e.update=function(t,e,i){var s,o,r,h,a,l,b=0;if(this.object)for(r={},s=this.object.selects,l=0;l<s.length;l++)if(a=(o=s[l])[o.length-1],!1!==(h=n.call(this,o))&&"function"!=typeof h){if(this.object.values||(this.object.values={}),this.object.values[a]=h,"string"!=typeof h)try{h=JSON.stringify(h)}catch(t){continue}h=encodeURIComponent(h),r[a]=h,b++}return b&&this.provider&&(this.provider=this.provider.rebuild(r)),c.call(this,t,e,i)},e.prepare=function(t,e){return"object"==typeof e.data&&this.object&&this.object.values&&(e.data.object=Object.assign({},this.object.values)),o.call(this,t,e)}}(mustacheSync);

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc