diff --git a/knockout-deferred-updates.js b/knockout-deferred-updates.js index 7a8bc2a..ddf6a4d 100644 --- a/knockout-deferred-updates.js +++ b/knockout-deferred-updates.js @@ -2,7 +2,7 @@ * @license Deferred Updates plugin for Knockout http://knockoutjs.com/ * (c) Michael Best, Steven Sanderson * License: MIT (http://www.opensource.org/licenses/mit-license.php) - * Version 2.3.1 + * Version 3.0.0 */ (function(factory) { diff --git a/knockout-deferred-updates.min.js b/knockout-deferred-updates.min.js index 387be07..c99300e 100644 --- a/knockout-deferred-updates.min.js +++ b/knockout-deferred-updates.min.js @@ -2,19 +2,19 @@ Deferred Updates plugin for Knockout http://knockoutjs.com/ (c) Michael Best, Steven Sanderson License: MIT (http://www.opensource.org/licenses/mit-license.php) - Version 2.3.1 + Version 3.0.0 */ -(function(b){"function"===typeof require&&"object"===typeof exports&&"object"===typeof module?b(require("knockout")):"function"===typeof define&&define.amd?define(["knockout"],b):b(ko)})(function(b,B){function w(a,b){for(var c in a)if(a.hasOwnProperty(c)&&0<=a[c].toString().indexOf(b))return c}function r(a,b){for(var c in a)if(a.hasOwnProperty(c)&&a[c]===b)return c}function Q(a,b,c,s){var d=a.subscribe(b,null,"dirty",!1,s),h=a.subscribe(c,null,"change",!1,s);return{dispose:function(){d.dispose(); -h.dispose()},target:a}}var C="object"===typeof global&&global?global:window;b.tasks=function(){function a(c){var a=0;try{for(var b=c;b=b._next;)e=b,b._done||(b._done=!0,b._func.apply(b.object,b.args||[]),a++)}finally{if(c!==h)c._next=null,n=c;else{g=[];h._next=null;f=n=h;if(m)C[d](m);m=B}e=B}return a++}function J(){if(!e)return a(h)}var c,d;C.setImmediate?(c="setImmediate",d="clearImmediate"):(c="setTimeout",d="clearTimeout");var m,h={},n=h,g=[],e,f=h,p={processImmediate:function(c,b,e){g.push(f); -f=n;try{return c.apply(b,e||[])}finally{try{f._next&&a(f)}finally{f=g.pop()||h}}},processDelayed:function(b,a,d){if(a=a||a===B)a:{a=e||f;for(var s;s=a._next;a=s)if(s._func===b&&!s._done){a._next=s._next;a._next||(n=a);a=!0;break a}a=!1}d=d||{};d._func=b;n=n._next=d;g.length||m||(m=C[c](J));return!a},makeProcessedCallback:function(a){return function(){return p.processImmediate(a,this,arguments)}}};b.processDeferredBindingUpdatesForNode=b.processAllDeferredBindingUpdates=function(){for(var a=h;a=a._next;)a.node&& -!a._done&&(a._done=!0,a._func.call())};b.processAllDeferredUpdates=J;b.evaluateAsynchronously=function(a,b){return setTimeout(p.makeProcessedCallback(a),b)};return p}();b.utils.objectForEach||(b.utils.objectForEach=function(a,b){for(var c in a)a.hasOwnProperty(c)&&b(c,a[c])});b.utils.objectMap||(b.utils.objectMap=function(a,b){if(!a)return a;var c={},d;for(d in a)a.hasOwnProperty(d)&&(c[d]=b(a[d],d,a));return c});var f=function(a,b){for(var c in a)if(a.hasOwnProperty(c)&&a[c]&&a[c][b])return a[c]}(b, -"end"),R=w(f,".apply(")||"ignore",H=w(f,".push({"),K=w(f,".length"),l=b.computed,S=r(b,l),E=r(l.fn,l),d=b.computed(function(){}),T=r(d,d.peek)||"peek",U=r(d,d.isActive)||"isActive",V=r(d,d.getDependenciesCount),L=r(d,!1),W=r(d,d.dispose),M="disposeWhenNodeIsRemoved",N="disposeWhen";if("hasWriteFunction"!=L){var d=l.toString(),y;if(y=d.match(/.\.disposeWhenNodeIsRemoved\|\|.\.([^|]+)\|\|/))M=y[1];if(d=d.match(/.\.disposeWhen\|\|.\.([^|]+)\|\|/))N=d[1]}var X=w(b.utils,"ocument)"),d=b.subscribable.fn; -y=w(d,".bind(");var z=(new b.subscribable).subscribe(),O=z.dispose,P=z.constructor.prototype,Y=r(P,O);z.dispose();var z=null,u=[],Z=0;f[H]=function(a){u.push({callback:a,deps:{}})};f.end=function(){u.pop()};f[K]=function(a){if(!b.isSubscribable(a))throw Error("Only subscribable things can act as dependencies");if(0=2.2.0" + "knockout": ">=3.0.0" } }