1.0.1 • Published 11 months ago

@onesy/diff v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

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