UNPKG

@pilotlab/lux-attributes

Version:

A luxurious user experience framework, developed by your friends at Pilot.

12 lines (7 loc) 416 B
import { DataType } from '../attributeEnums'; import Attribute from '../attribute'; export class AttributeObject extends Attribute { constructor(key:string, value:(string | Object) = {}, label?:string) { super(key, value, DataType.OBJECT, label); } get value():Object { return (typeof this.p_value === 'string') ? JSON.parse(this.p_value) : this.p_value; } } // End class export default AttributeObject;