@onesy/diff
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

onesy logo

onesy Diff

Own implementation of The Myers Difference Algorithm


MIT license     Production ready     UMD 3.1kb gzipped     100% test cov     Browser and Nodejs

Very simple code     Modern code     Junior friendly     Typescript     Made with 💛


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

Package Sidebar

Install

npm i @onesy/diff

Weekly Downloads

22

Version

1.0.1

License

MIT

Unpacked Size

58 kB

Total Files

11

Last publish

Collaborators

  • lazareric