Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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 })
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 }`
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 }`
)
}
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`,
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 }`
)
}
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 }`
.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')