How to use the after.md function in after

To help you get started, we’ve selected a few after 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 wei / new-issue / src / helper / gh-helper.js View on Github external
const buildIssueBody = (bodyOutputs = [], config) => {
  const bodyStrings = []
  const { output = {} } = config || {}
  const beforeMD = output['before.md'] || ''
  const afterMD = output['after.md'] || '\n\n'

  if (beforeMD) bodyStrings.push(beforeMD)
  bodyOutputs.forEach(({ label, value }) => {
    if (value) {
      bodyStrings.push(`${label || ''}${value}`)
    } else if (label && !value && !output.hideEmpty) {
      bodyStrings.push(`${label}`)
    }
  })
  if (afterMD) bodyStrings.push(afterMD)
  return bodyStrings.join('\n\n')
}

after

after - tiny flow control

MIT
Latest version published 8 years ago

Package Health Score

71 / 100
Full package analysis