src/ast.js
Function createAST
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const createAST = (obj1, obj2) => {
const keys = _.union(Object.keys(obj1), Object.keys(obj2));
return keys.map((key) => {
if (_.isObject(obj1[key]) && _.isObject(obj2[key])) {
return {
Avoid too many return
statements within this function. Open
Open
return {
key,
oldValue: obj1[key],
newValue: obj2[key],
type: 'changed',