{"id":26191122,"url":"https://github.com/thespicymeatball/jsdoc-parse-plus","last_synced_at":"2025-06-19T01:42:42.337Z","repository":{"id":57284221,"uuid":"324205778","full_name":"TheSpicyMeatball/jsdoc-parse-plus","owner":"TheSpicyMeatball","description":"Parse, add, remove, or modify standard jsdoc tags or custom tags from comments; Generate jsdoc comments from JavaScript data.","archived":false,"fork":false,"pushed_at":"2021-01-04T03:22:06.000Z","size":338,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T03:16:30.322Z","etag":null,"topics":["documentation","jsdoc","jsdoc-comments","parse"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheSpicyMeatball.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-24T17:28:15.000Z","updated_at":"2022-12-08T09:40:53.000Z","dependencies_parsed_at":"2022-09-07T20:12:07.657Z","dependency_job_id":null,"html_url":"https://github.com/TheSpicyMeatball/jsdoc-parse-plus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheSpicyMeatball%2Fjsdoc-parse-plus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheSpicyMeatball%2Fjsdoc-parse-plus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheSpicyMeatball%2Fjsdoc-parse-plus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheSpicyMeatball%2Fjsdoc-parse-plus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheSpicyMeatball","download_url":"https://codeload.github.com/TheSpicyMeatball/jsdoc-parse-plus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248991557,"owners_count":21194894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["documentation","jsdoc","jsdoc-comments","parse"],"created_at":"2025-03-12T00:59:54.357Z","updated_at":"2025-04-15T02:11:00.585Z","avatar_url":"https://github.com/TheSpicyMeatball.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.com/TheSpicyMeatball/jsdoc-parse-plus.svg?branch=main)](https://travis-ci.com/TheSpicyMeatball/jsdoc-parse-plus)\n[![Coverage Status](https://coveralls.io/repos/github/TheSpicyMeatball/jsdoc-parse-plus/badge.svg?branch=main)](https://coveralls.io/github/TheSpicyMeatball/jsdoc-parse-plus?branch=main)\n[![dependencies Status](https://status.david-dm.org/gh/TheSpicyMeatball/jsdoc-parse-plus.svg)](https://david-dm.org/TheSpicyMeatball/jsdoc-parse-plus)\n[![npm version](https://badge.fury.io/js/jsdoc-parse-plus.svg)](https://badge.fury.io/js/jsdoc-parse-plus)\n\n# jsdoc-parse-plus\n\n\u003e Parse, add, remove, or modify standard jsdoc tags or custom tags from comments; Generate jsdoc comments from JavaScript data.\n\n\u003cp\u003eHello friend. Have you ever had the need to:\u003c/p\u003e\n\n\u003cul\u003e\n  \u003cli\u003e...parse standard and/or custom jsdoc tags into usable JavaScript objects?\u003c/li\u003e\n  \u003cli\u003e...programmatically add, modify, or remove jsdoc tags?\u003c/li\u003e\n  \u003cli\u003e...programmatically generate jsdoc comments from JavaScript data?\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003cp\u003eIf you answered yes to any of those questions, then jsdoc-parse-plus is for you!\u003c/p\u003e\n\n\u003cp\u003e\u003cb\u003eVersion:\u003c/b\u003e 1.3.0\u003c/p\u003e\n\n\n\n\u003ch2\u003eSummary of Utils\u003c/h2\u003e\n\u003cp\u003eFor detailed information on each util, see below this table.\u003c/p\u003e\n\u003ctable\u003e\n    \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003efunction\u003c/th\u003e\n      \u003cth\u003eDescription\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003c/thead\u003e\n    \u003ctbody\u003e\u003ctr\u003e\u003ctd\u003egetCommentsFromFile\u003c/td\u003e\u003ctd\u003eExtract all jsdoc comment strings from a file\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003egetTag\u003c/td\u003e\u003ctd\u003eGets a jsdoc tag's data; if the tag type supports multiple entries, an array of the tags will be returned\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eparse\u003c/td\u003e\u003ctd\u003eParse a jsdoc comment string against all potential jsdoc tags and optional custom tags\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eparseTags\u003c/td\u003e\u003ctd\u003eParse a jsdoc comment string against specified tags only; custom tags may be included\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eremoveTags\u003c/td\u003e\u003ctd\u003eRemoves a set of tags from jsdoc\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003etoCommentString\u003c/td\u003e\u003ctd\u003eConvert an object to a jsdoc comment string\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\n  \u003c/table\u003e\u003chr /\u003e\n\n\u003ch2\u003eInterfaces \u0026amp; Types\u003c/h2\u003e\n\n```\n// base tag type\nexport interface ITag {\n  tag: string;\n  value?: string;\n  raw: string;\n}\n\n// for tags that can contain a description as part of their value (i.e. @param, @returns, etc)\nexport interface IDescriptive extends ITag {\n  description?: string;\n}\n\n// additional keys for the @param tag type\nexport interface IParam extends IDescriptive {\n  name: string;\n  optional?: boolean;\n  defaultValue?: string;\n}\n\n// for tags that contain a type (i.e. @param, @returns, etc)\nexport interface IType extends IDescriptive {\n  type?: string;\n}\n\n// for inline link tags like {@link} and {@tutorial}\nexport type InlineLink = {\n  tag: string,\n  url: string,\n  text: string,\n  raw: string,\n};\n\n// util configuration types\nexport type GetCommentsFromFileConfig = { keepIndent?: boolean };\nexport type ToCommentStringConfig = { indentChars?: number };\n```\n\n\u003ca id=\"using-linkRenderer\"\u003e\u003c/a\u003e\n\u003ch2\u003eUsing a custom linkRenderer\u003c/h2\u003e\n\u003cp\u003e\n  Some functions have an optional \u003ccode\u003elinkRenderer\u003c/code\u003e which is used to convert inline \n  \u003ccode\u003e{@link}\u003c/code\u003e and \u003ccode\u003e{@tutorial}\u003c/code\u003e tags to clickable links.\n\u003c/p\u003e\n\u003cp\u003e\n  If you do not specify \u003ccode\u003elinkRenderer\u003c/code\u003e, the internal \u003ccode\u003elinkRenderer\u003c/code\u003e will output a basic link:\n\u003c/p\u003e\n\n```\nconst internalLinkRenderer = (link: InlineLink) =\u003e `\u003ca href=\"${link.url}\"\u003e${link.text}\u003c/a\u003e\n\n// outputs =\u003e\n\u003ca href=\"url\"\u003etext\u003c/a\u003e\n```\n\n\u003cp\u003e\n  However, you can override that by providing your own \u003ccode\u003elinkRenderer\u003c/code\u003e. For example, if you wanted to add a css class to your links, you would create a function like the following and pass that in as your \u003ccode\u003elinkRenderer\u003c/code\u003e:\n\u003c/p\u003e\n\n```\nconst myLinkRenderer = (link: InlineLink) =\u003e `\u003ca class=\"css-class\" href=\"${link.url}\"\u003e${link.text}\u003c/a\u003e\n\n// outputs =\u003e\n\u003ca class=\"css-class\" href=\"url\"\u003etext\u003c/a\u003e\n```\n\n\u003cp\u003eIt doesn't even have to be an anchor tag. Your custom function can return any string so you have the flexibility to do anything special that you might need.\u003c/p\u003e\n\n\u003cp\u003e\u003cem\u003eWithout further ado, the utils...\u003c/em\u003e\u003c/p\u003e\n\u003chr /\u003e\n\n\n  \n\n\u003ch2\u003egetCommentsFromFile\u003c/h2\u003e\n\u003cp\u003eExtract all jsdoc comment strings from a file\u003c/p\u003e\n\u003cp\u003eSince v1.0.0\u003c/p\u003e\n\u003ctable\u003e\n      \u003cthead\u003e\n      \u003ctr\u003e\n        \u003cth\u003eParam\u003c/th\u003e\n        \u003cth\u003eType\u003c/th\u003e\u003cth\u003eDefault\u003c/th\u003e\u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\u003ctr\u003e\u003ctd\u003e\u003cp\u003e\u003cb\u003efile\u003c/b\u003e\u003c/p\u003eString contents of a file\u003c/td\u003e\u003ctd\u003estring\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003cp\u003e\u003cb\u003econfig \u003cspan\u003e(optional)\u003c/span\u003e\u003c/b\u003e\u003c/p\u003eThe configuration for output formatting\u003c/td\u003e\u003ctd\u003eGetCommentsFromFileConfig\u003c/td\u003e\u003ctd\u003e{ keepIndent = false }\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\n    \u003c/table\u003e\u003cp\u003e\u003cb\u003eReturns:\u003c/b\u003e {string[]} Array of jsdoc strings\u003c/p\u003e\u003ch4\u003eSupporting Types\u003c/h4\u003e\n\n```\n// The configuration type for the util:\n//   keepIndent?: boolean = false - Whether or not to keep the indentation of the entire jsdoc comment block\n\nexport type GetCommentsFromFileConfig = { keepIndent?: boolean };\n```\n  \u003ch4\u003eImport\u003c/h4\u003e\n\n```\nimport { getCommentsFromFile, GetCommentsFromFileConfig } from 'jsdoc-parse-plus';\n```\n\n  \u003ch4\u003eExamples\u003c/h4\u003e\n\n\n\n```\nconst file = `\n/**\n * The first group\n * \n * @since v1.0.0\n */asdf\nasdf\n/**\n * The second group\n * \n * @since v1.0.0\n */\nasdf\n/** The third group */`;\n\ngetCommentsFromFile(file);\n\n// outputs =\u003e\n[\n  `/**\n * The first group\n * \n * @since v1.0.0\n */`,\n  `/**\n * The second group\n * \n * @since v1.0.0\n */`,\n  '/** The third group */',\n]\n```\n\n\n\n\u003chr /\u003e\n\n  \n\n\u003ch2\u003egetTag\u003c/h2\u003e\n\u003cp\u003eGets a jsdoc tag's data; if the tag type supports multiple entries, an array of the tags will be returned\u003c/p\u003e\n\u003ctable\u003e\n      \u003cthead\u003e\n      \u003ctr\u003e\n        \u003cth\u003eParam\u003c/th\u003e\n        \u003cth\u003eType\u003c/th\u003e\u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\u003ctr\u003e\u003ctd\u003e\u003cp\u003e\u003cb\u003ejsdoc\u003c/b\u003e\u003c/p\u003eThe entire jsdoc string\u003c/td\u003e\u003ctd\u003estring\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003cp\u003e\u003cb\u003elinkRenderer \u003cspan\u003e(optional)\u003c/span\u003e\u003c/b\u003e\u003c/p\u003eOptional function to override default rendering of inline link and tutorial tags\u003c/td\u003e\u003ctd\u003e(link: InlineLink) =\u0026gt; string\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\n    \u003c/table\u003e\u003cp\u003e\u003cb\u003eReturns:\u003c/b\u003e {(tag: string) =\u0026gt; ITag | Array\u0026lt;ITag | ITag[]\u0026gt;} Function to get the tag or array of all tags that go by that name\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003eFor more information on \u003ccode\u003elinkRenderer\u003c/code\u003e, please see \u003ca href=\"#using-linkRenderer\"\u003eUsing a custom linkRenderer\u003c/a\u003e.\u003c/p\u003e\u003c/blockquote\u003e\n  \u003ch4\u003eImport\u003c/h4\u003e\n\n```\nimport { getTag } from 'jsdoc-parse-plus';\n```\n\n  \u003ch4\u003eExamples\u003c/h4\u003e\n\n\n\n```\nconst jsdoc = `\n/**\n * The description goes here\n * \n * @since v1.0.0 (modified v2.0.0)\n * @template T\n * @param {T} children - JSX children\n * @param {any[]} types - Types of children to match\n * @param {GetChildByTypeConfig} [{ customTypeKey: '__TYPE', prioritized: false }] - The configuration params\n * @param {string} [optionalParam='default text'] An optional param with a description without a dash\n * @returns {T} - The first matching child\n * @docgen_types\n * // Custom docgen tag\n * @example\n * // Examples...\n * getTag('@description')(jsdoc);\n * @customTag customTag value 1\n * @customTag customTag value 2\n */`;\n\nconst tag = getTag(jsdoc);\n\ntag('@description');\n// outputs =\u003e\n{ \n  tag: '@description', \n  value: 'The description goes here',\n  raw: 'The description goes here',\n}\n\ntag('@param');\n// outputs =\u003e\n[\n  { \n    tag: '@param', \n    type: 'T',\n    name: 'children',\n    description: 'JSX children',\n    optional: false,\n    defaultValue: undefined,\n    raw: '@param {T} children - JSX children',\n  },\n  { \n    tag: '@param', \n    type: 'any[]',\n    name: 'types',\n    description: 'Types of children to match',\n    optional: false,\n    defaultValue: undefined,\n    raw: '@param {any[]} types - Types of children to match',\n  },\n  { \n    tag: '@param', \n    type: 'GetChildByTypeConfig',\n    name: '{ customTypeKey: \\'__TYPE\\', prioritized: false }',\n    description: 'The configuration params',\n    optional: true,\n    defaultValue: undefined,\n    raw: '@param {GetChildByTypeConfig} [{ customTypeKey: \\'__TYPE\\', prioritized: false }] - The configuration params',\n  },\n  { \n    tag: '@param', \n    type: 'string',\n    name: 'optionalParam',\n    description: 'An optional param with a description without a dash',\n    optional: true,\n    defaultValue: '\\'default text\\'',\n    raw: '@param {string} [optionalParam=\\'default text\\'] An optional param with a description without a dash',\n  },\n]\n\ntag('@docgen_types');\n// custom tag used once outputs =\u003e\n{ \n  tag: '@docgen_types', \n  value: '// Custom docgen tag',\n  raw: '@docgen_types\\n// Custom docgen tag',\n}\n\ntag('@customTag');\n// custom tag used multiple times outputs =\u003e\n[\n  { \n    tag: '@customTag', \n    value: 'customTag value 1',\n    raw: '@customTag customTag value 1',\n  },\n  { \n    tag: '@customTag', \n    value: 'customTag value 2',\n    raw: '@customTag customTag value 2',\n  },\n]\n```\n\n\n\n\u003chr /\u003e\n\n  \n\n\u003ch2\u003eparse\u003c/h2\u003e\n\u003cp\u003eParse a jsdoc comment string against all potential jsdoc tags and optional custom tags\u003c/p\u003e\n\u003cp\u003eSince v1.0.0\u003c/p\u003e\n\u003ctable\u003e\n      \u003cthead\u003e\n      \u003ctr\u003e\n        \u003cth\u003eParam\u003c/th\u003e\n        \u003cth\u003eType\u003c/th\u003e\u003cth\u003eDefault\u003c/th\u003e\u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\u003ctr\u003e\u003ctd\u003e\u003cp\u003e\u003cb\u003ejsdoc\u003c/b\u003e\u003c/p\u003eThe entire jsdoc comment string\u003c/td\u003e\u003ctd\u003estring\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003cp\u003e\u003cb\u003ecustomTags \u003cspan\u003e(optional)\u003c/span\u003e\u003c/b\u003e\u003c/p\u003eOptional array of custom tags parse\u003c/td\u003e\u003ctd\u003estring[]\u003c/td\u003e\u003ctd\u003e[]\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003cp\u003e\u003cb\u003elinkRenderer \u003cspan\u003e(optional)\u003c/span\u003e\u003c/b\u003e\u003c/p\u003eOptional function to override default rendering of inline link and tutorial tags\u003c/td\u003e\u003ctd\u003e(link: InlineLink) =\u0026gt; string\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\n    \u003c/table\u003e\u003cp\u003e\u003cb\u003eReturns:\u003c/b\u003e {object} Object with keys of each parsed tag\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003eFor more information on \u003ccode\u003elinkRenderer\u003c/code\u003e, please see \u003ca href=\"#using-linkRenderer\"\u003eUsing a custom linkRenderer\u003c/a\u003e.\u003c/p\u003e\u003c/blockquote\u003e\n  \u003ch4\u003eImport\u003c/h4\u003e\n\n```\nimport { parse } from 'jsdoc-parse-plus';\n```\n\n  \u003ch4\u003eExamples\u003c/h4\u003e\n\n\n\n```\nconst jsdoc = `\n/**\n * The description goes here\n * \n * @since v1.0.0 (modified v2.0.0)\n * @template T\n * @param {T} children - JSX children\n * @param {any[]} types - Types of children to match\n * @param {GetChildByTypeConfig} [{ customTypeKey: '__TYPE', prioritized: false }] - The configuration params\n * @param {string} [optionalParam='default text'] An optional param with a description without a dash\n * @returns {T} - The first matching child\n * @docgen_types\n * // Custom docgen tag\n * @example\n * // Examples...\n * getTag('@description')(jsdoc);\n * @customTag customTag value 1\n * @customTag customTag value 2\n * @see {@link MyClass} and [MyClass's foo property]{@link MyClass#foo}.\n * Also, check out {@link http://www.google.com|Google} and\n * {@link https://github.com GitHub}.\n */`;\n\nparse(jsdoc, ['customTag', 'docgen_types']);\n// outputs =\u003e\n{ \n  description: {\n    tag: '@description', \n    value: 'The description goes here',\n    raw: 'The description goes here',\n  },\n  since: { \n    tag: '@since', \n    value: 'v1.0.0 (modified v2.0.0)',\n    raw: '@since v1.0.0 (modified v2.0.0)',\n  },\n  template: [{ \n    tag: '@template',\n    value: 'T',\n    description: undefined,\n    raw: '@template T',\n  }],\n  param: [\n    { \n      tag: '@param', \n      type: 'T',\n      name: 'children',\n      description: 'JSX children',\n      optional: false,\n      defaultValue: undefined,\n      raw: '@param {T} children - JSX children',\n    },\n    { \n      tag: '@param', \n      type: 'any[]',\n      name: 'types',\n      description: 'Types of children to match',\n      optional: false,\n      defaultValue: undefined,\n      raw: '@param {any[]} types - Types of children to match',\n    },\n    { \n      tag: '@param', \n      type: 'GetChildByTypeConfig',\n      name: '{ customTypeKey: \\'__TYPE\\', prioritized: false }',\n      description: 'The configuration params',\n      optional: true,\n      defaultValue: undefined,\n      raw: '@param {GetChildByTypeConfig} [{ customTypeKey: \\'__TYPE\\', prioritized: false }] - The configuration params',\n    },\n    { \n      tag: '@param', \n      type: 'string',\n      name: 'optionalParam',\n      description: 'An optional param with a description without a dash',\n      optional: true,\n      defaultValue: '\\'default text\\'',\n      raw: '@param {string} [optionalParam=\\'default text\\'] An optional param with a description without a dash',\n    },\n  ],\n  example: [{ \n    tag: '@example', \n    value: '// Examples...\\ngetTag(\\'@description\\')(jsdoc);',\n    raw: '@example\\n// Examples...\\ngetTag(\\'@description\\')(jsdoc);',\n  }],\n  returns: { \n    tag: '@returns', \n    type: 'T',\n    description: 'The first matching child',\n    raw: '@returns {T} - The first matching child',\n  },\n  see: [{ \n    tag: '@see', \n    value: '\u003ca href=\"MyClass\"\u003eMyClass\u003c/a\u003e and \u003ca href=\"MyClass#foo\"\u003eMyClass\\'s foo property\u003c/a\u003e.\\nAlso, check out \u003ca href=\"http://www.google.com\"\u003eGoogle\u003c/a\u003e and\\n\u003ca href=\"https://github.com\"\u003eGitHub\u003c/a\u003e.',\n    raw: '@see {@link MyClass} and [MyClass\\'s foo property]{@link MyClass#foo}.\\nAlso, check out {@link http://www.google.com|Google} and\\n{@link https://github.com GitHub}.',\n  }],\n  docgen_types: { \n    tag: '@docgen_types', \n    value: '// Custom docgen tag',\n    raw: '@docgen_types\\n// Custom docgen tag',\n  },\n  customTag: [\n    { \n      tag: '@customTag', \n      value: 'customTag value 1',\n      raw: '@customTag customTag value 1',\n    },\n    { \n      tag: '@customTag', \n      value: 'customTag value 2',\n      raw: '@customTag customTag value 2',\n    },\n  ],\n}\n```\n\n\n\n\u003chr /\u003e\n\n  \n\n\u003ch2\u003eparseTags\u003c/h2\u003e\n\u003cp\u003eParse a jsdoc comment string against specified tags only; custom tags may be included\u003c/p\u003e\n\u003cp\u003eSince v1.0.0\u003c/p\u003e\n\u003ctable\u003e\n      \u003cthead\u003e\n      \u003ctr\u003e\n        \u003cth\u003eParam\u003c/th\u003e\n        \u003cth\u003eType\u003c/th\u003e\u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\u003ctr\u003e\u003ctd\u003e\u003cp\u003e\u003cb\u003ejsdoc\u003c/b\u003e\u003c/p\u003eThe entire jsdoc comment string\u003c/td\u003e\u003ctd\u003estring\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003cp\u003e\u003cb\u003etags\u003c/b\u003e\u003c/p\u003eThe tags to parse\u003c/td\u003e\u003ctd\u003estring[]\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003cp\u003e\u003cb\u003elinkRenderer \u003cspan\u003e(optional)\u003c/span\u003e\u003c/b\u003e\u003c/p\u003eOptional function to override default rendering of inline link and tutorial tags\u003c/td\u003e\u003ctd\u003e(link: InlineLink) =\u0026gt; string\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\n    \u003c/table\u003e\u003cp\u003e\u003cb\u003eReturns:\u003c/b\u003e {object} Object with keys of each parsed tag\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003eFor more information on \u003ccode\u003elinkRenderer\u003c/code\u003e, please see \u003ca href=\"#using-linkRenderer\"\u003eUsing a custom linkRenderer\u003c/a\u003e.\u003c/p\u003e\u003c/blockquote\u003e\n  \u003ch4\u003eImport\u003c/h4\u003e\n\n```\nimport { parseTags } from 'jsdoc-parse-plus';\n```\n\n  \u003ch4\u003eExamples\u003c/h4\u003e\n\n\n\n```\nconst jsdoc = `\n/**\n * The description goes here\n * \n * @since v1.0.0 (modified v2.0.0)\n * @template T\n * @param {T} children - JSX children\n * @param {any[]} types - Types of children to match\n * @param {GetChildByTypeConfig} [{ customTypeKey: '__TYPE', prioritized: false }] - The configuration params\n * @param {string} [optionalParam='default text'] An optional param with a description without a dash\n * @returns {T} - The first matching child\n * @docgen_types\n * // Custom docgen tag\n * @example\n * // Examples...\n * getTag('@description')(jsdoc);\n * @customTag customTag value 1\n * @customTag customTag value 2\n * @see {@link MyClass} and [MyClass's foo property]{@link MyClass#foo}.\n * Also, check out {@link http://www.google.com|Google} and\n * {@link https://github.com GitHub}.\n */`;\n\nparseTags(jsdoc, ['@description', '@since', '@docgen_types', 'customTag', '@thisTagDoesntExist']);\n// outputs =\u003e\n{ \n  description: {\n    tag: '@description', \n    value: 'The description goes here',\n    raw: 'The description goes here',\n  },\n  since: { \n    tag: '@since', \n    value: 'v1.0.0 (modified v2.0.0)',\n    raw: '@since v1.0.0 (modified v2.0.0)',\n  },\n  docgen_types: { \n    tag: '@docgen_types', \n    value: '// Custom docgen tag',\n    raw: '@docgen_types\\n// Custom docgen tag',\n  },\n  customTag: [\n    { \n      tag: '@customTag', \n      value: 'customTag value 1',\n      raw: '@customTag customTag value 1',\n    },\n    { \n      tag: '@customTag', \n      value: 'customTag value 2',\n      raw: '@customTag customTag value 2',\n    },\n  ],\n}\n```\n\n\n\n\u003chr /\u003e\n\n  \n\n\u003ch2\u003eremoveTags\u003c/h2\u003e\n\u003cp\u003eRemoves a set of tags from jsdoc\u003c/p\u003e\n\u003ctable\u003e\n      \u003cthead\u003e\n      \u003ctr\u003e\n        \u003cth\u003eParam\u003c/th\u003e\n        \u003cth\u003eType\u003c/th\u003e\u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\u003ctr\u003e\u003ctd\u003e\u003cp\u003e\u003cb\u003ejsdoc\u003c/b\u003e\u003c/p\u003eThe entire jsdoc string\u003c/td\u003e\u003ctd\u003estring\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003cp\u003e\u003cb\u003etags\u003c/b\u003e\u003c/p\u003eArray of string tags to remove\u003c/td\u003e\u003ctd\u003estring[]\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\n    \u003c/table\u003e\u003cp\u003e\u003cb\u003eReturns:\u003c/b\u003e {string} The jsdoc string the specified tags removed\u003c/p\u003e\n  \u003ch4\u003eImport\u003c/h4\u003e\n\n```\nimport { removeTags } from 'jsdoc-parse-plus';\n```\n\n  \u003ch4\u003eExamples\u003c/h4\u003e\n\n\n\n```\nconst jsdoc = `\n/**\n * The description goes here\n * \n * @since v1.0.0 (modified v2.0.0)\n * @template T\n * @param {T} children - JSX children\n * @param {any[]} types - Types of children to match\n * @param {GetChildByTypeConfig} [{ customTypeKey: '__TYPE', prioritized: false }] - The configuration params\n * @param {string} [optionalParam='default text'] An optional param with a description without a dash\n * @returns {T} - The first matching child\n */`;\n\nremoveTags(jsdoc, ['@description', '@template', '@param']);\n// outputs =\u003e\n/**\n * @since v1.0.0 (modified v2.0.0)\n * @returns {T} - The first matching child\n */\n```\n\n\n\n\u003chr /\u003e\n\n  \n\n\u003ch2\u003etoCommentString\u003c/h2\u003e\n\u003cp\u003eConvert an object to a jsdoc comment string\u003c/p\u003e\n\u003cp\u003eSince v1.0.0\u003c/p\u003e\n\u003ctable\u003e\n      \u003cthead\u003e\n      \u003ctr\u003e\n        \u003cth\u003eParam\u003c/th\u003e\n        \u003cth\u003eType\u003c/th\u003e\u003cth\u003eDefault\u003c/th\u003e\u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\u003ctr\u003e\u003ctd\u003e\u003cp\u003e\u003cb\u003etags\u003c/b\u003e\u003c/p\u003eObject containing keys of tags\u003c/td\u003e\u003ctd\u003e{[tag: string]: ITag | Array\u0026lt;ITag | ITag[]\u0026gt;}\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003cp\u003e\u003cb\u003econfig \u003cspan\u003e(optional)\u003c/span\u003e\u003c/b\u003e\u003c/p\u003eThe configuration for output formatting\u003c/td\u003e\u003ctd\u003eToCommentStringConfig\u003c/td\u003e\u003ctd\u003e{ indentChars = 0 }\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\n    \u003c/table\u003e\u003cp\u003e\u003cb\u003eReturns:\u003c/b\u003e {string} The jsdoc string\u003c/p\u003e\u003ch4\u003eSupporting Types\u003c/h4\u003e\n\n```\n// The configuration type for the util:\n//   indentChars?: number = 0 - The number of characters that the output string should be indented\n\nexport type ToCommentStringConfig = { indentChars?: number };\n```\n  \u003ch4\u003eImport\u003c/h4\u003e\n\n```\nimport { toCommentString, ToCommentStringConfig } from 'jsdoc-parse-plus';\n```\n\n  \u003ch4\u003eExamples\u003c/h4\u003e\n\n\n\n```\nconst tags = {\n  description: { \n    tag: '@description', \n    value: 'The description goes here',\n    raw: 'The description goes here',\n  },\n  since: { \n    tag: '@since', \n    value: 'v1.0.0',\n    raw: '@since v1.0.0',\n  },\n};\n\ntoCommentString(tags);\n// outputs =\u003e\n/**\n * The description goes here\n * @since v1.0.0\n */\n```\n\n\n\n\u003chr /\u003e\n\n\n\u003ca href=\"#package-contents\"\u003e\u003c/a\u003e\n\u003ch2\u003ePackage Contents\u003c/h2\u003e\n\nWithin the module you'll find the following directories and files:\n\n```html\npackage.json\nCHANGELOG.md -- history of changes to the module\nREADME.md -- this file\n/lib\n  └───/es5\n    └───/getCommentsFromFile\n      └───index.d.ts - 784 Bytes\n      └───index.js - 2.29 KB\n    └───/getTag\n      └───index.d.ts - 768 Bytes\n      └───index.js - 1.24 KB\n      └───index.d.ts - 388 Bytes\n      └───index.js - 1.22 KB\n    └───/parse\n      └───index.d.ts - 778 Bytes\n      └───index.js - 1.74 KB\n    └───/parseTags\n      └───index.d.ts - 745 Bytes\n      └───index.js - 1.03 KB\n    └───/removeTags\n      └───index.d.ts - 306 Bytes\n      └───index.js - 1.58 KB\n    └───/toCommentString\n      └───index.d.ts - 825 Bytes\n      └───index.js - 1.54 KB\n    └───/types\n      └───index.d.ts - 627 Bytes\n      └───index.js - 79 Bytes\n    └───/_private\n      └───types.d.ts - 177 Bytes\n      └───types.js - 79 Bytes\n      └───utils.d.ts - 2.12 KB\n      └───utils.js - 13.5 KB\n  └───/es6\n    └───/getCommentsFromFile\n      └───index.d.ts - 784 Bytes\n      └───index.js - 2.13 KB\n    └───/getTag\n      └───index.d.ts - 768 Bytes\n      └───index.js - 1.12 KB\n      └───index.d.ts - 388 Bytes\n      └───index.js - 272 Bytes\n    └───/parse\n      └───index.d.ts - 778 Bytes\n      └───index.js - 1.61 KB\n    └───/parseTags\n      └───index.d.ts - 745 Bytes\n      └───index.js - 915 Bytes\n    └───/removeTags\n      └───index.d.ts - 306 Bytes\n      └───index.js - 1.45 KB\n    └───/toCommentString\n      └───index.d.ts - 825 Bytes\n      └───index.js - 1.39 KB\n    └───/types\n      └───index.d.ts - 627 Bytes\n      └───index.js - 12 Bytes\n    └───/_private\n      └───types.d.ts - 177 Bytes\n      └───types.js - 12 Bytes\n      └───utils.d.ts - 2.12 KB\n      └───utils.js - 11.97 KB\n```\n\n\u003ca href=\"#license\"\u003e\u003c/a\u003e\n\u003ch2\u003eLicense\u003c/h2\u003e\n\nMIT\n\n\n\u003ca href=\"#author\"\u003e\u003c/a\u003e\n\u003ch2\u003eAuthor\u003c/h2\u003e\nMichael Paravano\n\n\n\n\n\u003ca href=\"#dependencies\"\u003e\u003c/a\u003e\n\u003ch2\u003eDependencies\u003c/h2\u003e\n\n\n\nNone\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthespicymeatball%2Fjsdoc-parse-plus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthespicymeatball%2Fjsdoc-parse-plus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthespicymeatball%2Fjsdoc-parse-plus/lists"}