Skip to main content

ESComplexModule

Provides a runtime to invoke ESComplexModule plugins for processing / metrics calculations of independent modules.

Index

Constructors

constructor

  • new ESComplexModule(options?: { loadDefaultPlugins: boolean; plugins: default[] }): default
  • Initializes ESComplexModule.


    Parameters

    • options: { loadDefaultPlugins: boolean; plugins: default[] } = ...

      module options including user plugins to load including:

    Returns default

Methods

analyze

  • analyze(ast: File, options?: ComplexityReporterOptions): default
  • Processes the given ast and calculates metrics via plugins.


    Parameters

    • ast: File

      Javascript AST.

    • options: ComplexityReporterOptions = DefaultComplexityReporterOptions

      (Optional) module analyze options.

    Returns default

    A single module report.

analyzeAsync

  • analyzeAsync(ast: File, options: any): Promise<default>
  • Wraps in a Promise processing the given ast and calculates metrics via plugins.


    Parameters

    • ast: File

      Javascript AST.

    • options: any

      (Optional) module analyze options.

    Returns Promise<default>

    A single module report.