parent
49f8b66de0
commit
9fc79f1bb4
4 changed files with 11 additions and 9 deletions
|
|
@ -6,6 +6,7 @@ const matcher = require('./matching')
|
|||
const nameUtils = require('./name-utils')
|
||||
const options = require('../options')
|
||||
const _ = require('lodash/fp')
|
||||
const logger = require('../logger')
|
||||
|
||||
const debugLog = require('../pp')(__filename) // KOSTIS TODO: remove
|
||||
|
||||
|
|
@ -42,13 +43,13 @@ function makeCompatible (nameParts) {
|
|||
|
||||
function match (nameParts, birthDateString, options) {
|
||||
const {debug} = options
|
||||
|
||||
if (!structs) {
|
||||
const message = 'The OFAC data sources have not been loaded yet.'
|
||||
return Promise.reject(new Error(message))
|
||||
logger.error(new Error('The OFAC data sources have not been loaded yet.'))
|
||||
return false
|
||||
}
|
||||
|
||||
// Prepare the input data
|
||||
|
||||
const parts = makeCompatible(nameParts)
|
||||
const fullName = nameUtils.makeFullName(parts)
|
||||
const words = nameUtils.makeWords(fullName)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue