Refactored computations again, split into multiple files, lots still to do

This commit is contained in:
Stefan Zermatten
2020-03-17 16:13:18 +02:00
parent 1a0c2bca78
commit 74fef2bd39
20 changed files with 636 additions and 640 deletions

View File

@@ -0,0 +1,16 @@
import { isEqual, forOwn } from 'lodash';
import { ComputedOnlySkilLSchema } from '/imports/api/properties/Skills.js';
export default function logAlterations(memo){
forOwn(memo.originalPropsById, old => {
let changed = memo.propsById[old._id];
delete changed.computationDetails;
if (!isEqual(old, changed)){
console.log({change: {old, changed}})
}
});
}
// TODO use this as a starting point to write only computed fields that have
// changed