New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

complexity-report

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

complexity-report - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

2

package.json
{
"name": "complexity-report",
"version": "0.2.3",
"version": "0.2.4",
"author": "Phil Booth <pmbooth@gmail.com>",

@@ -5,0 +5,0 @@ "description": "A tool for reporting code complexity metrics in JavaScript projects.",

@@ -14,3 +14,3 @@ # complexityReport.js

```
npm install complexity-report
sudo npm install -g complexity-report
```

@@ -30,3 +30,4 @@

* `-f <format`: Specify an output format for the report.
* `-t <threshold>`: Specify the per-function complexity threshold.
* `-t <threshold>`: Specify the per-function complexity threshold
(beyond which, will cause the process to fail when exiting).
* `-l`: Disregads operator `||` as a source of cyclomatic complexity.

@@ -63,10 +64,18 @@ * `-s`: Disegards `switch` statements as a source of cyclomatic complexity.

The argument `options` is an optional object
that can be used to modify the default settings for
which may contain properties that modify
cyclomatic complexity calculation.
The following options are available:
* `logicalor`: Disregads operator `||` as a source of cyclomatic complexity.
* `switchcase`: Disegards `switch` statements as a source of cyclomatic complexity.
* `forin`: Treats `for`...`in` loops as a source of cyclomatic complexity.
* `trycatch`: Treats `catch` clauses as a source of cyclomatic complexity.
* `logicalor`: Boolean indicating whether operator `||`
should be considered a source of cyclomatic complexity,
defaults to `true`.
* `switchcase`: Boolean indicating whether `switch` statements
should be considered a source of cyclomatic complexity,
defaults to `true`.
* `forin`: Boolean indicating whether `for`...`in` loops
should be considered a source of cyclomatic complexity,
defaults to `false`.
* `trycatch`: Boolean indicating whether `catch` clauses
should be considered a source of cyclomatic complexity,
defaults to `false`.

@@ -88,3 +97,3 @@ The returned report is an object

If you think there's anything else I should look at,
raise an issue or,
please raise an issue or,
even better, implement it and submit a pull request! :)

@@ -91,0 +100,0 @@

@@ -0,1 +1,3 @@

#!/usr/bin/env node
/*globals require, process */

@@ -2,0 +4,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc