forked from mirrors/cursor-free-vip
Big Change Update
This commit is contained in:
34
uBlock0.chromium/lib/diff/README.md
Normal file
34
uBlock0.chromium/lib/diff/README.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# diff
|
||||
|
||||
implementation of myers diff algorithm
|
||||
|
||||
[](https://travis-ci.org/Swatinem/diff)
|
||||
[](https://coveralls.io/r/Swatinem/diff)
|
||||
[](https://gemnasium.com/Swatinem/diff)
|
||||
|
||||
|
||||
This uses the [*An O(ND) Difference Algorithm and Its Variations*](http://www.xmailserver.org/diff2.pdf)
|
||||
Also see http://simplygenius.net/Article/DiffTutorial2 and
|
||||
http://www.mathertel.de/Diff/ViewSrc.aspx for more inspiration
|
||||
|
||||
## Installation
|
||||
|
||||
$ npm install diff
|
||||
$ component install Swatinem/diff
|
||||
|
||||
## Usage
|
||||
|
||||
### diff(a, b, [eql(a, b)])
|
||||
|
||||
Given two arrays (or array-likes, such as strings) `a` and `b` and an optional
|
||||
equal function `eql`, this will return an array with the following operations:
|
||||
* *nop* the element is in both arrays
|
||||
* *ins* the element is only in array `b` and will be inserted
|
||||
* *del* the element in only in array `a` and will be removed
|
||||
* *rep* the element from `a` will be replaced by the element from `b`.
|
||||
This is essentially the same as a del+ins
|
||||
|
||||
## License
|
||||
|
||||
LGPLv3
|
||||
|
||||
Reference in New Issue
Block a user