Tore out the old engine, left some wounds

This commit is contained in:
Stefan Zermatten
2021-09-27 14:28:32 +02:00
parent 2228802dd3
commit fdea748441
125 changed files with 102 additions and 2235 deletions

View File

@@ -0,0 +1,16 @@
import applyFnToKey from '../utility/applyFnToKey.js';
import { unset } from 'lodash';
export default function removeSchemaFields(schemas, prop){
schemas.forEach(schema => {
schema._schemaKeys.forEach(key => {
// Skip object and array keys
if (
schema.getQuickTypeForKey(key) === 'object' ||
schema.getQuickTypeForKey(key) === 'objectArray'
) return;
// Unset other computed only keys
applyFnToKey(prop, key, unset)
});
});
}