AnsiDiffFormatter
Implements
Index
Constructors
Methods
Constructors
constructor
Instantiates an
AnsiDiffFormatter
, configured with colour support options for Chalk. When nochalkOptions
object is provided, Chalk will auto-detect colour support automatically based on the execution environment.Available colour support levels:
0
- All colours disabled.1
- Basic 16 colours support.2
- ANSI 256 colours support.3
- Truecolor - 16 million colours support.
Parameters
optionalchalkOptions: Options
Returns AnsiDiffFormatter
Methods
expected
Parameters
line: string
Returns string
received
Parameters
line: string
Returns string
unchanged
Parameters
line: string
Returns string
A DiffFormatter that uses ANSI escape codes to format the output.