This module provides functionality to parse JSDoc comments from JavaScript code.
You can use the JSDelivr CDN to import this custom library into Appsmith.
https://cdn.jsdelivr.net/gh/appsmithorg/foundry@main/dist/jsDocLite.umd.jsAsynchronously fetches JavaScript content from a URL and parses the JSDoc comments.
-
parameters
url: The URL to fetch the JavaScript content from.
-
returns
Promise<object>: An object containing the parsed JSDoc comments.
-
async
Parses the provided JavaScript code to extract JSDoc comments.
-
parameters
code: The JavaScript code to parse.
-
returns
object: An object containing the parsed JSDoc comments.
Parses a single JSDoc comment block to extract information.
-
parameters
comment: The JSDoc comment block to parse.
-
returns
object|null: An object containing the parsed information from the JSDoc comment, or null if no recognized entry tag is found.
@function cleanCommentBlock Cleans a JSDoc comment block by removing the commenting marks from each line.
-
parameters
commentBlock: The JSDoc comment block to clean.
-
returns
string: The cleaned comment block.
Asynchronously fetches JavaScript content from a URL.
-
parameters
url: The URL to fetch the JavaScript content from.
-
returns
Promise<string>: A promise that resolves with the fetched JavaScript content as text.
-
async
An object of regex to help identify entries for documentation (functions, constants, and modules).
An object of regex to help identify tags for identified entries.
Regex to help identify JS Doc blocks in code.
Contributions are always welcome!
