diff2html

  • Version 3.4.48
  • Published
  • 1.97 MB
  • 2 dependencies
  • MIT license

Install

npm i diff2html
yarn add diff2html
pnpm add diff2html

Overview

Fast Diff to colorized HTML

Index

Variables

variable defaultDiff2HtmlConfig

const defaultDiff2HtmlConfig: {
outputFormat: OutputFormatType;
drawFileList: boolean;
renderNothingWhenEmpty: boolean;
matchingMaxComparisons: number;
maxLineSizeInBlockForComparison: number;
matching: import('./types').LineMatchingType;
matchWordsThreshold: number;
maxLineLengthHighlight: number;
diffStyle: import('./types').DiffStyleType;
colorScheme: import('./types').ColorSchemeType;
};

    Functions

    function html

    html: (
    diffInput: string | DiffFile[],
    configuration?: Diff2HtmlConfig
    ) => string;

      function parse

      parse: (diffInput: string, configuration?: Diff2HtmlConfig) => DiffFile[];

        Interfaces

        interface Diff2HtmlConfig

        interface Diff2HtmlConfig
        extends DiffParser.DiffParserConfig,
        LineByLineRendererConfig,
        SideBySideRendererConfig,
        HoganJsUtilsConfig {}

          property drawFileList

          drawFileList?: boolean;

            property outputFormat

            outputFormat?: OutputFormatType;

              Package Files (1)

              Dependencies (2)

              Dev Dependencies (51)

              Peer Dependencies (0)

              No peer dependencies.

              Badge

              To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

              You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/diff2html.

              • Markdown
                [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/diff2html)
              • HTML
                <a href="https://www.jsdocs.io/package/diff2html"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>