Showing 3 of 3 total issues
Function generateDifferences
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const generateDifferences = (obj1, obj2) => {
const keys = _.union(_.keys(obj1), _.keys(obj2));
return keys.map((key) => {
if (_.has(obj1, key) && !_.has(obj2, key)) {
Function buildDiffs
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const buildDiffs = (diffs, depth) => {
const stringifiedDiffs = diffs.map((diff) => {
const {
type,
value,
Avoid too many return
statements within this function. Open
Open
return {
key,
newValue: obj2[key],
oldValue: obj1[key],
type: 'changed',