Cleanup JS and better terser compression

This commit is contained in:
djmaze 2020-10-09 11:58:15 +02:00
parent 058217de02
commit ba7ed497b2
20 changed files with 247 additions and 298 deletions

View file

@ -1,6 +1,6 @@
var computedState = Symbol('_state');
ko.computed = ko.dependentObservable = function (evaluatorFunctionOrOptions, evaluatorFunctionTarget, options) {
ko.computed = function (evaluatorFunctionOrOptions, evaluatorFunctionTarget, options) {
if (typeof evaluatorFunctionOrOptions === "object") {
// Single-parameter syntax - everything is on this "options" param
options = evaluatorFunctionOrOptions;
@ -498,7 +498,6 @@ ko.isComputed = instance => (typeof instance == 'function' && instance[protoProp
ko.isPureComputed = instance => ko.isComputed(instance) && instance[computedState] && instance[computedState].pure;
ko.exportSymbol('computed', ko.computed);
ko.exportSymbol('dependentObservable', ko.computed); // export ko.dependentObservable for backwards compatibility (1.x)
ko.exportSymbol('isComputed', ko.isComputed);
ko.exportSymbol('isPureComputed', ko.isPureComputed);
ko.exportSymbol('computed.fn', computedFn);