How to use the rambdax.flatten function in rambdax

To help you get started, we’ve selected a few rambdax examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github selfrefactor / useful-javascript-libraries / src / indexProve.js View on Github external
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)
}