title: How can I refactor this method to reduce its Cognitive Complexity from 26 to the 15 allowed?
body: <pre><code>public checkEditedCell(params): boolean {
      let isEdited: boolean = false;
      let colDef = this.metaData.filter(
          (e: any) =&gt; e.attribute_alias_name === params.colDef.field
      )[0];
      this.originalRecords.forEach((e) =&gt; {
          if (colDef.is_combined_field != &quot;Y&quot; &amp;&amp; e &amp;&amp; params.data) {
              if (parseInt(e.showroom_variant_id) == parseInt(params.data.showroom_variant_id)) {
                  let eValue = e[params.colDef.field];
                  let paramValue = params.value;
                  if (colDef.attribute_display_format === &quot;date&quot;) {
                      if (formatDate(eValue, &quot;yyyy-MM&quot;, &quot;en-US&quot;) != paramValue) {
                          isEdited = true;
                      }
                  } else if (colDef.attribute_alias_name === &quot;private&quot;) {
                      if (
                          eValue.toString().toLowerCase() !== paramValue.toString().toLowerCase()
                      ) {
                          isEdited = true;
                      }
                  } else {
                      if (!eValue &amp;&amp; !paramValue) {
                      }
                      if (eValue != paramValue) {
                          isEdited = true;
                      }
                  }
              }
          }
      });
      return isEdited;
  }
  </code></pre>