@emdaer/plugin-jsdoc-tag-value

3.2.31 • Public • Published

@emdaer/plugin-jsdoc-tag-value · Travis Documented with emdaer Maintained with lerna

Usage

@emdaer/plugin-jsdoc-tag-value is an emdaer plugin – see the emdaer monorepo for more information

Documentation

Example

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
-->

Usage in README

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
-->

Node API

jsdocTagValue

Render a jsdoc tag’s value for a given file/function

Parameters

  • options any
    • options.source string? The file that contains the function
    • options.functionName string? The function name that contains the desired jsdoc tag
    • options.tag string? The tag from whom to pull the value
    • options.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
-->

Returns Promise<string> The link as an anchor HTML element.

/@emdaer/plugin-jsdoc-tag-value/

    Package Sidebar

    Install

    npm i @emdaer/plugin-jsdoc-tag-value

    Weekly Downloads

    38

    Version

    3.2.31

    License

    MIT

    Unpacked Size

    22.8 kB

    Total Files

    8

    Last publish

    Collaborators

    • beautyhammer
    • emdaerbot
    • flipactual
    • infiniteluke