Diff algorithm
npm install @amaui/diff
Own implementation of The Myers Difference Algorithm
Very simple code
Modern code
Junior friendly
Typescript
Made with :yellow_heart:
``sh
// yarn
yarn add @amaui/diff
// npm
npm install @amaui/diff
`
`javascript
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
`sh`
yarn
Test
`sh`
yarn test
Build
`sh``
yarn build
Might be soon...