Comparing version 0.1.0 to 0.1.1
@@ -9,3 +9,3 @@ 'use strict'; | ||
var _desc, _value, _class, _descriptor; /* globals Class */ | ||
var _desc, _value, _class, _descriptor, _descriptor2, _descriptor3; /* globals Class */ | ||
@@ -80,4 +80,8 @@ | ||
_initDefineProp(this, 'models', _descriptor, this); | ||
_initDefineProp(this, 'request', _descriptor, this); | ||
_initDefineProp(this, 'error', _descriptor2, this); | ||
_initDefineProp(this, 'models', _descriptor3, this); | ||
this.api = new Api(this.url()); | ||
@@ -310,5 +314,15 @@ | ||
return Collection; | ||
}(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'models', [_mobx.observable], { | ||
}(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'request', [_mobx.observable], { | ||
enumerable: true, | ||
initializer: function initializer() { | ||
return null; | ||
} | ||
}), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, 'error', [_mobx.observable], { | ||
enumerable: true, | ||
initializer: function initializer() { | ||
return null; | ||
} | ||
}), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'models', [_mobx.observable], { | ||
enumerable: true, | ||
initializer: function initializer() { | ||
return []; | ||
@@ -315,0 +329,0 @@ } |
@@ -9,3 +9,3 @@ 'use strict'; | ||
var _desc, _value, _class; | ||
var _desc, _value, _class, _descriptor, _descriptor2; | ||
@@ -24,2 +24,12 @@ var _mobx = require('mobx'); | ||
function _initDefineProp(target, property, descriptor, context) { | ||
if (!descriptor) return; | ||
Object.defineProperty(target, property, { | ||
enumerable: descriptor.enumerable, | ||
configurable: descriptor.configurable, | ||
writable: descriptor.writable, | ||
value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 | ||
}); | ||
} | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
@@ -56,2 +66,6 @@ | ||
function _initializerWarningHelper(descriptor, context) { | ||
throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); | ||
} | ||
var Model = (_class = function () { | ||
@@ -61,2 +75,6 @@ function Model(collection, attributes) { | ||
_initDefineProp(this, 'request', _descriptor, this); | ||
_initDefineProp(this, 'error', _descriptor2, this); | ||
this.uuid = _nodeUuid2.default.v4(); | ||
@@ -184,3 +202,13 @@ this.collection = collection; | ||
return Model; | ||
}(), (_applyDecoratedDescriptor(_class.prototype, 'set', [_mobx.action], Object.getOwnPropertyDescriptor(_class.prototype, 'set'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'save', [_mobx.action], Object.getOwnPropertyDescriptor(_class.prototype, 'save'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'destroy', [_mobx.action], Object.getOwnPropertyDescriptor(_class.prototype, 'destroy'), _class.prototype)), _class); | ||
}(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'request', [_mobx.observable], { | ||
enumerable: true, | ||
initializer: function initializer() { | ||
return null; | ||
} | ||
}), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, 'error', [_mobx.observable], { | ||
enumerable: true, | ||
initializer: function initializer() { | ||
return null; | ||
} | ||
}), _applyDecoratedDescriptor(_class.prototype, 'set', [_mobx.action], Object.getOwnPropertyDescriptor(_class.prototype, 'set'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'save', [_mobx.action], Object.getOwnPropertyDescriptor(_class.prototype, 'save'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'destroy', [_mobx.action], Object.getOwnPropertyDescriptor(_class.prototype, 'destroy'), _class.prototype)), _class); | ||
exports.default = Model; |
{ | ||
"name": "mobx-rest", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "REST conventions for mobx.", | ||
@@ -5,0 +5,0 @@ "repository": { |
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
37581
883