From 84615a5333f0183f93f7cb44600ba99e39e48e46 Mon Sep 17 00:00:00 2001 From: mathieulemieux Date: Mon, 27 May 2024 16:29:50 -0700 Subject: [PATCH] Linting and removing extra --- src/civic/index.js | 10 ---------- src/civic/statement.js | 10 +++------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/src/civic/index.js b/src/civic/index.js index d221998..51a8823 100644 --- a/src/civic/index.js +++ b/src/civic/index.js @@ -185,15 +185,9 @@ const upload = async ({ logger.info(`\n\n${'#'.repeat(80)}\n## PROCESSING RECORDS\n${'#'.repeat(80)}\n`); let recordNumber = 0; - // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - const specialId = null; // '11681'; // - // MAIN LOOP // Looping through Evidence Items for (const [id, evidenceItem] of Object.entries(evidenceItemsById)) { - if (specialId && id !== specialId) { - continue; - } /* PROCESSING EVIDENCEITEMS */ recordNumber++; @@ -393,10 +387,6 @@ const upload = async ({ } } countsST = incrementCounts(countsST, loaclCountsST); - - if (specialId && id === specialId) { - process.exit(); - } } logger.info(`\n\n${'#'.repeat(80)}\n## END OF RECORD PROCESSING\n${'#'.repeat(80)}\n`); diff --git a/src/civic/statement.js b/src/civic/statement.js index 033d398..e4049bc 100644 --- a/src/civic/statement.js +++ b/src/civic/statement.js @@ -11,13 +11,9 @@ const { logger } = require('../logging'); * @param {object} fromGkb actual content from GraphKB * @returns {boolean} whether both contents are matching or not */ -const isMatching = ({ fromCivic, fromGkb, p = ['conditions', 'subject'] }) => { - const c = JSON.stringify(_.pick(fromCivic, ...p)); - const g = JSON.stringify(_.pick(fromGkb, ...p)); - const rel = c === g; - // console.log({ p, c, g, rel }); - return rel; // JSON.stringify(_.pick(fromCivic, ...p)) === JSON.stringify(_.pick(fromGkb, ...p)); -}; +const isMatching = ({ fromCivic, fromGkb, p = ['conditions', 'subject'] }) => ( + JSON.stringify(_.pick(fromCivic, ...p)) === JSON.stringify(_.pick(fromGkb, ...p)) +); /** * Evaluate if a statement needs to be updated