File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ This library provides any JS library the ability to analyze the Cyclomatic Compl
2020
2121# How to Use
2222
23- CyclomaticJS has one named export: ` calculateComplexity `
23+ CyclomaticJS has two export: ` calculateComplexity ` and ` generateComplexityReport `
2424
2525This function takes a ` filename ` and calculates the logical complexity of a file's contents.
2626
Original file line number Diff line number Diff line change @@ -41,5 +41,8 @@ export async function generateComplexityReport(directory) {
4141 report : await calculateComplexity ( file )
4242 } ) )
4343 )
44- console . log ( JSON . stringify ( analyzedFiles , undefined , 2 ) )
44+ await writeFile (
45+ 'complexity-report.json' ,
46+ JSON . stringify ( analyzedFiles , undefined , 2 )
47+ )
4548}
You can’t perform that action at this time.
0 commit comments