hsifananab/frontend-project-lvl2

View on GitHub
src/getDiffTree.js

Summary

Maintainability
A
2 hrs
Test Coverage
A
100%

Function getDiffTree has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const getDiffTree = (file1, file2) => {
  const keys = _.sortBy(Object.keys({ ...file1, ...file2 }));

  return keys.map((key) => {
    const value1 = file1[key];
Severity: Minor
Found in src/getDiffTree.js - About 1 hr to fix

    Avoid too many return statements within this function.
    Open

        return {
          type: 'unchanged',
          key,
          value: value1,
        };
    Severity: Major
    Found in src/getDiffTree.js - About 30 mins to fix

      There are no issues that match your filters.

      Category
      Status