Skip to content

Commit 83f1265

Browse files
committed
Slight reword, link to GNU Diffutils
1 parent e0ccc93 commit 83f1265

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33

44
# node-diff3
55

6-
This is a Javascript library for text diffing and three-way-merge.
6+
**node-diff3** is a Javascript library to find differences between two buffers, generate and apply patches, and perform 3-way merging between an original and two changed buffers. It contains similar functionality to the [GNU Diffutils](https://www.gnu.org/software/diffutils/manual/diffutils.html) tools.
77

8-
The code originally came from project Synchrotron, created by Tony Garnock-Jones.
9-
For more detail please visit:
8+
The code originally came from project Synchrotron, created by Tony Garnock-Jones. For more detail please visit:
109

1110
* https://leastfixedpoint.com/tonyg/kcbbs/projects/synchrotron.html
1211
* https://github.com/tonyg/synchrotron
@@ -15,12 +14,12 @@ For more detail please visit:
1514

1615
## Usage
1716

18-
To install node-diff3 as a dependency in another project:
17+
To install node-diff3 as a dependency in your project:
1918
```bash
2019
$ npm install --save node-diff3
2120
```
2221

23-
This library is distributed in both UMD and ES6 module formats for maxmimum compatibility. <sub>([read more about Javascript module formats](https://dev.to/iggredible/what-the-heck-are-cjs-amd-umd-and-esm-ikm))</sub>
22+
**node-diff3** is distributed in both UMD and ES6 module formats for maxmimum compatibility. ([Read more about Javascript module formats](https://dev.to/iggredible/what-the-heck-are-cjs-amd-umd-and-esm-ikm))
2423
* `index.mjs` - ES6 module
2524
* `dist/index.js` - UMD module, ES6 syntax
2625
* `dist/index.es5.js` - UMD module, ES5 syntax
@@ -35,7 +34,7 @@ import * as Diff3 from 'node-diff3'; // ES6 import all
3534
import { diff3Merge } from 'node-diff3'; // ES6 import named
3635
```
3736

38-
You can also use node-diff3 directly in a web browser. A good way to do this is to fetch the file from the [jsDelivr CDN](https://www.jsdelivr.com/), which can even deliver minified versions:
37+
You can also use **node-diff3** directly in a web browser. A good way to do this is to fetch the file from the [jsDelivr CDN](https://www.jsdelivr.com/), which can even deliver minified versions.
3938

4039
The latest versions of many web browsers now support [ES6 modules in script tags](https://caniuse.com/#feat=es6-module) like this:
4140
```html
@@ -79,7 +78,7 @@ Or if you need to support even older browsers like Internet Explorer, fetch the
7978

8079
<a name="diff3Merge" href="#diff3Merge">#</a> <i>Diff3</i>.<b>diff3Merge</b>(<i>a</i>, <i>o</i>, <i>b</i>, <i>options</i>)
8180

82-
Performs a 3-way diff on buffers `o` (original), `a`, and `b`.
81+
Performs a 3-way diff on buffers `o` (original), and `a` and `b` (changed).
8382
The buffers may be arrays or strings. If strings, they will be split into arrays on whitespace `/\s+/` by default.
8483
The returned result alternates between "ok" and "conflict" blocks.
8584

@@ -100,7 +99,7 @@ Options may passed as an object:
10099
}
101100
```
102101

103-
* `excludeFalseConflicts` - If both `a` and `b` contain the same change from `o`, this is considered a "false" conflict.
102+
* `excludeFalseConflicts` - If both `a` and `b` contain an identical change from `o`, this is considered a "false" conflict.
104103
* `stringSeparator` - If inputs buffers are strings, this controls how to split the strings into arrays. The separator value may be a string or a regular expression, as it is just passed to [String.split()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split).
105104

106105
&nbsp;

0 commit comments

Comments
 (0)