strapi-plugin-content-manager
Version:
A powerful UI to easily manage your data.
18 lines (12 loc) • 420 B
JavaScript
import { checkIfAttributeIsDisplayable } from '../../../utils';
const getAllAllowedHeaders = attributes => {
const allowedAttributes = Object.keys(attributes).reduce((acc, current) => {
const attribute = attributes[current];
if (checkIfAttributeIsDisplayable(attribute)) {
acc.push(current);
}
return acc;
}, []);
return allowedAttributes.sort();
};
export default getAllAllowedHeaders;