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. JSON
Dual (CommonJS + ESM) Dual package — both require() and import work
jsdoc-to-markdown publishes both a CommonJS entry and a native ESM entry (ESM added in 9.0.0). require("jsdoc-to-markdown") and import "jsdoc-to-markdown" both work on every supported Node.js version and in Bun.
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 | ✓ works | ✓ works |
How to import jsdoc-to-markdown
ES modules (import)
import jsdocToMarkdown from "jsdoc-to-markdown";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 (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") and import "jsdoc-to-markdown" both work on every supported Node.js version and in Bun.
Can I require jsdoc-to-markdown?
Yes. jsdoc-to-markdown ships a CommonJS entry, so require("jsdoc-to-markdown") works on every Node.js version, alongside the native ESM entry for import.
Does jsdoc-to-markdown work in Bun?
Yes. import "jsdoc-to-markdown" loaded successfully in Bun 1.4 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
- glob 13.0.6Dual
- eslint-visitor-keys 5.0.1Dual
- yallist 5.0.0Dual
- balanced-match 4.0.4Dual
- js-yaml 5.4.1Dual
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