canirequire › Dual (CommonJS + ESM) › jsdoc-to-markdown
Is jsdoc-to-markdown ESM-only? Can you require() it?
Generates markdown API documentation from jsdoc annotated source code
Last verified Sep 9, 2026 against jsdoc-to-markdown@9.1.3. Markdown · JSON
Dual (CommonJS + ESM) Dual package — require() works on every Node.js version we test; import works too
jsdoc-to-markdown publishes both a CommonJS entry and a native ESM entry (ESM added in 9.0.0). require("jsdoc-to-markdown") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun. The package declares Node.js >=12.17. import "jsdoc-to-markdown" works alongside it.
What to do
- Nothing to change. require("jsdoc-to-markdown") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun. The package declares Node.js >=12.17. import * as jsdocToMarkdown from "jsdoc-to-markdown" works alongside it; use named imports for what the ESM entry exports.
- TypeScript: npm install -D @types/jsdoc-to-markdown
Does jsdoc-to-markdown@9.1.3 actually load? Runtime test results
Installed and executed on Sep 9, 2026 with require("jsdoc-to-markdown") from a CommonJS file and import "jsdoc-to-markdown" from an ES module.
| Runtime | require("jsdoc-to-markdown") | import "jsdoc-to-markdown" |
|---|---|---|
| Node.js 18 | ✓ works | ✓ works |
| Node.js 20 | ✓ works | ✓ works |
| Node.js 22 | ✓ works | ✓ works |
| Node.js 24 | ✓ works | ✓ works |
| Node.js 26 | ✓ works | ✓ works |
| Bun 1.4.0 | ✓ works | ✓ works |
How to import jsdoc-to-markdown
ES modules (import)
import * as jsdocToMarkdown from "jsdoc-to-markdown";Namespace import shown because the ESM entry may have no default export; use named imports for what it exports.
CommonJS (require)
const jsdocToMarkdown = require("jsdoc-to-markdown");Module format by version
Derived from the type, main and exports fields of every stable release on npm, corrected where a runtime test of that version contradicted them (103 versions; the newest 60 shown).
| Versions | Format | First published |
|---|---|---|
| 9.0.0 – 9.1.3 | Dual (CommonJS + ESM) | Sep 1, 2024 |
| 0.5.7 – 8.0.3 | CommonJS | Sep 9, 2014 |
Frequently asked
Is jsdoc-to-markdown ESM-only?
jsdoc-to-markdown@9.1.3 ships CommonJS and ESM builds. jsdoc-to-markdown publishes both a CommonJS entry and a native ESM entry (ESM added in 9.0.0). require("jsdoc-to-markdown") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun. The package declares Node.js >=12.17. import "jsdoc-to-markdown" works alongside it.
Can I require jsdoc-to-markdown?
Yes. jsdoc-to-markdown ships a CommonJS entry alongside the native ESM entry. require("jsdoc-to-markdown") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun. The package declares Node.js >=12.17.
Does jsdoc-to-markdown work in Bun?
Yes. import "jsdoc-to-markdown" loaded successfully in Bun 1.4.0 on Sep 9, 2026.
Does jsdoc-to-markdown ship TypeScript types?
Not bundled. Install the community types with "npm install -D @types/jsdoc-to-markdown".
Links
Other dual (commonjs + esm) packages
- minimatch 10.2.6Dual
- brace-expansion 5.0.9Dual
- lru-cache 11.5.2Dual
- tslib 2.8.1Dual
- glob 13.0.6Dual
- eslint-visitor-keys 5.0.1Dual
- yallist 5.0.0Dual
- balanced-match 4.0.4Dual
Similar popularity
- ember-cli-inject-live-reload 2.1.0CommonJS
- babel 6.23.0CommonJS
- @vue/cli-plugin-typescript 5.0.9CommonJS
- ant-design-vue 4.2.6CommonJS
- react-addons-test-utils 15.6.2CommonJS
- gulp-less 5.0.0CommonJS
- istanbul-instrumenter-loader 3.0.1CommonJS
- child_process 1.0.2CommonJS