MCPcopy
hub / github.com/jsdoc/jsdoc / fixDescription

Function fixDescription

lib/jsdoc/doclet.js:143–155  ·  view source on GitHub ↗
(docletSrc, {code})

Source from the content-addressed store, hash-verified

141}
142
143function fixDescription(docletSrc, {code}) {
144 let isClass;
145
146 if (!/^\s*@/.test(docletSrc) && docletSrc.replace(/\s/g, '').length) {
147 isClass = code &&
148 (code.type === Syntax.ClassDeclaration ||
149 code.type === Syntax.ClassExpression);
150
151 docletSrc = `${isClass ? '@classdesc' : '@description'} ${docletSrc}`;
152 }
153
154 return docletSrc;
155}
156
157/**
158 * Replace the existing tag dictionary with a new tag dictionary.

Callers 1

constructorMethod · 0.85

Calls 1

testMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…