You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -17,52 +17,52 @@ npm install diff --save
17
17
18
18
*`Diff.diffChars(oldStr, newStr[, options])` - diffs two blocks of text, comparing character by character.
19
19
20
-
Returns a list of change objects (See below).
20
+
Returns a list of [change objects](#change-objects).
21
21
22
22
Options
23
23
*`ignoreCase`: `true` to ignore casing difference. Defaults to `false`.
24
24
25
25
*`Diff.diffWords(oldStr, newStr[, options])` - diffs two blocks of text, comparing word by word, ignoring whitespace.
26
26
27
-
Returns a list of change objects (See below).
27
+
Returns a list of [change objects](#change-objects).
28
28
29
29
Options
30
30
*`ignoreCase`: Same as in `diffChars`.
31
31
32
32
*`Diff.diffWordsWithSpace(oldStr, newStr[, options])` - diffs two blocks of text, comparing word by word, treating whitespace as significant.
33
33
34
-
Returns a list of change objects (See below).
34
+
Returns a list of [change objects](#change-objects).
35
35
36
36
*`Diff.diffLines(oldStr, newStr[, options])` - diffs two blocks of text, comparing line by line.
37
37
38
38
Options
39
39
*`ignoreWhitespace`: `true` to ignore leading and trailing whitespace. This is the same as `diffTrimmedLines`
40
40
*`newlineIsToken`: `true` to treat newline characters as separate tokens. This allows for changes to the newline structure to occur independently of the line content and to be treated as such. In general this is the more human friendly form of `diffLines` and `diffLines` is better suited for patches and other computer friendly output.
41
41
42
-
Returns a list of change objects (See below).
42
+
Returns a list of [change objects](#change-objects).
43
43
44
44
*`Diff.diffTrimmedLines(oldStr, newStr[, options])` - diffs two blocks of text, comparing line by line, ignoring leading and trailing whitespace.
45
45
46
-
Returns a list of change objects (See below).
46
+
Returns a list of [change objects](#change-objects).
47
47
48
48
*`Diff.diffSentences(oldStr, newStr[, options])` - diffs two blocks of text, comparing sentence by sentence.
49
49
50
-
Returns a list of change objects (See below).
50
+
Returns a list of [change objects](#change-objects).
51
51
52
52
*`Diff.diffCss(oldStr, newStr[, options])` - diffs two blocks of text, comparing CSS tokens.
53
53
54
-
Returns a list of change objects (See below).
54
+
Returns a list of [change objects](#change-objects).
55
55
56
56
*`Diff.diffJson(oldObj, newObj[, options])` - diffs two JSON objects, comparing the fields defined on each. The order of fields, etc does not matter in this comparison.
57
57
58
-
Returns a list of change objects (See below).
58
+
Returns a list of [change objects](#change-objects).
59
59
60
60
*`Diff.diffArrays(oldArr, newArr[, options])` - diffs two arrays, comparing each item for strict equality (===).
61
61
62
62
Options
63
63
*`comparator`: `function(left, right)` for custom equality checks
64
64
65
-
Returns a list of change objects (See below).
65
+
Returns a list of [change objects](#change-objects).
0 commit comments