You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

array-changes-async

Package Overview
Dependencies
Maintainers
3
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-changes-async - npm Package Compare versions

Comparing version

to
2.2.0

CHANGELOG.md

1

lib/arrayChanges.js

@@ -117,2 +117,3 @@ /*global setTimeout */

diffItem.expected = expected[offset + index];
diffItem.expectedIndex = offset + index;
}

@@ -119,0 +120,0 @@ });

2

package.json
{
"name": "array-changes-async",
"version": "2.1.0",
"version": "2.2.0",
"description": "Array diffing",

@@ -5,0 +5,0 @@ "main": "./lib/arrayChanges.js",

@@ -307,2 +307,31 @@ /*global describe, it, setTimeout, Symbol*/

it('should report the expectedIndex of equal elements when arrays are identical', function () {
var a = [ 1, 2 ];
var b = [ 1, 2 ];
return expect(promiseArrayChanges(a, b, function (a, b, aIndex, bIndex, callback) {
callback(a === b);
}, function (a, b, aIndex, bIndex, callback) {
callback(a === b);
}), 'when fulfilled', 'to satisfy', [
{ type: 'equal', actualIndex: 0, expectedIndex: 0, value: 1, expected: 1 },
{ type: 'equal', actualIndex: 1, expectedIndex: 1, value: 2, expected: 2 }
]
);
});
it('should report the expectedIndex of equal elements when items are offset', function () {
var a = [ 1, 2 ];
var b = [ 0, 1, 2 ];
return expect(promiseArrayChanges(a, b, function (a, b, aIndex, bIndex, callback) {
callback(a === b);
}, function (a, b, aIndex, bIndex, callback) {
callback(a === b);
}), 'when fulfilled', 'to satisfy', [
{ type: 'insert', value: 0 },
{ type: 'equal', actualIndex: 0, expectedIndex: 1, value: 1, expected: 1 },
{ type: 'equal', actualIndex: 1, expectedIndex: 2, value: 2, expected: 2 }
]
);
});
if (typeof Symbol !== 'undefined') {

@@ -309,0 +338,0 @@ it('should diff arrays that have Symbol property names', function () {

@@ -1,2 +0,1 @@

var Babel = require('babel');

@@ -13,11 +12,6 @@ module.exports = function (wallaby) {

runner: 'node'
},
compilers: {
'**/*.js': wallaby.compilers.babel({
babel: Babel
})
}
};
};

Sorry, the diff of this file is not supported yet