mirror of
https://github.com/strapi/strapi.git
synced 2025-08-02 22:07:11 +00:00
15 lines
302 B
JavaScript
15 lines
302 B
JavaScript
'use strict';
|
|
|
|
/**
|
|
* Returns the attribute keys of the component related attributes
|
|
*/
|
|
function getComponentAttributes(attributes) {
|
|
return Object.keys(attributes).filter(key =>
|
|
['component', 'dynamiczone'].includes(attributes[key].type)
|
|
);
|
|
}
|
|
|
|
module.exports = {
|
|
getComponentAttributes,
|
|
};
|