(oldStr: string, newStr: string, options?: any)
| 182 | options?: DiffWordsOptionsNonabortable |
| 183 | ): ChangeObject<string>[] |
| 184 | export function diffWords(oldStr: string, newStr: string, options?: any): undefined | ChangeObject<string>[] { |
| 185 | // This option has never been documented and never will be (it's clearer to |
| 186 | // just call `diffWordsWithSpace` directly if you need that behavior), but |
| 187 | // has existed in jsdiff for a long time, so we retain support for it here |
| 188 | // for the sake of backwards compatibility. |
| 189 | if (options?.ignoreWhitespace != null && !options.ignoreWhitespace) { |
| 190 | return diffWordsWithSpace(oldStr, newStr, options); |
| 191 | } |
| 192 | |
| 193 | return wordDiff.diff(oldStr, newStr, options); |
| 194 | } |
| 195 | |
| 196 | function dedupeWhitespaceInChangeObjects( |
| 197 | startKeep: ChangeObject<string> | null, |
no test coverage detected