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