Turn raw functions
into documentation that ships.
Paste any JavaScript. DocForge parses names, parameters, defaults, and return types, reads any existing JSDoc, and emits a clean, syntax-highlighted Markdown reference — with a working example — ready to copy or download.
### clamp(value, min, max)
Params: value · min · max
Returns: number
Example: clamp(15, 0, 10) → 10
Load a sample to see the output
Each example loads real code into the editor and regenerates the reference instantly. Try an annotated function to see DocForge read your existing JSDoc.
What makes a great reference
DocForge is built around the conventions used by well-documented open-source projects — Express, Lodash, Axios, and the MDN Web Docs.
Lead with what it does
Every function gets a clear, present-tense description. DocForge pulls it from your JSDoc comment if present, otherwise it infers a neutral one.
Document every parameter
Name, inferred type, default value, and a short purpose — in a scannable table. Optional parameters are flagged.
State the return value
The return type and what the value actually means, so callers know what to expect — including edge cases.
Always show an example
A minimal, runnable call with an expected output. If you write an @example tag, DocForge uses it verbatim.
Pro tips
- Annotate for richer docs. Add a
/** ... */block above a function — DocForge reads@param,@returns,@throws, and@example. - Document the why, not the what. Great comments explain intent, trade-offs, and non-obvious behavior rather than restating the code.
- Name things well. Self-documenting names plus a clear signature do most of the work; the reference is the safety net.
- Keep it current. Docs that drift from the code are worse than none — regenerate as your API changes.