se0ga/project-lvl2-s321

View on GitHub
src/ast.js

Summary

Maintainability
A
1 hr
Test Coverage

Function createAST has 35 lines of code (exceeds 25 allowed). Consider refactoring.
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 {
Severity: Minor
Found in src/ast.js - About 1 hr to fix

    Avoid too many return statements within this function.
    Open

        return {
          key,
          oldValue: obj1[key],
          newValue: obj2[key],
          type: 'changed',
    Severity: Major
    Found in src/ast.js - About 30 mins to fix

      There are no issues that match your filters.

      Category
      Status