mirror of
https://github.com/strapi/strapi.git
synced 2025-08-03 22:39:01 +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,
|
||
|
};
|