diff-sequences
Advanced tools
Comparing version 23.0.1 to 23.2.0
{ | ||
"name": "diff-sequences", | ||
"version": "23.0.1", | ||
"version": "23.2.0", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
@@ -11,4 +11,4 @@ # diff-sequences | ||
* Because your function encapsulates **comparison**, this package can compare items according to `===` operator, `Object.is` method, or other criterion. | ||
* Because your function encapsulates **sequences**, this package can find differences in arrays, strings, or other data. | ||
- Because your function encapsulates **comparison**, this package can compare items according to `===` operator, `Object.is` method, or other criterion. | ||
- Because your function encapsulates **sequences**, this package can find differences in arrays, strings, or other data. | ||
@@ -27,9 +27,9 @@ **Output** function `foundSubsequence(nCommon, aCommon, bCommon)` receives the number of adjacent items and starting indexes of each common subsequence. If sequences do not have common items, then this package does not call your function. | ||
* `npm install diff-sequences` | ||
* `yarn add diff-sequences` | ||
- `npm install diff-sequences` | ||
- `yarn add diff-sequences` | ||
To use `diff` as the name of the default export from this package, do either of the following: | ||
* `var diff = require('diff-sequences'); // CommonJS modules` | ||
* `import diff from 'diff-sequences'; // ECMAScript modules` | ||
- `var diff = require('diff-sequences'); // CommonJS modules` | ||
- `import diff from 'diff-sequences'; // ECMAScript modules` | ||
@@ -108,11 +108,11 @@ Call `diff` with the **lengths** of sequences and your **callback** functions: | ||
* negative: its absolute value is the minimum number of items to **delete** from `a` | ||
* positive: it is the minimum number of items to **insert** from `b` | ||
* zero: there is an **equal** number of items to delete from `a` and insert from `b` | ||
* non-zero: there is an equal number of **additional** items to delete from `a` and insert from `b` | ||
- negative: its absolute value is the minimum number of items to **delete** from `a` | ||
- positive: it is the minimum number of items to **insert** from `b` | ||
- zero: there is an **equal** number of items to delete from `a` and insert from `b` | ||
- non-zero: there is an equal number of **additional** items to delete from `a` and insert from `b` | ||
In this example, `6 - 7` is: | ||
* negative: `1` is the minimum number of items to **delete** from `a` | ||
* non-zero: `2` is the number of **additional** items to delete from `a` and insert from `b` | ||
- negative: `1` is the minimum number of items to **delete** from `a` | ||
- non-zero: `2` is the number of **additional** items to delete from `a` and insert from `b` | ||
@@ -178,5 +178,5 @@ ## Example of callback functions to find common items | ||
* **c**hange adjacent lines from the first file to lines from the second file | ||
* **d**elete lines from the first file | ||
* **a**ppend or insert lines from the second file | ||
- **c**hange adjacent lines from the first file to lines from the second file | ||
- **d**elete lines from the first file | ||
- **a**ppend or insert lines from the second file | ||
@@ -183,0 +183,0 @@ ```js |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package