How to use the rambdax.template 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
const jsRelated = repos.filter(isJS)
  const jsLibs = jsRelated.filter(isLibrary)
  const reactLibs = jsRelated.filter(prop('isReact'))
  const tsLibs = jsRelated.filter(prop('isTypescript'))
  const jsProjects = jsRelated.filter(complement(prop('isLibrary')))
  const otherLibs = repos.filter(complement(isJS))

  const jsContent = createReadmePartial(jsLibs)
  const awesomeContent = createReadmePartial(awesomeRepos)
  const reactContent = createReadmePartial(reactLibs)
  const tsContent = createReadmePartial(tsLibs)
  const jsProjectsContent = createReadmePartial(jsProjects)
  const otherContent = createReadmePartial(otherLibs)

  const jsTitle = template(TITLE, {
    num : jsLibs.length,
    tag : 'Javascript',
  })
  const awesomeTitle = template(AWESOME_TITLE, {
    num : awesomeRepos.length,
    tag : 'Awesome lists',
  })
  const reactTitle = template(TITLE, {
    num : reactLibs.length,
    tag : 'React',
  })
  const tsTitle = template(TITLE, {
    num : tsLibs.length,
    tag : 'Typescript',
  })
  const jsProjectsTitle = template(TITLE_PROJECTS, { num : jsProjects.length })
github selfrefactor / useful-javascript-libraries / src / indexProve.js View on Github external
const tsLibs = jsRelated.filter(prop('isTypescript'))
  const jsProjects = jsRelated.filter(complement(prop('isLibrary')))
  const otherLibs = repos.filter(complement(isJS))

  const jsContent = createReadmePartial(jsLibs)
  const awesomeContent = createReadmePartial(awesomeRepos)
  const reactContent = createReadmePartial(reactLibs)
  const tsContent = createReadmePartial(tsLibs)
  const jsProjectsContent = createReadmePartial(jsProjects)
  const otherContent = createReadmePartial(otherLibs)

  const jsTitle = template(TITLE, {
    num : jsLibs.length,
    tag : 'Javascript',
  })
  const awesomeTitle = template(AWESOME_TITLE, {
    num : awesomeRepos.length,
    tag : 'Awesome lists',
  })
  const reactTitle = template(TITLE, {
    num : reactLibs.length,
    tag : 'React',
  })
  const tsTitle = template(TITLE, {
    num : tsLibs.length,
    tag : 'Typescript',
  })
  const jsProjectsTitle = template(TITLE_PROJECTS, { num : jsProjects.length })
  const otherTitle = template(OTHER_TITLE, { num : otherLibs.length })

  const sep = '---\n\n'
  const js = `${ jsTitle }${ jsContent }`
github selfrefactor / useful-javascript-libraries / src / indexProve.js View on Github external
num : jsLibs.length,
    tag : 'Javascript',
  })
  const awesomeTitle = template(AWESOME_TITLE, {
    num : awesomeRepos.length,
    tag : 'Awesome lists',
  })
  const reactTitle = template(TITLE, {
    num : reactLibs.length,
    tag : 'React',
  })
  const tsTitle = template(TITLE, {
    num : tsLibs.length,
    tag : 'Typescript',
  })
  const jsProjectsTitle = template(TITLE_PROJECTS, { num : jsProjects.length })
  const otherTitle = template(OTHER_TITLE, { num : otherLibs.length })

  const sep = '---\n\n'
  const js = `${ jsTitle }${ jsContent }`
  const react = `${ sep }${ reactTitle }${ reactContent }`
  const ts = `${ sep }${ tsTitle }${ tsContent }`
  const awesome = `${ sep }${ awesomeTitle }${ awesomeContent }`
  const projects = `${ sep }${ jsProjectsTitle }${ jsProjectsContent }`
  const other = `${ sep }${ otherTitle }${ otherContent }`

  writeFileSync(
    `${ process.cwd() }/README.md`,
    `${ js }\n${ awesome }${ react }${ ts }${ projects }${ other }`
  )
}
github selfrefactor / useful-javascript-libraries / src / indexProve.js View on Github external
const jsProjectsContent = createReadmePartial(jsProjects)
  const otherContent = createReadmePartial(otherLibs)

  const jsTitle = template(TITLE, {
    num : jsLibs.length,
    tag : 'Javascript',
  })
  const awesomeTitle = template(AWESOME_TITLE, {
    num : awesomeRepos.length,
    tag : 'Awesome lists',
  })
  const reactTitle = template(TITLE, {
    num : reactLibs.length,
    tag : 'React',
  })
  const tsTitle = template(TITLE, {
    num : tsLibs.length,
    tag : 'Typescript',
  })
  const jsProjectsTitle = template(TITLE_PROJECTS, { num : jsProjects.length })
  const otherTitle = template(OTHER_TITLE, { num : otherLibs.length })

  const sep = '---\n\n'
  const js = `${ jsTitle }${ jsContent }`
  const react = `${ sep }${ reactTitle }${ reactContent }`
  const ts = `${ sep }${ tsTitle }${ tsContent }`
  const awesome = `${ sep }${ awesomeTitle }${ awesomeContent }`
  const projects = `${ sep }${ jsProjectsTitle }${ jsProjectsContent }`
  const other = `${ sep }${ otherTitle }${ otherContent }`

  writeFileSync(
    `${ process.cwd() }/README.md`,
github selfrefactor / useful-javascript-libraries / src / indexProve.js View on Github external
tag : 'Javascript',
  })
  const awesomeTitle = template(AWESOME_TITLE, {
    num : awesomeRepos.length,
    tag : 'Awesome lists',
  })
  const reactTitle = template(TITLE, {
    num : reactLibs.length,
    tag : 'React',
  })
  const tsTitle = template(TITLE, {
    num : tsLibs.length,
    tag : 'Typescript',
  })
  const jsProjectsTitle = template(TITLE_PROJECTS, { num : jsProjects.length })
  const otherTitle = template(OTHER_TITLE, { num : otherLibs.length })

  const sep = '---\n\n'
  const js = `${ jsTitle }${ jsContent }`
  const react = `${ sep }${ reactTitle }${ reactContent }`
  const ts = `${ sep }${ tsTitle }${ tsContent }`
  const awesome = `${ sep }${ awesomeTitle }${ awesomeContent }`
  const projects = `${ sep }${ jsProjectsTitle }${ jsProjectsContent }`
  const other = `${ sep }${ otherTitle }${ otherContent }`

  writeFileSync(
    `${ process.cwd() }/README.md`,
    `${ js }\n${ awesome }${ react }${ ts }${ projects }${ other }`
  )
}
github selfrefactor / useful-javascript-libraries / src / indexProve.js View on Github external
const jsContent = createReadmePartial(jsLibs)
  const awesomeContent = createReadmePartial(awesomeRepos)
  const reactContent = createReadmePartial(reactLibs)
  const tsContent = createReadmePartial(tsLibs)
  const jsProjectsContent = createReadmePartial(jsProjects)
  const otherContent = createReadmePartial(otherLibs)

  const jsTitle = template(TITLE, {
    num : jsLibs.length,
    tag : 'Javascript',
  })
  const awesomeTitle = template(AWESOME_TITLE, {
    num : awesomeRepos.length,
    tag : 'Awesome lists',
  })
  const reactTitle = template(TITLE, {
    num : reactLibs.length,
    tag : 'React',
  })
  const tsTitle = template(TITLE, {
    num : tsLibs.length,
    tag : 'Typescript',
  })
  const jsProjectsTitle = template(TITLE_PROJECTS, { num : jsProjects.length })
  const otherTitle = template(OTHER_TITLE, { num : otherLibs.length })

  const sep = '---\n\n'
  const js = `${ jsTitle }${ jsContent }`
  const react = `${ sep }${ reactTitle }${ reactContent }`
  const ts = `${ sep }${ tsTitle }${ tsContent }`
  const awesome = `${ sep }${ awesomeTitle }${ awesomeContent }`
  const projects = `${ sep }${ jsProjectsTitle }${ jsProjectsContent }`
github selfrefactor / useful-javascript-libraries / src / indexProve.js View on Github external
.map(x => {
      const templateInput = {
        description : x.description ? x.description.trim() : '',
        title       : titleCase(x.name),
        url         : x.html_url,
      }
      const templated = x.description ?
        template(TEMPLATE, templateInput) :
        template(TEMPLATE_NO_DESC, templateInput)

      return `${ templated }\n`
    })
    .join('\n')