#JScomplexity
JS cyclomatic complexity report generator.
Command-line tool and module to generate a complexity report on file tree Javascript files. It is based on escomplex module results. Report stands in a .html file containing graphical representation of file tree when used from command-line.
###Installation
npm install -g jscomplexity
###Module usage
var jscr = require('jscomplexity');
// jscr() returns a promise (using bluebird)
jscr('/path/to/js/dir').then(console.log);
// you can also use CPS style
jscr('/path/to/js/dir', function(err, result){
if(err) {
return console.log(err);
}
console.log(result);
});
###Command-line usage
Usage: jscr [options]
Options:
-h, --help output usage information
-V, --version output the version number
-t, --target <folder> change root folder to analyse - default is current directory
-s, --skip <pattern> skip path pattern during tree walk - matched items will be skipped from report
-o, --output <filename> customize html report filename - default is 'jscr-report.html'
-v, --verbose outputs analysisis logs