( a: string, b: string, cleanup: boolean, options?: DiffOptions, )
| 57 | // Compare two strings character-by-character. |
| 58 | // Optionally clean up small common substrings, also known as chaff. |
| 59 | export function diffStringsRaw( |
| 60 | a: string, |
| 61 | b: string, |
| 62 | cleanup: boolean, |
| 63 | options?: DiffOptions, |
| 64 | ): [Array<Diff>, boolean] { |
| 65 | const [diffs, truncated] = diffStrings(a, b, options) |
| 66 | |
| 67 | if (cleanup) { |
| 68 | cleanupSemantic(diffs) |
| 69 | } // impure function |
| 70 | |
| 71 | return [diffs, truncated] |
| 72 | } |
no test coverage detected