@onesy/diff
v1.0.1
Published
Diff algorithm
Downloads
122
Maintainers
Readme
Getting started
Add
yarn add @onesy/diff
Use
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'
Dev
Install
yarn
Test
yarn test
Prod
Build
yarn build