Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const transformData = data => {
let adaptedData = [];
if (data && data.length !== 0) {
adaptedData = data.features.map(feature => {
return Object.assign(feature, {
category: "PROTEOMICS",
type: feature.unique ? "unique" : "non_unique",
tooltipContent: formatTooltip(feature)
});
});
adaptedData = renameProperties(adaptedData);
}
return adaptedData;
};