@taurgis/sfccdx
Version:
SFCCDX is a command line interface (CLI) for Salesforce Commerce Cloud. It can be used to easily manage (meta)data (import/export) in relation to your project.
18 lines (13 loc) • 435 B
JavaScript
function cleanOCAPIResponse(response) {
const attributesToRemove = ['_v', '_type', '_resource_state', 'link', 'effective_id', 'system', 'attribute_definitions_count'];
const keys = Object.keys(response);
attributesToRemove.forEach((attribute) => {
if (keys.indexOf(attribute) > -1) {
delete response[attribute];
}
});
return response;
}
module.exports = {
cleanOCAPIResponse,
};