MCPcopy Index your code
hub / github.com/kpdecker/jsdiff / createPatch

Function createPatch

src/patch/create.ts:619–628  ·  view source on GitHub ↗
(
  fileName: string,
  oldStr: string,
  newStr: string,
  oldHeader?: string,
  newHeader?: string,
  options?: CreatePatchOptionsAbortable | CreatePatchOptionsNonabortable | CreatePatchCallbackNonabortable
)

Source from the content-addressed store, hash-verified

617 options?: CreatePatchOptionsNonabortable
618): string
619export function createPatch(
620 fileName: string,
621 oldStr: string,
622 newStr: string,
623 oldHeader?: string,
624 newHeader?: string,
625 options?: CreatePatchOptionsAbortable | CreatePatchOptionsNonabortable | CreatePatchCallbackNonabortable
626): string | undefined {
627 return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options as any);
628}
629
630/**
631 * Split `text` into an array of lines, including the trailing newline character (where present)

Callers 3

parse.jsFile · 0.85
create.jsFile · 0.85
apply.jsFile · 0.85

Calls 1

createTwoFilesPatchFunction · 0.85

Tested by

no test coverage detected