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