0.1.20 ā€¢ Published 1 year ago

extra-jsdoc-text v0.1.20

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
1 year ago

Utilities for processing JSDoc text. šŸ“¦ Node.js, šŸŒ Web, šŸ“œ Files, šŸ“° Docs.

This package is available in Node.js and Web formats. To use it on the web, simply use the extra_jsdoc_text global variable after loading with a <script> tag from the jsDelivr CDN.

Stability: Experimental.

const xjsdoc = require('extra-jsdoc-text');

function main() {
  var txt = `
/**
 * Parse jsdoc from jsdoc text.
 * @param txt jsdoc text
 * @returns parsed jsdoc
 */
  `, parse = null;

  parse = xjsdoc.parse(txt);
  // {
  //   full: '\n' +
  //     '/**\n' +
  //     ' * Parse jsdoc from jsdoc text.\n' +
  //     ' * @param txt jsdoc text\n' +
  //     ' * @returns parsed jsdoc\n' +
  //     ' */\n' +
  //     '  ',
  //   description: 'Parse jsdoc from jsdoc text.\n',
  //   params: [
  //     {
  //       full: '@param txt jsdoc text',
  //       name: 'txt',
  //       type: '',
  //       description: 'jsdoc text'
  //     }
  //   ],
  //   returns: {
  //     full: '@returns parsed jsdoc',
  //     type: '',
  //     description: 'parsed jsdoc'
  //   },
  //   examples: []
  // }

  parse.description += ' (only if simple)';
  xjsdoc.stringify(parse);
  // '/**\n' +
  //   ' * Parse jsdoc from jsdoc text.\n' +
  //   ' * (only if simple)\n' +
  //   ' * @param txt jsdoc text\n' +
  //   ' * @returns parsed jsdoc\n' +
  //   ' *  */\n'
}
main();

Index

PropertyDescription
parseParse jsdoc from jsdoc text.
stringifyStringify jsdoc text from parsed jsdoc.

npm.io ORG DOI

0.1.20

1 year ago

0.1.19

1 year ago

0.1.17

1 year ago

0.1.18

1 year ago

0.1.13

1 year ago

0.1.14

1 year ago

0.1.15

1 year ago

0.1.16

1 year ago

0.1.12

2 years ago

0.1.10

2 years ago

0.1.11

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago