Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function parseReadme(packageName: string, readme: string): string | void {
if (_.isEmpty(readme) === false) {
return sanitizyReadme(readme);
}
// logs readme not found error
logger.error({ packageName }, '@{packageName}: No readme found');
return sanitizyReadme('ERROR: No README data found!');
}
export function parseReadme(packageName: string, readme: string): string | void {
if (_.isEmpty(readme) === false) {
return sanitizyReadme(readme);
}
// logs readme not found error
logger.error({ packageName }, '@{packageName}: No readme found');
return sanitizyReadme('ERROR: No README data found!');
}