diff2html

  • Version 3.4.56
  • Published
  • 2.02 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;

              Namespaces

              namespace @profoundlogic/hogan

              module '@profoundlogic/hogan' {}

                function compile

                compile: {
                (text: string, options?: HoganOptions & { asString: false }): HoganTemplate;
                (text: string, options?: HoganOptions & { asString: true }): string;
                (text: string, options?: HoganOptions): string | HoganTemplate;
                };

                  function parse

                  parse: (
                  tokens: readonly Token[],
                  text?: undefined,
                  options?: HoganOptions
                  ) => Tree;

                    function scan

                    scan: (text: string, delimiters?: string) => Token[];

                      class HoganTemplate

                      class HoganTemplate {}

                        method render

                        render: (context: Context, partials?: Partials, indent?: string) => string;

                          class template

                          class HoganTemplate {}

                            method render

                            render: (context: Context, partials?: Partials, indent?: string) => string;

                              class Template

                              class HoganTemplate {}

                                method render

                                render: (context: Context, partials?: Partials, indent?: string) => string;

                                  interface Context

                                  interface Context {}

                                    index signature

                                    [key: string]: any;

                                      interface HoganOptions

                                      interface HoganOptions {}

                                        property asString

                                        asString?: boolean | undefined;

                                          property delimiters

                                          delimiters?: string | undefined;

                                            property disableLambda

                                            disableLambda?: boolean | undefined;

                                              property sectionTags

                                              sectionTags?: readonly SectionTags[] | undefined;

                                                interface Leaf

                                                interface Leaf extends Token {}

                                                  property end

                                                  end: number;

                                                    property nodes

                                                    nodes: Token[];

                                                      interface Partials

                                                      interface Partials {}

                                                        index signature

                                                        [symbol: string]: HoganTemplate;

                                                          interface SectionTags

                                                          interface SectionTags {}

                                                            property c

                                                            c: string;

                                                              property o

                                                              o: string;

                                                                interface Token

                                                                interface Token {}

                                                                  property ctag

                                                                  ctag?: string | undefined;

                                                                    property i

                                                                    i?: number | undefined;

                                                                      property n

                                                                      n?: string | undefined;

                                                                        property otag

                                                                        otag?: string | undefined;

                                                                          property tag

                                                                          tag: string;

                                                                            property text

                                                                            text?: string | undefined;

                                                                              type Tree

                                                                              type Tree = Leaf[];

                                                                                namespace merge

                                                                                module 'merge' {}

                                                                                  function recursive

                                                                                  recursive: (clone: boolean, ...items: object[]) => object;

                                                                                    Package Files (3)

                                                                                    Dependencies (2)

                                                                                    Dev Dependencies (47)

                                                                                    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>