ag-utilities
Advanced tools
Comparing version 1.1.192 to 1.1.193
@@ -28,3 +28,2 @@ import { Delta } from './AgDiff'; | ||
patch: (delta: Delta) => void; | ||
set onPatched(fn: (delta: Delta) => void); | ||
set value(v: T); | ||
@@ -31,0 +30,0 @@ set onUpdated(fn: (value: T) => void); |
@@ -113,17 +113,8 @@ "use strict"; | ||
var real = (0, exports.ref)(init); | ||
var oldValue = AgDiff_1.AgDiff.clone(real.value); | ||
var onpatched; | ||
var onupdated; | ||
var onstop; | ||
var watcher = watch(real, function (value) { | ||
var newValue = AgDiff_1.AgDiff.clone(value); | ||
if (onupdated) { | ||
onupdated(newValue); | ||
onupdated(value); | ||
} | ||
if (onpatched) { | ||
var delta = AgDiff_1.AgDiff.diff(oldValue, newValue); | ||
if (delta) | ||
onpatched(delta); | ||
} | ||
oldValue = AgDiff_1.AgDiff.clone(newValue); | ||
}, { deep: true }); | ||
@@ -137,5 +128,2 @@ return { | ||
}, | ||
set onPatched(fn) { | ||
onpatched = fn; | ||
}, | ||
set onUpdated(fn) { | ||
@@ -142,0 +130,0 @@ onupdated = fn; |
{ | ||
"name": "ag-utilities", | ||
"version": "1.1.192", | ||
"version": "1.1.193", | ||
"author": "fangxq", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
142256
3232