Socket
Socket
Sign inDemoInstall

@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 5.1.0 to 5.2.0

7

CHANGES.md
# Changes
## 5.2.0
- [`f27b87c`](https://github.com/sinonjs/samsam/commit/f27b87cbd493a09e4a3181cf36f503facbbb23fb)
Add match.json (Maximilian Antoni)
_Released by [Maximilian Antoni](https://github.com/mantoni) on 2020-10-06._
## 5.1.0

@@ -4,0 +11,0 @@

@@ -1032,2 +1032,26 @@ (function (global, factory) {

var jsonParseResultTypes = {
null: true,
boolean: true,
number: true,
string: true,
object: true,
array: true
};
createMatcher.json = function(value) {
if (!jsonParseResultTypes[typeOf$5(value)]) {
throw new TypeError("Value cannot be the result of JSON.parse");
}
var message = "json(" + JSON.stringify(value, null, " ") + ")";
return createMatcher(function(actual) {
var parsed;
try {
parsed = JSON.parse(actual);
} catch (e) {
return false;
}
return deepEqual$1(parsed, value);
}, message);
};
createMatcher.every = function(predicate) {

@@ -1034,0 +1058,0 @@ assertMatcher_1(predicate);

@@ -190,2 +190,26 @@ "use strict";

var jsonParseResultTypes = {
null: true,
boolean: true,
number: true,
string: true,
object: true,
array: true
};
createMatcher.json = function(value) {
if (!jsonParseResultTypes[typeOf(value)]) {
throw new TypeError("Value cannot be the result of JSON.parse");
}
var message = "json(" + JSON.stringify(value, null, " ") + ")";
return createMatcher(function(actual) {
var parsed;
try {
parsed = JSON.parse(actual);
} catch (e) {
return false;
}
return deepEqual(parsed, value);
}, message);
};
createMatcher.every = function(predicate) {

@@ -192,0 +216,0 @@ assertMatcher(predicate);

2

package.json
{
"name": "@sinonjs/samsam",
"version": "5.1.0",
"version": "5.2.0",
"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