UNPKG

@dxdeveloperexperience/hygie

Version:

Hygie is an easy-to-use Open-Source REST API allowing you to interact with GIT events. This NestJS API expose a set of customizable rules to automate your project's life cycle.

8 lines (7 loc) 277 B
export function getAllComments(content: string): string[] { const regexComment = new RegExp(/(\/\*\*?([\s\S]*?)\*\/)|(\/\/(.*)$)/g); const AllComments = content.match(regexComment); return AllComments.map(c => { return c.replace(/(\*|\r|\n|\/)/g, '').trim(); }); }