Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amaui-org/amaui-diff
Difference algorithm
https://github.com/amaui-org/amaui-diff
algorithm algorithms amaui browser diff diff-algorithm difference difference-algorithm javascript js library myers-algorithm node nodejs typescript utils web
Last synced: about 2 months ago
JSON representation
Difference algorithm
- Host: GitHub
- URL: https://github.com/amaui-org/amaui-diff
- Owner: amaui-org
- License: mit
- Created: 2022-02-08T05:40:37.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-29T22:27:05.000Z (9 months ago)
- Last Synced: 2024-10-02T22:35:43.746Z (3 months ago)
- Topics: algorithm, algorithms, amaui, browser, diff, diff-algorithm, difference, difference-algorithm, javascript, js, library, myers-algorithm, node, nodejs, typescript, utils, web
- Language: TypeScript
- Homepage: https://docs.amaui.me/library/diff
- Size: 44.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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 :yellow_heart:
## Getting started
### Add
```sh
yarn add @amaui/diff
```### Use
```javascript
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
```sh
yarn
```Test
```sh
yarn test
```### Prod
Build
```sh
yarn build
```