JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q58208F
  • License MIT

Diff algorithm

Package Exports

  • @amaui/diff
  • @amaui/diff/esm/index.js
  • @amaui/diff/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@amaui/diff) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme



AMAUI logo

AMAUI 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
  yarn add @amaui/diff

  // npm
  npm install @amaui/diff

Use

  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'

Dev

Install

  yarn

Test

  yarn test

Prod

Build

  yarn build

Docs

Might be soon...