Registry / devops / jsdoc-to-markdown

jsdoc-to-markdown

JSON →
library9.1.3jsnpmunverified

Generates Markdown API documentation from JSDoc-annotated JavaScript source code. Current stable version is 9.1.3, released January 2025. The library provides a CLI and a programmable API. It was the first tool to generate Markdown from JSDoc and remains the most popular. Active development with multiple releases per year; breaking changes are managed via major version bumps. Requires Node.js >=12.17. Peer dependency on @75lb/nature for theming. Notable breaking changes include removal of sync methods in v9.0.0 and removal of lodash.omit dependency in v9.1.3.

npm install jsdoc-to-markdown
INSTALL
IMPORT
SIG · JSDOC-TO-MARKDOWN
J
jsdoc-to-markdown
devopsjavascriptv9.1.3
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

jsdoc2md
import jsdoc2md from 'jsdoc-to-markdown'
const jsdoc2md = require('jsdoc-to-markdown')
Default import provides the main API. CJS require works but ESM is recommended for modern Node.
render
import jsdoc2md from 'jsdoc-to-markdown'; const output = await jsdoc2md.render({ files: ['src/*.js'] })
jsdoc2md.render({ files: 'src/*.js' })
render() is an async method on the default export. files must be an array, not a string.
getTemplateData
import jsdoc2md from 'jsdoc-to-markdown'; const data = await jsdoc2md.getTemplateData({ files: ['src/*.js'] })
Returns raw JSON data before template rendering. Useful for custom templates.
clear
import jsdoc2md from 'jsdoc-to-markdown'; jsdoc2md.clear()
Clears the jsdoc2md cache. Not commonly needed.

Renders markdown from a single JSDoc-annotated file using the async API.

import jsdoc2md from 'jsdoc-to-markdown'; const output = await jsdoc2md.render({ files: ['example.js'], 'heading-depth': 2, }); console.log(output); /* example.js: /** * A quite wonderful function. * @param {object} - Privacy gown * @param {object} - Security * @returns {survival} */ function protection (cloak, dagger) {} */
jsdoc2md --version
Debug
Known issues
breakingRemoved renderSync(), getTemplateDataSync() and getJsdocDataSync() in v9.0.0. API is now async-only.
fix
Use async/await or Promises: const output = await jsdoc2md.render({ ... })
affects: >=9.0.0
breakingPassing either option.files or option.source is now required in v9.0.0; previously you could omit both and it would read from stdin.
fix
Always provide files (array) or source (string) input.
affects: >=9.0.0
breakingUpgraded to jsdoc v4.0.0 in v8.0.0, which requires Node >=12. Minimum Node increased from v10 to v12.
fix
Update Node.js to version 12 or higher.
affects: >=8.0.0
gotchaThe render order of files specified in the 'files' array was respected prior to jsdoc-api v9.0.0 but broken by that version; sorted alphabetically instead. Fixed in jsdoc-api v9.3.5.
fix
Upgrade to jsdoc-to-markdown v9.1.3 or later.
affects: 9.0.0 - 9.1.2
deprecatedlodash.omit dependency was removed in v9.1.3. No longer needed internally.
fix
No action needed; if you were relying on lodash.omit, install it explicitly.
affects: 9.1.3
gotchaSpaces in jsdoc binary path can cause jsdoc2md to fail. Fixed in v9.0.5.
fix
Upgrade to jsdoc-to-markdown v9.0.5 or later.
affects: <9.0.5
gotchautil.isRegExp is not a function error on Node v23 (bug in jsdoc-api). Temporary workaround in v9.0.3, permanent fix in v9.0.4.
fix
Upgrade to jsdoc-to-markdown v9.0.4 or later.
affects: 9.0.0 - 9.0.3
Errors
Common errors & fixes
TypeError: jsdoc2md.renderSync is not a function
renderSync was removed in v9.0.0. The API is now async-only.
fix
Use async/await: const output = await jsdoc2md.render({ ... })
Error: options.source or options.files must be defined
In v9.0.0+, input source/files are required.
fix
Provide files (array of paths) or source (string of code) to the render method.
util.isRegExp is not a function
Compatibility issue with Node v23 in older versions.
fix
Upgrade to jsdoc-to-markdown v9.0.4 or later.
Error: The specified jsdoc binary path contains spaces
Spaces in jsdoc path cause parsing issues in versions before v9.0.5.
fix
Upgrade to v9.0.5+ or ensure jsdoc path has no spaces.
Upgrade
Version history
9.1.3latest on npm
Audit
Dependencies
@75lb/natureoptionalPeer dependency for default output theme
Agent activity
4 hits · last 30 days
node
4
Resources
jsdoc-to-markdown — npm install jsdoc-to-markdown · libregistry