8

I am looking for a JSDoc parser that I can use in my project. I am looking for something where I can pass in a JSDoc comment and receive a structured description of what that comment means. Most of the tools I have seen seem to be able to transform JSDoc comments into HTML or some other format. I am looking for something that will provide the intermediate representation of a comment that can be used to feed into other tools.

Are there any tools or libraries out there that I can use?

Andrew Eisenberg
  • 28,387
  • 9
  • 92
  • 148

4 Answers4

11

The Doctrine project does exactly what I am looking for:

http://eslint.org/doctrine/demo/

Iter Ator
  • 8,226
  • 20
  • 73
  • 164
Andrew Eisenberg
  • 28,387
  • 9
  • 92
  • 148
1

If you need only parsing functionality and don't care about tags meaning then comment-parser may help

Sergii
  • 36
  • 2
1

There is also a dojo project: https://github.com/wkeese/js-doc-parse

see http://www.sitepen.com/blog/2013/01/18/generating-and-viewing-custom-api-docs/

it will look like the dojo documentation ( http://dojotoolkit.org/api/ )

sebilasse
  • 4,278
  • 2
  • 37
  • 36
0

what about jsdoc itself ? - with the command line jsdoc yourfile.js -X > parsed.json . With that you have the official thing.

cancerbero
  • 6,799
  • 1
  • 32
  • 24