Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
jsdoc-memberof-namespace
Advanced tools
JSDoc plugin to automatically generate memberof namespace tags
JSDoc plugin to automatically generate memberof namespace tags
This plugin creates a @memberof
tag, if missing, from the @namespace
tag defined in index.js
(index scope) or the file itself (module scope). This enables for a complex project with many modules or packages to be documented easily without needing to manually add @memberof
tags to every comment to keep documentation organised.
Sample documentation for test module is available on docs page.
JSDoc should be installed and configured.
Install jsdoc-memberof-namespace
npm install jsdoc-memberof-namespace --save-dev
Add node_modules/jsdoc-memberof-namespace
to plugins
in JSDoc configuration file
Sample conf.json
{
"source": {
"include": "src"
},
"plugins": [
"plugins/markdown",
"node_modules/jsdoc-memberof-namespace"
],
"opts": {
"recurse": true
}
}
// index.js
/**
* Acme Corporation
* @namespace acme
*/
// Product.js
/**
* Base product
* Documented as acme.Product
*/
class Product {
/**
* Add product to basket
* Documented as acme.Product#buy
*/
buy() { }
}
Multiple namespaces can be defined in multiple places and the closest applicable namespace will be used:
index.js
in the same directory as the fileindex.js
in any parent directory closest to the fileNamespace can be defined in index.js
located in same directory as the file or any of the parent directories. It is the easiest way to document your project by simply adding @namespace
once alongside your re-exports.
Namespace can be defined in the file itself. This namespace will only apply to other documentation comments in the file and only those defined after the namespace. The behaviour is similar to @module
tag.
/**
* @type {acme.Foo}
* @param {acme.Bar} bar
*/
useLongnameInNav
default template configuration option to use fully qualified names for navigation
"templates": {
"default": {
"includeDate": false,
"useLongnameInNav": true
}
}
--debug
command-line option to increase JSDoc logging level and look for messages with [JMN]
prefixFAQs
JSDoc plugin to automatically generate memberof namespace tags
We found that jsdoc-memberof-namespace demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.