Comparing version 0.2.0 to 0.3.0
@@ -19,3 +19,3 @@ { | ||
}, | ||
"version": "0.2.0" | ||
"version": "0.3.0" | ||
} |
@@ -6,2 +6,3 @@ module.exports = (function () { | ||
return { | ||
__ctx: null, | ||
data: {} | ||
@@ -27,8 +28,12 @@ }; | ||
run(key, data, cb) { | ||
return this.$get('data.' + key).call(this, data, cb); | ||
run(key) { | ||
var args = Array.prototype.slice.call(arguments, 1); | ||
return this.$get('data.' + key).apply(this.__ctx, args); | ||
}, | ||
watch(key, cb) { | ||
this.$watch('data.' + key, cb); | ||
this.$watch('data.' + key, function (newVal, oldVal) { | ||
cb.call(this.__ctx, newVal, oldVal); | ||
}); | ||
} | ||
@@ -45,3 +50,7 @@ } | ||
$store: { | ||
get () { return store; } | ||
get () { | ||
store.__ctx = this; | ||
return store; | ||
} | ||
} | ||
@@ -48,0 +57,0 @@ }); |
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
5151
43