Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function updateSecondaryFn(){
const { links } = readJSONSync(SECONDARY_INPUT)
const out = await mapAsync(async url => {
const { data } = await get(url)
return data.split('\n')
})(links)
const allLinks = flatten(out).join('\n')
writeFileSync(SECONDARY_OUTPUT, allLinks)
}