Showing 4 of 6 total issues
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 {
Function render
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const render = (ast) => {
const iter = (list, depth) => {
const newList = list.map((elem) => {
const { key } = elem;
const oldValue = stringify(elem.oldValue, depth);
Function iter
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const iter = (list, depth) => {
const newList = list.map((elem) => {
const { key } = elem;
const oldValue = stringify(elem.oldValue, depth);
const newValue = stringify(elem.newValue, depth);
Avoid too many return
statements within this function. Open
Open
return {
key,
oldValue: obj1[key],
newValue: obj2[key],
type: 'changed',