@sinonjs/samsam
Advanced tools
Comparing version 3.1.1 to 3.2.0
@@ -566,2 +566,12 @@ (function (global, factory) { | ||
if (message !== undefined && typeof message !== "string") { | ||
throw new TypeError("Message should be a string"); | ||
} | ||
if (arguments.length > 2) { | ||
throw new TypeError( | ||
"Expected 1 or 2 arguments, received " + arguments.length | ||
); | ||
} | ||
if (type in TYPE_MAP) { | ||
@@ -568,0 +578,0 @@ TYPE_MAP[type](m, expectation, message); |
@@ -16,5 +16,5 @@ # samsam | ||
### `isArguments(object)` | ||
### `isArguments(value)` | ||
Returns `true` if `object` is an `arguments` object, `false` otherwise. | ||
Returns `true` if `value` is an `arguments` object, `false` otherwise. | ||
@@ -27,10 +27,14 @@ | ||
### `isElement(object)` | ||
### `isElement(value)` | ||
Returns `true` if `object` is a DOM element node. Unlike | ||
Underscore.js/lodash, this function will return `false` if `object` is an | ||
Returns `true` if `value` is a DOM element node. Unlike | ||
Underscore.js/lodash, this function will return `false` if `value` is an | ||
*element-like* object, i.e. a regular object with a `nodeType` property that | ||
holds the value `1`. | ||
### `isSet(value)` | ||
Returns `true` if `value` is a [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set). | ||
## Comparison functions | ||
@@ -37,0 +41,0 @@ |
@@ -135,2 +135,12 @@ "use strict"; | ||
if (message !== undefined && typeof message !== "string") { | ||
throw new TypeError("Message should be a string"); | ||
} | ||
if (arguments.length > 2) { | ||
throw new TypeError( | ||
"Expected 1 or 2 arguments, received " + arguments.length | ||
); | ||
} | ||
if (type in TYPE_MAP) { | ||
@@ -137,0 +147,0 @@ TYPE_MAP[type](m, expectation, message); |
{ | ||
"name": "@sinonjs/samsam", | ||
"version": "3.1.1", | ||
"version": "3.2.0", | ||
"description": "Value identification and comparison functions", | ||
@@ -5,0 +5,0 @@ "homepage": "http://sinonjs.github.io/samsam/", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
86051
1924