tcx-builder
Version:
21 lines (20 loc) • 639 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var BaseAttribute = /** @class */ (function () {
function BaseAttribute() {
}
BaseAttribute.prototype.toString = function () {
return Object.entries(this)
.map(function (_a) {
var _attrName = _a[0], _attrValue = _a[1];
var val = _attrValue;
if (val instanceof Date) {
val = _attrValue.toISOString();
}
return _attrName + "=\"" + val + "\"";
})
.join(' ');
};
return BaseAttribute;
}());
exports.BaseAttribute = BaseAttribute;