Class Diff

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(ignoreWhitespace?: boolean): Diff

Parameters

  • ignoreWhitespace?: boolean optional

Returns

Diff

Properties

public ignoreWhitespace: boolean

Methods

public diff(oldString: string, newString: string): IDiffResult[]

Parameters

  • oldString: string
  • newString: string

Returns

IDiffResult[]

public equals(left: string, right: string): boolean

Parameters

  • left: string
  • right: string

Returns

boolean

public extractCommon(basePath: IBestPath, newString: string, oldString: string, diagonalPath: number): number

Parameters

  • basePath: IBestPath
  • newString: string
  • oldString: string
  • diagonalPath: number

Returns

number

public join(left: string, right: string): string

Parameters

  • left: string
  • right: string

Returns

string

public pushComponent(components: IDiffResult[], value: string, added: boolean, removed: boolean)

Parameters

  • components: IDiffResult[]
  • value: string
  • added: boolean
  • removed: boolean

public tokenize(value: string): any

Parameters

  • value: string

Returns

any