# Correctly grouping members within modules in JSDoc v3

> The @member tag identifies any member that does not have a more specialized kind, such as "class", "function", or "constant".

- URL: https://graffino.com/til/correctly-grouping-members-within-modules-in-jsdoc-v3
- Author: Nick Ciolpan
- Channel: javascript
- Published: 2021-09-28
- Updated: 2024-08-02

JSDoc is great! It's documentation not so much. 
I needed a way to logically group together global methods and I was unsuccessful in finding a straightforward way in its official documentation. 

Eventually, I've come across the following method, using @module and @member.

First, we define the module name, usually at the top of the file:

```
@module MyModule
```

We then proceed to annotate the target function with ```@memeber MyModule```. 
One other important aspect is to also include ```@function``` along with the name of the function in order to appear in the module section.

```
/**
 * @member MyModule
 * @function myFunction
 ....
 */
 export const myFunction = () => ....
```
