Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const liquidMap = {}
liquidMap.projectName = config.projectName
// Return original if not a match.
liquidMap.gitProjectName = config.projectName.replace(
/^[@][a-zA-Z0-9-_]+[/]([a-zA-Z0-9-_]+)$/, '$1')
const author = {}
author.name = ''
author.email = ''
author.url = ''
let gitConfig
try {
gitConfig = await parseGitConfig.promise()
} catch (err) {
try {
gitConfig = await parseGitConfig.promise(
{
cwd: userHome,
path: '.gitconfig'
}
)
} catch (err) {
}
}
if (gitConfig) {
if (gitConfig.user && gitConfig.user.name) {
author.name = gitConfig.user.name
}
if (gitConfig.user && gitConfig.user.email) {