Skip to content

Commit d8d1617

Browse files
committed
Update documentation for createPatch
1 parent 9924575 commit d8d1617

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ npm install diff --save
7575
* `newStr` : New string value
7676
* `oldHeader` : Additional information to include in the old file header
7777
* `newHeader` : Additional information to include in the new file header
78-
* `options` : An object with options. Currently, only `context` is supported and describes how many lines of context should be included.
78+
* `options` : An object with options.
79+
- `context` describes how many lines of context should be included.
80+
- `stripTrailingCr`: `true` to remove all trailing CR (`\r`) characters before perfoming the diff.
81+
This helps to get a useful diff when comparing files from UNIX/Windows respectively.
7982

8083
* `Diff.createPatch(fileName, oldStr, newStr, oldHeader, newHeader)` - creates a unified diff patch.
8184

0 commit comments

Comments
 (0)