(before: string, after: string, options?: {
/**
* Largest number of inserted plus deleted items searched for in each
* changed region. Common prefixes, suffixes and matching runs are free.
* When a region needs more edits, the search splits it at the furthest
* point it reached and continues on the rest, and a part that still cannot
* be matched becomes a deletion followed by an insertion. The script stays
* valid, and is minimal whenever the whole diff needs at most `maxEdits`
* edits. For a finite cap, work is O((N + M) * (maxEdits + 1)).
*
* @default Infinity
*/
readonly maxEdits?: number | undefined
})
| 335 | * @since 4.0.6 |
| 336 | */ |
| 337 | export const codePoints = (before: string, after: string, options?: { |
| 338 | /** |
| 339 | * Largest number of inserted plus deleted items searched for in each |
| 340 | * changed region. Common prefixes, suffixes and matching runs are free. |
| 341 | * When a region needs more edits, the search splits it at the furthest |
| 342 | * point it reached and continues on the rest, and a part that still cannot |
| 343 | * be matched becomes a deletion followed by an insertion. The script stays |
| 344 | * valid, and is minimal whenever the whole diff needs at most `maxEdits` |
| 345 | * edits. For a finite cap, work is O((N + M) * (maxEdits + 1)). |
| 346 | * |
| 347 | * @default Infinity |
| 348 | */ |
| 349 | readonly maxEdits?: number | undefined |
| 350 | }): Array<Edit<string>> => diffStrings(Array.from(before), Array.from(after), options?.maxEdits) |
| 351 | |
| 352 | /** |
| 353 | * Applies an edit script to an array. |
no test coverage detected