Skip to content

Commit

Permalink
feat: moved function to utility
Browse files Browse the repository at this point in the history
  • Loading branch information
KoolTheba committed Oct 28, 2023
1 parent 761ad25 commit 6f17640
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/utils/comparator/areEqualElements.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { ScoreElement } from "../../types";

export const areEqualElements = (
currentElement: ScoreElement,
previousElement: ScoreElement,
) => {
if (
JSON.stringify(currentElement.details) ===
JSON.stringify(previousElement.details) ||
JSON.stringify(currentElement.reason) ===
JSON.stringify(previousElement.reason)
) {
return true;
}
return false;
};

0 comments on commit 6f17640

Please sign in to comment.