refactor: destruct in parameters list to build object

This commit is contained in:
siiky 2024-06-28 12:20:09 +01:00
parent 704e1673bd
commit 3e058c6a98

View file

@ -14,10 +14,7 @@ const OFAC_SOURCES_NAMES = process.env.OFAC_SOURCES_NAMES.split(',')
const OFAC_SOURCES_URLS = process.env.OFAC_SOURCES_URLS.split(',')
const ofacSources = _.map(
it => ({
name: it[0],
url: it[1]
}),
([name, url]) => ({ name, url }),
_.zip(OFAC_SOURCES_NAMES, OFAC_SOURCES_URLS)
)