canirequire

canirequireDual (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.

Latest
9.1.3 (Oct 3, 2025)
Module format
Dual (CommonJS + ESM)
Last CommonJS version
9.1.3
Native ESM since
9.0.0
TypeScript types
@types/jsdoc-to-markdown
Node engines
>=12.17
Weekly downloads
155K
License
MIT

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.

Runtimerequire("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).

VersionsFormatFirst published
9.0.0 – 9.1.3Dual (CommonJS + ESM)Sep 1, 2024
0.5.7 – 8.0.3CommonJSSep 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

Similar popularity