0.0.13 • Published 1 year ago

myers.js v0.0.13

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

myers.js

A simple difference algorithm based on Swift's implementation.

Installation

NPM

npm install myers.js

Yarn

yarn add myers.js

API

  • myers(oldStr, newStr, [options])

    Compare two inputs and return the differences.

    Options

    • compare?: (a, b) => boolean compare function. (default lodash.isEqual)

    • progress?: (ratio: { count: number; total: number; }) => void callback function for report progress.

    • debounce?: number debounce in millisecond of progress report. (default 0)

Examples

import myers from 'myers.js';

const first = 'beep boop';
const second = 'beep boob blah';

const diff = await myers(first, second);

console.log(diff)
0.0.13

1 year ago

0.0.12

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago