Provide a unique method that performs all diff steps at once.
All examples will use the following variables:
import * as Differs from '@balmanth/differs';
const base = 'Example'.split(''); // Base char array.
const input = 'eXAMPLe'.split(''); // Input char array.Use this method to calculate the diff between the base and input values.
const patches = Differs.Array.from(base, input); // Get the patch array.- base, the base array, usually is the original/unchanged value.
- input, the changed array that will be compared with the base array.
- comparator, An optional comparison function that is called at every comparison.
- Returns the patch array where you can see in more details what is the diff between the base and input values.