@pilotlab/lux-attributes
Version:
A luxurious user experience framework, developed by your friends at Pilot.
30 lines • 1.36 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var attributeEnums_1 = require("../attributeEnums");
var attribute_1 = require("../attribute");
var AttributeObject = (function (_super) {
__extends(AttributeObject, _super);
function AttributeObject(key, value, label) {
if (value === void 0) { value = {}; }
return _super.call(this, key, value, attributeEnums_1.DataType.OBJECT, label) || this;
}
Object.defineProperty(AttributeObject.prototype, "value", {
get: function () { return (typeof this.p_value === 'string') ? JSON.parse(this.p_value) : this.p_value; },
enumerable: true,
configurable: true
});
return AttributeObject;
}(attribute_1.default));
exports.AttributeObject = AttributeObject;
exports.default = AttributeObject;
//# sourceMappingURL=attributeObject.js.map