import HalsteadData from 'typhonjs-escomplex-commons/src/module/report/HalsteadData.js'HalsteadData
Provides all Halstead metric data / parameters.
Constructor Summary
| Public Constructor | ||
| public |
Initializes the default Halstead data. |
|
Member Summary
| Public Members | ||
| public |
Measures an estimate for the number of potential errors. |
|
| public |
Measures the difficulty of the program to write or understand. |
|
| public |
Measures the maintenance effort of the program. |
|
| public |
Defines the number of operands and operators. |
|
| public |
In general an operand participates in actions associated with operators. |
|
| public |
In general an operator carries out an action. |
|
| public |
Measures potential coding time. |
|
| public |
Defines the unique number of operands and operators. |
|
| public |
Measures how much information a reader of the code potential has to absorb to understand its meaning. |
|
Method Summary
| Public Methods | ||
| public |
reset(clearIdentifiers: boolean): HalsteadData Resets the state of all Halstead data metrics without removing any operand or operator data. |
|
Public Constructors
Public Members
public operands: {distinct: number, total: number, identifiers: Array<string>} source
In general an operand participates in actions associated with operators. A distinct and total count is provided with all identifiers.
Public Methods
public reset(clearIdentifiers: boolean): HalsteadData source
Resets the state of all Halstead data metrics without removing any operand or operator data.
Params:
| Name | Type | Attribute | Description |
| clearIdentifiers | boolean | Clears operands / operators; default: false. |