refactor: destruct in parameters list to build object
This commit is contained in:
parent
704e1673bd
commit
3e058c6a98
1 changed files with 1 additions and 4 deletions
|
|
@ -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 OFAC_SOURCES_URLS = process.env.OFAC_SOURCES_URLS.split(',')
|
||||||
|
|
||||||
const ofacSources = _.map(
|
const ofacSources = _.map(
|
||||||
it => ({
|
([name, url]) => ({ name, url }),
|
||||||
name: it[0],
|
|
||||||
url: it[1]
|
|
||||||
}),
|
|
||||||
_.zip(OFAC_SOURCES_NAMES, OFAC_SOURCES_URLS)
|
_.zip(OFAC_SOURCES_NAMES, OFAC_SOURCES_URLS)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue