mirror of
https://github.com/strapi/strapi.git
synced 2025-08-14 11:48:43 +00:00
21 lines
407 B
TypeScript
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);
|
|
};
|