How to use this tool
- Paste JavaScript source code into the editor on the left.
- Click Generate documentation, or use an example preset.
- Review the generated Markdown documentation on the right.
- Click Copy Markdown or Download .md.
Best practice: document contracts
Good documentation states what a function accepts, what it returns, and how to call it. This generator emphasizes signatures, parameter types, return values, and examples.
Best practice: support JSDoc
JSDoc tags such as @param, @returns, and @example
are parsed when present and combined with static inference.
Best practice: keep examples runnable
Generated examples use placeholder values based on parameter names and inferred types, making the documentation easier to test and understand.
JavaScript source
Generated documentation
Supported patterns
Function declarations
function name(a, b) {},
async function name() {},
function* name() {},
and exported declarations.
Arrow functions
const name = (a) => {},
const name = async (a) => {},
simple parameters, defaults, and rest parameters.
Class methods
Methods inside class bodies, including constructors, static methods,
generators, and accessors when detectable.