@sinonjs/samsam
Advanced tools
Comparing version 6.0.2 to 6.1.0
@@ -13,4 +13,6 @@ "use strict"; | ||
var isArguments = require("./is-arguments"); | ||
var isArrayType = require("./is-array-type"); | ||
var isDate = require("./is-date"); | ||
var isElement = require("./is-element"); | ||
var isIterable = require("./is-iterable"); | ||
var isMap = require("./is-map"); | ||
@@ -193,2 +195,27 @@ var isNaN = require("./is-nan"); | ||
var isActualNonArrayIterable = | ||
isIterable(actualObj) && | ||
!isArrayType(actualObj) && | ||
!isArguments(actualObj); | ||
var isExpectationNonArrayIterable = | ||
isIterable(expectation) && | ||
!isArrayType(expectation) && | ||
!isArguments(expectation); | ||
if (isActualNonArrayIterable || isExpectationNonArrayIterable) { | ||
var actualArray = Array.from(actualObj); | ||
var expectationArray = Array.from(expectation); | ||
if (actualArray.length !== expectationArray.length) { | ||
return false; | ||
} | ||
var arrayDeeplyEquals = true; | ||
every(actualArray, function (key) { | ||
arrayDeeplyEquals = | ||
arrayDeeplyEquals && | ||
deepEqualCyclic(actualArray[key], expectationArray[key]); | ||
}); | ||
return arrayDeeplyEquals; | ||
} | ||
return every(expectationKeysAndSymbols, function (key) { | ||
@@ -195,0 +222,0 @@ if (!hasOwnProperty(actualObj, key)) { |
{ | ||
"name": "@sinonjs/samsam", | ||
"version": "6.0.2", | ||
"version": "6.1.0", | ||
"description": "Value identification and comparison functions", | ||
@@ -31,3 +31,3 @@ "homepage": "http://sinonjs.github.io/samsam/", | ||
"prettier:write": "prettier --write '**/*.{js,css,md}'", | ||
"preversion": "npm run test-check-coverage", | ||
"preversion": "./check-external-dependencies.sh && npm run test-check-coverage", | ||
"version": "changes --commits --footer", | ||
@@ -34,0 +34,0 @@ "postversion": "git push --follow-tags && npm publish --access public" |
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
62
1717
0
84887