JSDoc
Generate professional JavaScript API documentation with JSDoc
About JSDoc
JSDoc is a powerful tool for creating HTML documentation from JavaScript source code. By adding special comment blocks directly in your code, JSDoc automatically generates comprehensive API documentation, making it easier to maintain and share your projects.
FAQ
You add documentation comments directly to your source code using JSDoc tags. Each comment must start with a /** sequence. For example, to document a function, you can write /** This is a description of the foo function. */ function foo() { }.
JSDoc tags are special keywords that provide more information about your code. For example, @constructor indicates that a function is a constructor, @param describes function parameters, and @returns documents the return value. You can find a complete list of tags on the JSDoc home page.
Once your code is commented, run the JSDoc tool from the command line using the command jsdoc book.js. This will create a directory named out/ containing the generated HTML pages.
Yes, you can edit the built-in default template or create an entirely new template to suit your needs.
JSDoc is an API documentation generator for JavaScript, similar to Javadoc or phpDocumentor. Its purpose is to document the API of your JavaScript application or library, including modules, namespaces, classes, methods, and method parameters.
You can indicate that a function is a constructor by adding a @constructor tag to the JSDoc comment. For example, /** * Represents a book. * @constructor */ function Book(title, author) { }
Yes, JSDoc comments must start with a /** sequence to be recognized by the parser. Comments beginning with /*, /***, or more than 3 stars will be ignored, allowing you to suppress parsing of comment blocks.
Alternatives to consider
Community ratings & full listBadges
Promote JSDoc giving it more exposure, by adding these badges to your website, documentation, or product listing. Each badge links back to JSDoc page on Webfolio.
<a href="https://www.webfolio.to/tools/jsdoc?utm_source=badge&utm_campaign=badge" target="_blank" rel="noopener noreferrer"><img src="https://www.webfolio.to/badges/featured_color.svg" alt="Featured on Webfolio" style="max-width: 150px" /></a>
Categories
Claim this tool
Are you the founder? Claim your profile to update details and track views.