evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Build a documentation generator that processes JavaScript source files once and produces multiple markdown documentation formats with different styling preferences.
Your solution should:
Accept one or more JavaScript source files as input (files will contain JSDoc annotations)
Parse the JSDoc annotations once to extract documentation data
Generate three different markdown documentation variants from the same parsed data:
Output all three documentation variants as separate strings
The solution must efficiently reuse the parsed documentation data rather than re-parsing the source files for each output format.
/**
* Generates three different markdown documentation formats from JavaScript source files.
*
* @param {string|string[]} files - Path(s) to JavaScript source file(s) to document
* @returns {Promise<{verbose: string, compact: string, table: string}>} Object containing three documentation formats
*/
async function generateMultiFormatDocs(files) {
// IMPLEMENTATION HERE
}
module.exports = { generateMultiFormatDocs };Given a JavaScript file with JSDoc annotations for a single function, generating multi-format docs returns an object with three distinct markdown outputs that all document the same function @test
Given a JavaScript file with a class containing multiple methods, the verbose format includes horizontal separators while the compact format does not @test
Given a JavaScript file with functions that have parameters, the table format renders parameters as tables while other formats use lists @test
The heading depth in the verbose format starts at level 2 (##), while the compact format starts at level 3 (###) @test
Provides markdown documentation generation from JSDoc annotations.