Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sinonjs/samsam

Package Overview
Dependencies
Maintainers
5
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sinonjs/samsam - npm Package Compare versions

Comparing version 3.3.1 to 3.3.2

lib/is-map.js

26

dist/samsam.js

@@ -134,2 +134,8 @@ (function (global, factory) {

function isMap(value) {
return typeof Map !== "undefined" && value instanceof Map;
}
var isMap_1 = isMap;
// Returns true when the value is a regular Object and not a specialized Object

@@ -209,2 +215,3 @@ //

var every = Array.prototype.every;

@@ -349,2 +356,21 @@ var getTime = Date.prototype.getTime;

if (isMap_1(actualObj) || isMap_1(expectationObj)) {
if (
!isMap_1(actualObj) ||
!isMap_1(expectationObj) ||
actualObj.size !== expectationObj.size
) {
return false;
}
var mapsDeeplyEqual = true;
actualObj.forEach(function(value, key) {
mapsDeeplyEqual =
mapsDeeplyEqual &&
deepEqualCyclic(value, expectationObj.get(key));
});
return mapsDeeplyEqual;
}
return every.call(expectationKeysAndSymbols, function(key) {

@@ -351,0 +377,0 @@ if (!hasOwnProperty.call(actualObj, key)) {

@@ -10,2 +10,3 @@ "use strict";

var isElement = require("./is-element");
var isMap = require("./is-map");
var isNaN = require("./is-nan");

@@ -156,2 +157,21 @@ var isObject = require("./is-object");

if (isMap(actualObj) || isMap(expectationObj)) {
if (
!isMap(actualObj) ||
!isMap(expectationObj) ||
actualObj.size !== expectationObj.size
) {
return false;
}
var mapsDeeplyEqual = true;
actualObj.forEach(function(value, key) {
mapsDeeplyEqual =
mapsDeeplyEqual &&
deepEqualCyclic(value, expectationObj.get(key));
});
return mapsDeeplyEqual;
}
return every.call(expectationKeysAndSymbols, function(key) {

@@ -158,0 +178,0 @@ if (!hasOwnProperty.call(actualObj, key)) {

2

package.json
{
"name": "@sinonjs/samsam",
"version": "3.3.1",
"version": "3.3.2",
"description": "Value identification and comparison functions",

@@ -5,0 +5,0 @@ "homepage": "http://sinonjs.github.io/samsam/",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc