Skip to content

JSdoc description of function should include a few examples of result #268

@czlowiek488

Description

@czlowiek488

Description

JSdoc should include result examples for each example.
This would make finding correct method easier.

It could be fancy to fill examples automatically on some npm hook.
If we agree to solution I may implement it.

Proposed solution

/**
 * Generate a random credit card brand.
 *
 * @category Finance
 *
 * @example
 *
 * randCreditCardBrand()
 * 
 * "Visa"
 * "Visa Electron"
 * "UATP"
 */

image

Alternatives considered

No response

Do you want to create a pull request?

Yes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions