Socket
Socket
Sign inDemoInstall

diff-sequences

Package Overview
Dependencies
0
Maintainers
6
Versions
67
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 25.0.0 to 25.1.0

6

package.json
{
"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'],

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc