@emdaer/plugin-jsdoc-tag-value is an emdaer plugin – see the emdaer monorepo for more information
This will print 2 examples of how to use this plugin:
<!--emdaer-p
- '@emdaer/plugin-jsdoc-tag-value'
- source: ./src/index.js
functionName: jsdocTagValue
tag: example
tagIndex: 0
-->
<!--emdaer-p
- '@emdaer/plugin-jsdoc-tag-value'
- source: ./src/index.js
functionName: jsdocTagValue
tag: example
-->
Use @emdaer/plugin-jsdoc-tag-value
by specifying the source
, functionName
, and tag
you would like to pull the string value from. @emdaer/plugin-jsdoc-tag-value
will pull the description
from documentationjs of the first instance of that tag. This readme is pulling in an example of itself like so:
<!--emdaer-p
- '@emdaer/plugin-jsdoc-tag-value'
- source: ./src/index.js
functionName: jsdocTagValue
tag: example
tagIndex: 0
-->
By omitting the tagIndex
parameter, one can pull in all examples for a given function:
<!--emdaer-p
- '@emdaer/plugin-jsdoc-tag-value'
- source: ./src/index.js
functionName: jsdocTagValue
tag: example
-->
Render a jsdoc tag’s value for a given file/function
Parameters
options
anyoptions.source
string? The file that contains the functionoptions.functionName
string? The function name that contains the desired jsdoc tagoptions.tag
string? The tag from whom to pull the valueoptions.tagIndex
string? The index for the tag from whom to pull the value. If not present, all values for a given tag will be pulled.
Examples
<!--emdaer-p
- '@emdaer/plugin-jsdoc-tag-value'
- source: ./src/index.js
functionName: jsdocTagValue
tag: example
tagIndex: 0
-->
<!--emdaer-p
- '@emdaer/plugin-jsdoc-tag-value'
- source: ./src/index.js
functionName: jsdocTagValue
tag: example
-->