MCPcopy
hub / github.com/jsdoc/jsdoc / addTag

Method addTag

lib/jsdoc/doclet.js:324–338  ·  view source on GitHub ↗

* Add a tag to the doclet. * * @param {string} title - The title of the tag being added. * @param {string} [text] - The text of the tag being added.

(title, text)

Source from the content-addressed store, hash-verified

322 * @param {string} [text] - The text of the tag being added.
323 */
324 addTag(title, text) {
325 const tagDef = jsdoc.tag.dictionary.lookUp(title);
326 const newTag = new jsdoc.tag.Tag(title, text, this.meta);
327
328 if (tagDef && tagDef.onTagged) {
329 tagDef.onTagged(this, newTag);
330 }
331
332 if (!tagDef) {
333 this.tags = this.tags || [];
334 this.tags.push(newTag);
335 }
336
337 applyTag(this, newTag);
338 }
339
340 /**
341 * Set the doclet's `memberof` property.

Callers 14

constructorMethod · 0.95
postProcessMethod · 0.95
setModuleScopeMemberOfFunction · 0.80
processAliasFunction · 0.80
findSymbolMemberofFunction · 0.80
addSymbolMemberofFunction · 0.80
newSymbolDocletFunction · 0.80
setDocletKindToTitleFunction · 0.80
setDocletNameToValueFunction · 0.80
setDocletNameToValueNameFunction · 0.80
setNameToFileFunction · 0.80

Calls 2

applyTagFunction · 0.85
lookUpMethod · 0.80

Tested by

no test coverage detected