documentationjs / documentationjs/documentation

CommonJS exporting a hash of functions not working

Open
#1,131 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5.8k
Forks
481
PR merge metrics
No merged PRs in 30d

Description

I have a few js files that group together some utility functions that are structured like this example:

``` js
/** @module calculator */

/**
* Adds two numbers
* @param {number} a - The first number
* @param {number} b - The second number
* @returns {number} - The addition result
*/
function add(a, b) {
return a + b;
}

module.exports = {
add,
};
```

Running the documentaionjs 8.1.2 cli on this gives me an empty module calculator and the function add. Since I export add as part of the module I would expect it to be documented as part of it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.