Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateMarkdown ¶
func GenerateMarkdown(functions []FunctionWithDocs) string
GenerateMarkdown creates a Markdown document from the extracted function information
func GenerateMarkdownForMultipleFiles ¶
func GenerateMarkdownForMultipleFiles(fileResults map[string][]FunctionWithDocs) string
GenerateMarkdownForMultipleFiles creates a Markdown document for multiple JavaScript files
Types ¶
type CommentInfo ¶
type CommentInfo struct { Text string StartPos int // Line position EndPos int // Line position IsJSDoc bool // Indicates if this is a JSDoc comment (starts with /**) IsTopDoc bool // Indicates if this is a top-level docstring (first comment in file) }
CommentInfo stores information about a JavaScript comment
type FunctionInfo ¶
FunctionInfo stores information about a JavaScript function
type FunctionWithDocs ¶
type FunctionWithDocs struct { Name string Parameters []string DocString string IsTopLevel bool // Indicates if this is a top-level function Filename string }
FunctionWithDocs combines function information with its docstring
func ExtractDocstrings ¶
func ExtractDocstrings(data []byte, filename string, jsdocOnly bool) ([]FunctionWithDocs, error)
ExtractDocstrings extracts docstrings and function signatures from JavaScript code
Click to show internal directories.
Click to hide internal directories.