myers.js
A simple difference algorithm based on [Swift's implementation](https://developer.apple.com/documentation/swift/array/difference(from:by:)).
Last updated a year ago by GitHub Actions .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install myers.js 
SYNC missed versions from official npm registry.

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)

Current Tags

  • 0.0.22                                ...           latest (a year ago)

22 Versions

  • 0.0.22                                ...           a year ago
  • 0.0.21                                ...           a year ago
  • 0.0.20                                ...           a year ago
  • 0.0.19                                ...           2 years ago
  • 0.0.18                                ...           2 years ago
  • 0.0.17                                ...           2 years ago
  • 0.0.16                                ...           2 years ago
  • 0.0.15                                ...           2 years ago
  • 0.0.14                                ...           2 years ago
  • 0.0.13                                ...           4 years ago
  • 0.0.12                                ...           4 years ago
  • 0.0.11                                ...           4 years ago
  • 0.0.10                                ...           4 years ago
  • 0.0.9                                ...           4 years ago
  • 0.0.8                                ...           4 years ago
  • 0.0.7                                ...           4 years ago
  • 0.0.6                                ...           4 years ago
  • 0.0.5                                ...           4 years ago
  • 0.0.4                                ...           4 years ago
  • 0.0.3                                ...           4 years ago
  • 0.0.2                                ...           4 years ago
  • 0.0.1                                ...           4 years ago
Maintainers (1)
Downloads
Total 70
Today 0
This Week 0
This Month 65
Last Day 0
Last Week 0
Last Month 5
Dependencies (2)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE