@expressive/mvc 0.26.0 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.esm.js +4 -2
- package/lib/index.js +4 -2
- package/package.json +2 -2
package/lib/index.esm.js
CHANGED
|
@@ -902,12 +902,14 @@ function use(input, argument) {
|
|
|
902
902
|
}
|
|
903
903
|
function manage(next) {
|
|
904
904
|
const methods = {
|
|
905
|
-
on(key,
|
|
905
|
+
on(key, event) {
|
|
906
|
+
const callback = () => event(next[key], key);
|
|
906
907
|
if (!(key in next))
|
|
907
908
|
control.watch(key, { value: subject[key] });
|
|
909
|
+
callback();
|
|
908
910
|
return control.addListener(k => {
|
|
909
911
|
if (k === key)
|
|
910
|
-
return
|
|
912
|
+
return callback;
|
|
911
913
|
if (typeof k !== "string")
|
|
912
914
|
return k;
|
|
913
915
|
});
|
package/lib/index.js
CHANGED
|
@@ -906,12 +906,14 @@ function use(input, argument) {
|
|
|
906
906
|
}
|
|
907
907
|
function manage(next) {
|
|
908
908
|
const methods = {
|
|
909
|
-
on(key,
|
|
909
|
+
on(key, event) {
|
|
910
|
+
const callback = () => event(next[key], key);
|
|
910
911
|
if (!(key in next))
|
|
911
912
|
control.watch(key, { value: subject[key] });
|
|
913
|
+
callback();
|
|
912
914
|
return control.addListener(k => {
|
|
913
915
|
if (k === key)
|
|
914
|
-
return
|
|
916
|
+
return callback;
|
|
915
917
|
if (typeof k !== "string")
|
|
916
918
|
return k;
|
|
917
919
|
});
|
package/package.json
CHANGED