kentico-cloud-delivery
Version:
Official Kentico Cloud Delivery SDK
20 lines • 674 B
JavaScript
import { Element } from '../models';
var ElementMapper = /** @class */ (function () {
function ElementMapper() {
}
ElementMapper.prototype.mapElement = function (response) {
if (!response) {
throw Error("Invalid response for mapping element");
}
return new Element({
codename: response.codename,
name: response.name,
type: response.type,
options: response.options ? response.options : [],
taxonomyGroup: response.taxonomy_group
});
};
return ElementMapper;
}());
export { ElementMapper };
//# sourceMappingURL=element.mapper.js.map