Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const parseComment = (commentNode, indent, trim = true) => {
// Preserve JSDoc block start/end indentation.
return commentParser(`${indent}/*${commentNode.value}${indent}*/`, {
// @see https://github.com/yavorskiy/comment-parser/issues/21
parsers: [
commentParser.PARSERS.parse_tag,
skipSeeLink(commentParser.PARSERS.parse_type),
skipSeeLink(
(str, data) => {
if ([
'example', 'return', 'returns', 'throws', 'exception',
'access', 'version', 'since', 'license', 'author',
].includes(data.tag)) {
return null;
}
return commentParser.PARSERS.parse_name(str, data);
},
),