Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ jsdiff's diff functions all take an old text and a new text and perform three st

* `parsePatch(diffStr)` - Parses a patch into structured data

Return a JSON object representation of the a patch, suitable for use with the `applyPatch` method. This parses to the same structure returned by `structuredPatch`.
Return a JSON object representation of the patch, suitable for use with the `applyPatch` method. This parses to the same structure returned by `structuredPatch`.

* `reversePatch(patch)` - Returns a new structured patch which when applied will undo the original `patch`.

Expand Down
2 changes: 1 addition & 1 deletion src/patch/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { StructuredPatch } from '../types.js';
/**
* Parses a patch into structured data, in the same structure returned by `structuredPatch`.
*
* @return a JSON object representation of the a patch, suitable for use with the `applyPatch` method.
* @return a JSON object representation of the patch, suitable for use with the `applyPatch` method.
*/
export function parsePatch(uniDiff: string): StructuredPatch[] {
const diffstr = uniDiff.split(/\n/),
Expand Down