Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
comments.forEach(comment => {
comment = trim(comment);
if (startWith(comment, 'example')) {
example = comment.replace(/^example/, '');
example = outdentOneSpace(example);
example = example.replace(regTsIgnore, '');
example = '```javascript\n' + trim(example) + '\n```';
}
});
doc = splitH2(doc);
each(comments, comment => {
comment = trim(comment);
if (startWith(comment, 'typescript')) {
tsDefinition = comment.replace(/^typescript/, '');
tsDefinition = outdentOneSpace(tsDefinition);
tsDefinition = tsDefinition.replace(/export declare/g, 'declare');
tsDefinition += '\n\nexport = ' + modName;
}
});