vue-model-x
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -28,3 +28,3 @@ import Vue from 'vue'; | ||
} else { | ||
value = descriptor.initializer(); | ||
value = descriptor.initializer ? descriptor.initializer() : undefined; | ||
saveObservableValue(this, name, value); | ||
@@ -145,2 +145,2 @@ } | ||
export { observable, computed, VueModel }; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidnVlLW1vZGVsLXguZXNtLmpzIiwic291cmNlcyI6WyIuLi9zcmMvdnVlLWludGVybmFscy5qcyIsIi4uL3NyYy9vYnNlcnZhYmxlLmpzIiwiLi4vc3JjL2NvbXB1dGVkLmpzIiwiLi4vc3JjL1Z1ZU1vZGVsLmpzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBWdWUgZnJvbSAndnVlJztcblxuY29uc3QgdnVlID0gbmV3IFZ1ZSh7XG4gIHdhdGNoOiB7XG4gICAgdygpIHt9XG4gIH1cbn0pO1xuXG5leHBvcnQgY29uc3QgV2F0Y2hlciA9IHZ1ZS5fd2F0Y2hlcnNbMF0uY29uc3RydWN0b3I7XG5leHBvcnQgY29uc3QgT2JzZXJ2ZXIgPSB2dWUuJGRhdGEuX19vYl9fLmNvbnN0cnVjdG9yO1xuZXhwb3J0IGNvbnN0IERlcCA9IHZ1ZS4kZGF0YS5fX29iX18uZGVwLmNvbnN0cnVjdG9yO1xuZXhwb3J0IGNvbnN0IHtkZWZpbmVSZWFjdGl2ZX0gPSBWdWUudXRpbDtcbiIsImltcG9ydCB7RGVwLCBkZWZpbmVSZWFjdGl2ZX0gZnJvbSAnLi92dWUtaW50ZXJuYWxzJztcblxuY29uc3Qgb2JzZXJ2YWJsZVZhbHVlcyA9IFN5bWJvbCgnb2JzZXJ2YWJsZVZhbHVlcycpO1xuXG5leHBvcnQgZnVuY3Rpb24gb2JzZXJ2YWJsZShwcm90bywgbmFtZSwgZGVzY3JpcHRvcikge1xuICBPYmplY3QuYXNzaW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FBc0IsSUFBdEIsRUFBNEIsUUFBNUIsRUFBc0M7a0JBQ3hCLEtBRHdCO2FBRTdCLElBQUlwQixRQUFKLENBQWEsRUFBYjtLQUZUOzs7OztTQU1GNkMsTUFaRixtQkFZU0MsSUFaVCxFQVllO1dBQ0pqQyxNQUFQLENBQWMsSUFBZCxFQUFvQmlDLElBQXBCO0dBYko7Ozs7Ozs7In0= |
@@ -34,3 +34,3 @@ 'use strict'; | ||
} else { | ||
value = descriptor.initializer(); | ||
value = descriptor.initializer ? descriptor.initializer() : undefined; | ||
saveObservableValue(this, name, value); | ||
@@ -153,2 +153,2 @@ } | ||
exports.VueModel = VueModel; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidnVlLW1vZGVsLXguanMiLCJzb3VyY2VzIjpbIi4uL3NyYy92dWUtaW50ZXJuYWxzLmpzIiwiLi4vc3JjL29ic2VydmFibGUuanMiLCIuLi9zcmMvY29tcHV0ZWQuanMiLCIuLi9zcmMvVnVlTW9kZWwuanMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFZ1ZSBmcm9tICd2dWUnO1xuXG5jb25zdCB2dWUgPSBuZXcgVnVlKHtcbiAgd2F0Y2g6IHtcbiAgICB3KCkge31cbiAgfVxufSk7XG5cbmV4cG9ydCBjb25zdCBXYXRjaGVyID0gdnVlLl93YXRjaGVyc1swXS5jb25zdHJ1Y3RvcjtcbmV4cG9ydCBjb25zdCBPYnNlcnZlciA9IHZ1ZS4kZGF0YS5fX29iX18uY29uc3RydWN0b3I7XG5leHBvcnQgY29uc3QgRGVwID0gdnVlLiRkYXRhLl9fb2JfXy5kZXAuY29uc3RydWN0b3I7XG5leHBvcnQgY29uc3Qge2RlZmluZVJlYWN0aXZlfSA9IFZ1ZS51dGlsO1xuIiwiaW1wb3J0IHtEZXAsIGRlZmluZVJlYWN0aXZlfSBmcm9tICcuL3Z1ZS1pbnRlcm5hbHMnO1xuXG5jb25z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ixJQUExQixFQUFnQztnQkFBTztTQUF2QyxDQUFqQzs7O1VBR0VZLFFBQVFDLEtBQVosRUFBbUI7Z0JBQ1RDLFFBQVI7OztjQUdNQyxNQUFSO2FBRU9ILFFBQVF6QixLQUFmOztHQWhDSjs7O0lDYlc2QixRQUFiOztBQUFBO3NCQUVnQjs7OztXQUlMeEIsY0FBUCxDQUFzQixJQUF0QixFQUE0QixRQUE1QixFQUFzQztrQkFDeEIsS0FEd0I7YUFFN0IsSUFBSXBCLFFBQUosQ0FBYSxFQUFiO0tBRlQ7Ozs7O1NBTUY2QyxNQVpGLG1CQVlTQyxJQVpULEVBWWU7V0FDSmpDLE1BQVAsQ0FBYyxJQUFkLEVBQW9CaUMsSUFBcEI7R0FiSjs7Ozs7Ozs7OyJ9 |
{ | ||
"name": "vue-model-x", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "MobX-like state management library for Vue.js", | ||
@@ -5,0 +5,0 @@ "main": "./dist/vue-model-x.js", |
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
28430