2022-12-12 16:51:23 +01:00

21 lines
407 B
TypeScript

import type { Schema } from '@strapi/strapi';
import { mapValues, pick } from 'lodash/fp';
const schemaSelectedKeys = [
'collectionName',
'info',
'options',
'pluginOptions',
'attributes',
'kind',
'modelType',
'modelName',
'uid',
'plugin',
'globalId',
];
export const mapSchemasValues = (schemas: Record<string, Schema>) => {
return mapValues(pick(schemaSelectedKeys), schemas);
};