2.0.1 • Published 8 years ago

jsdoc-with-markdown v2.0.1

Weekly downloads
5
License
ISC
Repository
github
Last release
8 years ago

jsdoc-with-markdown

GratiPay Downloads Version

Parses JSDoc-like string into JSON assuming the formating is in Markdown. You can use babel-extract-comments to extract comments from JavaScript source.

Installation

npm instal --save-dev jsdoc-with-markdown

Usage

import parseJSDocComments from 'parse-jsdoc-comments';

parseJSDocComments(
 * This is a description.
 *
 * ## Example
 *
 * ```js
 * function hello() {
 *   console.log('Hi!');
 * }
 * ```
);

// [
//   {
//     "type": "paragraph",
//     "value": "<p>This is a description.</p>\n"
//   },
//   {
//     "type": "paragraph",
//     "value": "<h2>Example</h2>\n"
//   },
//   {
//     "type": "code",
//     "value": "<pre><code class=\"language-js\">function hello() {\n  console.log('Hi!');\n}\n</code></pre>\n"
//   }
// ]

License

ISC

2.0.1

8 years ago

2.0.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago