Own implementation of The Myers Difference Algorithm
Very simple code Modern code Junior friendly Typescript Made with 💛
yarn add @amaui/diff
import AmauiDiff from '@amaui/diff';
// Make a new AmauiDiff instance
// with an optional initial value for options
const amauiDiff = new AmauiDiff();
// Diff
const diff = amauiDiff.diff('aaa', 'aab');
// {
// items: ['r', 2, 'a', 2, 'b']
// }
// Update
amauiDiff.update('aaa', diff);
// 'aab'
Install
yarn
Test
yarn test
Build
yarn build