diff --git a/lib/ofac/index.js b/lib/ofac/index.js index f51a3ad8..8f34027b 100644 --- a/lib/ofac/index.js +++ b/lib/ofac/index.js @@ -6,8 +6,6 @@ const nameUtils = require('./name-utils') const _ = require('lodash/fp') const logger = require('../logger') -const debugLog = require('../pp')(__filename) // KOSTIS TODO: remove - const OFAC_DATA_DIR = process.env.OFAC_DATA_DIR let structs = null @@ -40,8 +38,6 @@ function makeCompatible (nameParts) { } function match (nameParts, birthDateString, options) { - const {debug} = options - if (!structs) { logger.error(new Error('The OFAC data sources have not been loaded yet.')) return false @@ -66,10 +62,7 @@ function match (nameParts, birthDateString, options) { ])(birthDateString) const candidate = {parts, fullName, words, birthDate} - debug && debugLog(candidate) - const result = matcher.match(structs, candidate, options) - debug && debugLog(result) return result } diff --git a/lib/ofac/matching.js b/lib/ofac/matching.js index 3ddb883e..f8c089e8 100644 --- a/lib/ofac/matching.js +++ b/lib/ofac/matching.js @@ -1,7 +1,6 @@ const jaro = require('talisman/metrics/distance/jaro') const _ = require('lodash/fp') -const debugLog = require('../pp')(__filename) // KOSTIS TODO: remove const logger = require('../logger') const stringSimilarity = _.curry(jaro) @@ -30,7 +29,7 @@ const isBornTooLongSince = _.curry((days, dateObject, individual) => { // algorithm function match (structs, candidate, options) { - const {threshold, fullNameThreshold, ratio = 0.5, debug, verboseFor} = options + const {threshold, fullNameThreshold, ratio = 0.5, verboseFor} = options const {fullName, words, birthDate} = candidate // Accept aliases who's full name matches. @@ -90,9 +89,6 @@ function match (structs, candidate, options) { _.map(_.first) )(matches) - debug && debugLog(aliasIdsFromFullName) - debug && debugLog(aliasIdsFromNamePart) - // Get the full record for each matched id const getIndividual = aliasId => { const individualId = structs.aliasToIndividual.get(aliasId)