diff-sequences
Advanced tools
Comparing version 25.0.0 to 25.1.0
{ | ||
"name": "diff-sequences", | ||
"version": "25.0.0", | ||
"version": "25.1.0", | ||
"repository": { | ||
@@ -19,3 +19,3 @@ "type": "git", | ||
"engines": { | ||
"node": ">= 8" | ||
"node": ">= 8.3" | ||
}, | ||
@@ -34,3 +34,3 @@ "main": "build/index.js", | ||
}, | ||
"gitHead": "ff9269be05fd8316e95232198fce3463bf2f270e" | ||
"gitHead": "170eee11d03b0ed5c60077982fdbc3bafd403638" | ||
} |
@@ -143,8 +143,24 @@ /** | ||
[2, 4, 8].forEach(tenth => { | ||
testDeleteInsert(tenth, all, getItems(n, i => i % 10 >= tenth && `${i}`)); | ||
testDeleteInsert( | ||
tenth, | ||
all, | ||
getItems(n, i => i % 10 >= tenth && `${i}`), | ||
); | ||
}); | ||
testChange(1, all, getItems(n, i => (i % 10 === 0 ? `x${i}` : `${i}`))); | ||
testChange( | ||
1, | ||
all, | ||
getItems(n, i => (i % 10 === 0 ? `x${i}` : `${i}`)), | ||
); | ||
testChange(2, all, getItems(n, change2)); | ||
testChange(5, all, getItems(n, i => (i % 2 === 0 ? `x${i}` : `${i}`))); | ||
testChange(10, all, getItems(n, i => `x${i}`)); // simulate TDD | ||
testChange( | ||
5, | ||
all, | ||
getItems(n, i => (i % 2 === 0 ? `x${i}` : `${i}`)), | ||
); | ||
testChange( | ||
10, | ||
all, | ||
getItems(n, i => `x${i}`), | ||
); // simulate TDD | ||
}; | ||
@@ -151,0 +167,0 @@ |
@@ -31,3 +31,3 @@ # diff-sequences | ||
- `var diff = require('diff-sequences'); // CommonJS modules` | ||
- `var diff = require('diff-sequences').default; // CommonJS modules` | ||
- `import diff from 'diff-sequences'; // ECMAScript modules` | ||
@@ -38,5 +38,4 @@ | ||
```js | ||
/* eslint-disable no-var */ | ||
var a = ['a', 'b', 'c', 'a', 'b', 'b', 'a']; | ||
var b = ['c', 'b', 'a', 'b', 'a', 'c']; | ||
const a = ['a', 'b', 'c', 'a', 'b', 'b', 'a']; | ||
const b = ['c', 'b', 'a', 'b', 'a', 'c']; | ||
@@ -78,6 +77,5 @@ function isCommon(aIndex, bIndex) { | ||
```js | ||
/* eslint-disable no-var */ | ||
// Return length of longest common subsequence according to === operator. | ||
function countCommonItems(a, b) { | ||
var n = 0; | ||
let n = 0; | ||
function isCommon(aIndex, bIndex) { | ||
@@ -95,3 +93,3 @@ return a[aIndex] === b[bIndex]; | ||
var commonLength = countCommonItems( | ||
const commonLength = countCommonItems( | ||
['a', 'b', 'c', 'a', 'b', 'b', 'a'], | ||
@@ -98,0 +96,0 @@ ['c', 'b', 'a', 'b', 'a', 'c'], |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
53110
848
405
1