The @typicalname tag - jsdoc2md/jsdoc-to-markdown GitHub Wiki
1. Say you wrote Underscore.
/**
* @module underscore
*/
/**
* Find something where.
*/
exports.findWhere = function () {}
/**
* Flatten an array.
*/
exports.flatten = function () {}
2. In the output, all method signatures start with underscore.
:
Find something where.
Kind: static method of underscore
Flatten an array.
Kind: static method of underscore
3. But nobody writes underscore.
, typically they write _.
. To reflect this, use the jsdoc2md-specific @typicalname
tag:
/**
* @module underscore
* @typicalname _
*/
/**
* Find something where.
*/
exports.findWhere = function () {}
/**
* Flatten an array.
*/
exports.flatten = function () {}
4. Now the output looks more realistic:
Find something where.
Kind: static method of underscore
Flatten an array.
Kind: static method of underscore