Module JsDiff

Index

Interfaces

Classes

Functions

Functions

applyPatch(oldStr: string, uniDiff: string): string

Parameters

  • oldStr: string
  • uniDiff: string

Returns

string

convertChangesToDMP(changes: IDiffResult[]): Array<{ 0: number; 1: string; }>

Parameters

Returns

Array<{ 0: number; 1: string; }>

convertChangesToXML(changes: IDiffResult[]): string

Parameters

Returns

string

createPatch(fileName: string, oldStr: string, newStr: string, oldHeader: string, newHeader: string): string

Parameters

  • fileName: string
  • oldStr: string
  • newStr: string
  • oldHeader: string
  • newHeader: string

Returns

string

diffChars(oldStr: string, newStr: string): IDiffResult[]

Parameters

  • oldStr: string
  • newStr: string

Returns

IDiffResult[]

diffCss(oldStr: string, newStr: string): IDiffResult[]

Parameters

  • oldStr: string
  • newStr: string

Returns

IDiffResult[]

diffLines(oldStr: string, newStr: string): IDiffResult[]

Parameters

  • oldStr: string
  • newStr: string

Returns

IDiffResult[]

diffWords(oldStr: string, newStr: string): IDiffResult[]

Parameters

  • oldStr: string
  • newStr: string

Returns

IDiffResult[]

diffWordsWithSpace(oldStr: string, newStr: string): IDiffResult[]

Parameters

  • oldStr: string
  • newStr: string

Returns

IDiffResult[]