Update checked-in dependencies

This commit is contained in:
github-actions[bot] 2021-07-27 22:26:09 +00:00
parent 3ba511a8f1
commit 1c4c64199f
175 changed files with 13227 additions and 15136 deletions

View file

@ -1,5 +1,82 @@
# Changes
## 6.0.2
- [`144204d`](https://github.com/sinonjs/samsam/commit/144204d505526d5c382cb2f3dc2c2dd1378fe12d)
Fix deep equal comparison between promises (#217) (David G. Miguel)
_Released on 2021-05-24._
## 6.0.1
- [`decfafe`](https://github.com/sinonjs/samsam/commit/decfafe72d8b2d159cfc49440a8f4af6d3e9c574)
Bump y18n from 4.0.0 to 4.0.1 (dependabot[bot])
>
> Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1.
> - [Release notes](https://github.com/yargs/y18n/releases)
> - [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
> - [Commits](https://github.com/yargs/y18n/commits)
>
> Signed-off-by: dependabot[bot] <support@github.com>
_Released on 2021-04-08._
## 6.0.0
- [`95d1dce`](https://github.com/sinonjs/samsam/commit/95d1dce07f47b7bbb84111c42f44ecd9466dc2c8)
Use @sinonjs/eslint-config (Morgan Roderick)
>
> This drops support for legacy runtimes like IE11, legacy Edge, Safari 9 and the like
_Released on 2021-03-30._
## 5.3.1
- [`04e0faa`](https://github.com/sinonjs/samsam/commit/04e0faa88d8a08325c6d70febed9dad4e7eeabfe)
Distribute package as source (Morgan Roderick)
>
> This library is not meant for writing end user applications or even for
> being used directly when writing tests. It is not meant to be loaded
> directly by browsers.
>
> Consumers of this package are assumed to use their own bundlers, should
> they need to bundle code for use in browsers or workers.
>
> Therefore, it is safe to distribute the package as source files and not
> bundle them up.
>
> This allows us to remove the bundler and its transitive dependencies,
> which reduces the maintenance burden of managing the library.
>
_Released on 2021-01-13._
## 5.3.0
- [`fd8aabd`](https://github.com/sinonjs/samsam/commit/fd8aabd3768c199abc717dc6d793ef136419be72)
Generate .d.ts from JSDoc (Morgan Roderick)
>
> See https://humanwhocodes.com/snippets/2020/10/create-typescript-declarations-from-javascript-jsdoc/
>
_Released on 2020-11-16._
## 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
- [`820c296`](https://github.com/sinonjs/samsam/commit/820c2961f70208367e1c072ae9a581eefd0d8d18)
Evaluate symbol keys for object matchers (#206) (Joel Bradshaw)
>
> * Make match() work for objects with symbol keys
_Released on 2020-08-11._
## 5.0.3
- [`9d2add0`](https://github.com/sinonjs/samsam/commit/9d2add01eba85eb17ddb91ac22404fb6c23e8d39)

View file

@ -43,7 +43,6 @@ Support us with a monthly donation and help us continue our activities. [[Become
<a href="https://opencollective.com/sinon/backer/28/website" target="_blank"><img src="https://opencollective.com/sinon/backer/28/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/29/website" target="_blank"><img src="https://opencollective.com/sinon/backer/29/avatar.svg"></a>
## Sponsors
Become a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/sinon#sponsor)]

File diff suppressed because it is too large Load diff

View file

@ -12,32 +12,27 @@ function available).
## Predicate functions
### `isArguments(value)`
Returns `true` if `value` is an `arguments` object, `false` otherwise.
### `isNegZero(value)`
Returns `true` if `value` is `-0`.
### `isElement(value)`
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
_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
### `identical(x, y)`
Strict equality check according to EcmaScript Harmony's `egal`.
@ -45,26 +40,24 @@ Strict equality check according to EcmaScript Harmony's `egal`.
**From the Harmony wiki:**
> An egal function simply makes available the internal `SameValue` function
from section 9.12 of the ES5 spec. If two values are egal, then they are not
observably distinguishable.
> from section 9.12 of the ES5 spec. If two values are egal, then they are not
> observably distinguishable.
`identical` returns `true` when `===` is `true`, except for `-0` and
`+0`, where it returns `false`. Additionally, it returns `true` when
`NaN` is compared to itself.
### `deepEqual(actual, expectation)`
Deep equal comparison. Two values are "deep equal" if:
* They are identical
* They are both date objects representing the same time
* They are both arrays containing elements that are all deepEqual
* They are objects with the same set of properties, and each property
in `actual` is deepEqual to the corresponding property in `expectation`
* `actual` can have [symbolic properties](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) that are missing from `expectation`
- They are identical
- They are both date objects representing the same time
- They are both arrays containing elements that are all deepEqual
- They are objects with the same set of properties, and each property
in `actual` is deepEqual to the corresponding property in `expectation`
- `actual` can have [symbolic properties](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) that are missing from `expectation`
### Matcher
@ -75,77 +68,62 @@ with these built in matchers:
Matches anything.
#### `sinon.match.defined`
Requires the value to be defined.
#### `sinon.match.truthy`
Requires the value to be truthy.
#### `sinon.match.falsy`
Requires the value to be falsy.
#### `sinon.match.bool`
Requires the value to be a `Boolean`
#### `sinon.match.number`
Requires the value to be a `Number`.
#### `sinon.match.string`
Requires the value to be a `String`.
#### `sinon.match.object`
Requires the value to be an `Object`.
#### `sinon.match.func`
Requires the value to be a `Function`.
#### `sinon.match.array`
Requires the value to be an `Array`.
#### `sinon.match.array.deepEquals(arr)`
Requires an `Array` to be deep equal another one.
#### `sinon.match.array.startsWith(arr)`
Requires an `Array` to start with the same values as another one.
#### `sinon.match.array.endsWith(arr)`
Requires an `Array` to end with the same values as another one.
#### `sinon.match.array.contains(arr)`
Requires an `Array` to contain each one of the values the given array has.
#### `sinon.match.map`
Requires the value to be a `Map`.
#### `sinon.match.map.deepEquals(map)`
Requires a `Map` to be deep equal another one.
@ -154,32 +132,26 @@ Requires a `Map` to be deep equal another one.
Requires a `Map` to contain each one of the items the given map has.
#### `sinon.match.set`
Requires the value to be a `Set`.
#### `sinon.match.set.deepEquals(set)`
Requires a `Set` to be deep equal another one.
#### `sinon.match.set.contains(set)`
Requires a `Set` to contain each one of the items the given set has.
#### `sinon.match.regexp`
Requires the value to be a regular expression.
#### `sinon.match.date`
Requires the value to be a `Date` object.
#### `sinon.match.symbol`
Requires the value to be a `Symbol`.
@ -195,18 +167,17 @@ Requires the value to strictly equal `ref`.
#### `sinon.match.typeOf(type)`
Requires the value to be of the given type, where `type` can be one of
`"undefined"`,
`"null"`,
`"boolean"`,
`"number"`,
`"string"`,
`"object"`,
`"function"`,
`"array"`,
`"regexp"`,
`"date"` or
`"symbol"`.
`"undefined"`,
`"null"`,
`"boolean"`,
`"number"`,
`"string"`,
`"object"`,
`"function"`,
`"array"`,
`"regexp"`,
`"date"` or
`"symbol"`.
#### `sinon.match.instanceOf(type)`
@ -222,24 +193,22 @@ The property might be inherited via the prototype chain. If the optional expecta
Same as `sinon.match.has` but the property must be defined by the value itself. Inherited properties are ignored.
#### `sinon.match.hasNested(propertyPath[, expectation])`
Requires the value to define the given `propertyPath`. Dot (`prop.prop`) and bracket (`prop[0]`) notations are supported as in [Lodash.get](https://lodash.com/docs/4.4.2#get).
The propertyPath might be inherited via the prototype chain. If the optional expectation is given, the value at the propertyPath is deeply compared with the expectation. The expectation can be another matcher.
```javascript
sinon.match.hasNested("a[0].b.c");
// Where actual is something like
var actual = { "a": [{ "b": { "c": 3 } }] };
var actual = { a: [{ b: { c: 3 } }] };
sinon.match.hasNested("a.b.c");
// Where actual is something like
var actual = { "a": { "b": { "c": 3 } } };
var actual = { a: { b: { c: 3 } } };
```
#### `sinon.match.every(matcher)`
@ -274,7 +243,14 @@ function returns `true` if the matcher is a case-insensitive substring of
```javascript
samsam.match("Give me something", "Give"); //true
samsam.match("Give me something", "sumptn"); // false
samsam.match({ toString: function () { return "yeah"; } }, "Yeah!"); // true
samsam.match(
{
toString: function () {
return "yeah";
},
},
"Yeah!"
); // true
```
The last example is not symmetric. When the matcher is a string, the `object`
@ -282,13 +258,11 @@ is coerced to a string - in this case using `toString`. Changing the order of
the arguments would cause the matcher to be an object, in which case different
rules apply (see below).
#### Boolean matcher
Performs a strict (i.e. `===`) match with the object. So, only `true`
matches `true`, and only `false` matches `false`.
#### Regular expression matcher
When the matcher is a regular expression, the function will pass if
@ -298,11 +272,17 @@ any object with a `test` method will be used as a matcher this way.
```javascript
samsam.match("Give me something", /^[a-z\s]$/i); // true
samsam.match("Give me something", /[0-9]/); // false
samsam.match({ toString: function () { return "yeah!"; } }, /yeah/); // true
samsam.match(
{
toString: function () {
return "yeah!";
},
},
/yeah/
); // true
samsam.match(234, /[a-z]/); // false
```
#### Number matcher
When the matcher is a number, the assertion will pass if `object == matcher`.
@ -310,11 +290,17 @@ When the matcher is a number, the assertion will pass if `object == matcher`.
```javascript
samsam.match("123", 123); // true
samsam.match("Give me something", 425); // false
samsam.match({ toString: function () { return "42"; } }, 42); // true
samsam.match(
{
toString: function () {
return "42";
},
},
42
); // true
samsam.match(234, 1234); // false
```
#### Function matcher
When the matcher is a function, it is called with `object` as its only
@ -334,17 +320,21 @@ samsam.match("Give me something", function () {
});
// true
samsam.match({
toString: function () {
return "42";
samsam.match(
{
toString: function () {
return "42";
},
},
function () {
return true;
}
}, function () { return true; });
);
// false
samsam.match(234, function () {});
```
#### Object matcher
As mentioned above, if an object matcher defines a `test` method, `match`
@ -354,32 +344,36 @@ If the matcher does not have a test method, a recursive match is performed. If
all properties of `matcher` matches corresponding properties in `object`,
`match` returns `true`. Note that the object matcher does not care if the
number of properties in the two objects are the same - only if all properties in
the matcher recursively matches ones in `object`.
the matcher recursively matches ones in `object`. If supported, this object matchers
include [symbolic properties](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol)
in the comparison.
```javascript
// true
samsam.match("123", {
test: function (arg) {
return arg == 123;
}
},
});
// false
samsam.match({}, { prop: 42 });
// true
samsam.match({
name: "Chris",
profession: "Programmer"
}, {
name: "Chris"
});
samsam.match(
{
name: "Chris",
profession: "Programmer",
},
{
name: "Chris",
}
);
// false
samsam.match(234, { name: "Chris" });
```
#### DOM elements
`match` can be very helpful when comparing DOM elements, because it allows
@ -391,6 +385,6 @@ var el = document.getElementById("myEl");
samsam.match(el, {
tagName: "h2",
className: "item",
innerHTML: "Howdy"
innerHTML: "Howdy",
});
```

Binary file not shown.

View file

@ -10,7 +10,7 @@ var ARRAY_TYPES = [
Int32Array,
Uint32Array,
Float32Array,
Float64Array
Float64Array,
];
module.exports = ARRAY_TYPES;

View file

@ -44,20 +44,20 @@ function createMatcher(expectation, message) {
if (arguments.length > 2) {
throw new TypeError(
"Expected 1 or 2 arguments, received " + arguments.length
`Expected 1 or 2 arguments, received ${arguments.length}`
);
}
if (type in TYPE_MAP) {
TYPE_MAP[type](m, expectation, message);
} else {
m.test = function(actual) {
m.test = function (actual) {
return deepEqual(actual, expectation);
};
}
if (!m.message) {
m.message = "match(" + valueToString(expectation) + ")";
m.message = `match(${valueToString(expectation)})`;
}
return m;
@ -65,48 +65,48 @@ function createMatcher(expectation, message) {
createMatcher.isMatcher = isMatcher;
createMatcher.any = createMatcher(function() {
createMatcher.any = createMatcher(function () {
return true;
}, "any");
createMatcher.defined = createMatcher(function(actual) {
createMatcher.defined = createMatcher(function (actual) {
return actual !== null && actual !== undefined;
}, "defined");
createMatcher.truthy = createMatcher(function(actual) {
createMatcher.truthy = createMatcher(function (actual) {
return Boolean(actual);
}, "truthy");
createMatcher.falsy = createMatcher(function(actual) {
createMatcher.falsy = createMatcher(function (actual) {
return !actual;
}, "falsy");
createMatcher.same = function(expectation) {
return createMatcher(function(actual) {
createMatcher.same = function (expectation) {
return createMatcher(function (actual) {
return expectation === actual;
}, "same(" + valueToString(expectation) + ")");
}, `same(${valueToString(expectation)})`);
};
createMatcher.in = function(arrayOfExpectations) {
createMatcher.in = function (arrayOfExpectations) {
if (typeOf(arrayOfExpectations) !== "array") {
throw new TypeError("array expected");
}
return createMatcher(function(actual) {
return some(arrayOfExpectations, function(expectation) {
return createMatcher(function (actual) {
return some(arrayOfExpectations, function (expectation) {
return expectation === actual;
});
}, "in(" + valueToString(arrayOfExpectations) + ")");
}, `in(${valueToString(arrayOfExpectations)})`);
};
createMatcher.typeOf = function(type) {
createMatcher.typeOf = function (type) {
assertType(type, "string", "type");
return createMatcher(function(actual) {
return createMatcher(function (actual) {
return typeOf(actual) === type;
}, 'typeOf("' + type + '")');
}, `typeOf("${type}")`);
};
createMatcher.instanceOf = function(type) {
createMatcher.instanceOf = function (type) {
/* istanbul ignore if */
if (
typeof Symbol === "undefined" ||
@ -121,9 +121,9 @@ createMatcher.instanceOf = function(type) {
"[Symbol.hasInstance]"
);
}
return createMatcher(function(actual) {
return createMatcher(function (actual) {
return actual instanceof type;
}, "instanceOf(" + (functionName(type) || objectToString(type)) + ")");
}, `instanceOf(${functionName(type) || objectToString(type)})`);
};
/**
@ -135,15 +135,15 @@ createMatcher.instanceOf = function(type) {
* @returns {object} A matcher
*/
function createPropertyMatcher(propertyTest, messagePrefix) {
return function(property, value) {
return function (property, value) {
assertType(property, "string", "property");
var onlyProperty = arguments.length === 1;
var message = messagePrefix + '("' + property + '"';
var message = `${messagePrefix}("${property}"`;
if (!onlyProperty) {
message += ", " + valueToString(value);
message += `, ${valueToString(value)}`;
}
message += ")";
return createMatcher(function(actual) {
return createMatcher(function (actual) {
if (
actual === undefined ||
actual === null ||
@ -156,26 +156,26 @@ function createPropertyMatcher(propertyTest, messagePrefix) {
};
}
createMatcher.has = createPropertyMatcher(function(actual, property) {
createMatcher.has = createPropertyMatcher(function (actual, property) {
if (typeof actual === "object") {
return property in actual;
}
return actual[property] !== undefined;
}, "has");
createMatcher.hasOwn = createPropertyMatcher(function(actual, property) {
createMatcher.hasOwn = createPropertyMatcher(function (actual, property) {
return hasOwnProperty(actual, property);
}, "hasOwn");
createMatcher.hasNested = function(property, value) {
createMatcher.hasNested = function (property, value) {
assertType(property, "string", "property");
var onlyProperty = arguments.length === 1;
var message = 'hasNested("' + property + '"';
var message = `hasNested("${property}"`;
if (!onlyProperty) {
message += ", " + valueToString(value);
message += `, ${valueToString(value)}`;
}
message += ")";
return createMatcher(function(actual) {
return createMatcher(function (actual) {
if (
actual === undefined ||
actual === null ||
@ -187,54 +187,78 @@ createMatcher.hasNested = function(property, value) {
}, message);
};
createMatcher.every = function(predicate) {
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) {
assertMatcher(predicate);
return createMatcher(function(actual) {
return createMatcher(function (actual) {
if (typeOf(actual) === "object") {
return every(Object.keys(actual), function(key) {
return every(Object.keys(actual), function (key) {
return predicate.test(actual[key]);
});
}
return (
isIterable(actual) &&
every(actual, function(element) {
every(actual, function (element) {
return predicate.test(element);
})
);
}, "every(" + predicate.message + ")");
}, `every(${predicate.message})`);
};
createMatcher.some = function(predicate) {
createMatcher.some = function (predicate) {
assertMatcher(predicate);
return createMatcher(function(actual) {
return createMatcher(function (actual) {
if (typeOf(actual) === "object") {
return !every(Object.keys(actual), function(key) {
return !every(Object.keys(actual), function (key) {
return !predicate.test(actual[key]);
});
}
return (
isIterable(actual) &&
!every(actual, function(element) {
!every(actual, function (element) {
return !predicate.test(element);
})
);
}, "some(" + predicate.message + ")");
}, `some(${predicate.message})`);
};
createMatcher.array = createMatcher.typeOf("array");
createMatcher.array.deepEquals = function(expectation) {
return createMatcher(function(actual) {
createMatcher.array.deepEquals = function (expectation) {
return createMatcher(function (actual) {
// Comparing lengths is the fastest way to spot a difference before iterating through every item
var sameLength = actual.length === expectation.length;
return (
typeOf(actual) === "array" &&
sameLength &&
every(actual, function(element, index) {
every(actual, function (element, index) {
var expected = expectation[index];
return typeOf(expected) === "array" &&
typeOf(element) === "array"
@ -242,97 +266,97 @@ createMatcher.array.deepEquals = function(expectation) {
: deepEqual(expected, element);
})
);
}, "deepEquals([" + iterableToString(expectation) + "])");
}, `deepEquals([${iterableToString(expectation)}])`);
};
createMatcher.array.startsWith = function(expectation) {
return createMatcher(function(actual) {
createMatcher.array.startsWith = function (expectation) {
return createMatcher(function (actual) {
return (
typeOf(actual) === "array" &&
every(expectation, function(expectedElement, index) {
every(expectation, function (expectedElement, index) {
return actual[index] === expectedElement;
})
);
}, "startsWith([" + iterableToString(expectation) + "])");
}, `startsWith([${iterableToString(expectation)}])`);
};
createMatcher.array.endsWith = function(expectation) {
return createMatcher(function(actual) {
createMatcher.array.endsWith = function (expectation) {
return createMatcher(function (actual) {
// This indicates the index in which we should start matching
var offset = actual.length - expectation.length;
return (
typeOf(actual) === "array" &&
every(expectation, function(expectedElement, index) {
every(expectation, function (expectedElement, index) {
return actual[offset + index] === expectedElement;
})
);
}, "endsWith([" + iterableToString(expectation) + "])");
}, `endsWith([${iterableToString(expectation)}])`);
};
createMatcher.array.contains = function(expectation) {
return createMatcher(function(actual) {
createMatcher.array.contains = function (expectation) {
return createMatcher(function (actual) {
return (
typeOf(actual) === "array" &&
every(expectation, function(expectedElement) {
every(expectation, function (expectedElement) {
return arrayIndexOf(actual, expectedElement) !== -1;
})
);
}, "contains([" + iterableToString(expectation) + "])");
}, `contains([${iterableToString(expectation)}])`);
};
createMatcher.map = createMatcher.typeOf("map");
createMatcher.map.deepEquals = function mapDeepEquals(expectation) {
return createMatcher(function(actual) {
return createMatcher(function (actual) {
// Comparing lengths is the fastest way to spot a difference before iterating through every item
var sameLength = actual.size === expectation.size;
return (
typeOf(actual) === "map" &&
sameLength &&
every(actual, function(element, key) {
every(actual, function (element, key) {
return expectation.has(key) && expectation.get(key) === element;
})
);
}, "deepEquals(Map[" + iterableToString(expectation) + "])");
}, `deepEquals(Map[${iterableToString(expectation)}])`);
};
createMatcher.map.contains = function mapContains(expectation) {
return createMatcher(function(actual) {
return createMatcher(function (actual) {
return (
typeOf(actual) === "map" &&
every(expectation, function(element, key) {
every(expectation, function (element, key) {
return actual.has(key) && actual.get(key) === element;
})
);
}, "contains(Map[" + iterableToString(expectation) + "])");
}, `contains(Map[${iterableToString(expectation)}])`);
};
createMatcher.set = createMatcher.typeOf("set");
createMatcher.set.deepEquals = function setDeepEquals(expectation) {
return createMatcher(function(actual) {
return createMatcher(function (actual) {
// Comparing lengths is the fastest way to spot a difference before iterating through every item
var sameLength = actual.size === expectation.size;
return (
typeOf(actual) === "set" &&
sameLength &&
every(actual, function(element) {
every(actual, function (element) {
return expectation.has(element);
})
);
}, "deepEquals(Set[" + iterableToString(expectation) + "])");
}, `deepEquals(Set[${iterableToString(expectation)}])`);
};
createMatcher.set.contains = function setContains(expectation) {
return createMatcher(function(actual) {
return createMatcher(function (actual) {
return (
typeOf(actual) === "set" &&
every(expectation, function(element) {
every(expectation, function (element) {
return actual.has(element);
})
);
}, "contains(Set[" + iterableToString(expectation) + "])");
}, `contains(Set[${iterableToString(expectation)}])`);
};
createMatcher.bool = createMatcher.typeOf("boolean");

View file

@ -12,9 +12,7 @@
*/
function assertMethodExists(value, method, name, methodPath) {
if (value[method] === null || value[method] === undefined) {
throw new TypeError(
"Expected " + name + " to have method " + methodPath
);
throw new TypeError(`Expected ${name} to have method ${methodPath}`);
}
}

View file

@ -16,12 +16,7 @@ function assertType(value, type, name) {
var actual = typeOf(value);
if (actual !== type) {
throw new TypeError(
"Expected type of " +
name +
" to be " +
type +
", but was " +
actual
`Expected type of ${name} to be ${type}, but was ${actual}`
);
}
}

View file

@ -1,11 +1,16 @@
"use strict";
var every = require("@sinonjs/commons").prototypes.array.every;
var concat = require("@sinonjs/commons").prototypes.array.concat;
var typeOf = require("@sinonjs/commons").typeOf;
var deepEqualFactory = require("../deep-equal").use;
var isMatcher = require("./is-matcher");
var keys = Object.keys;
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
/**
* Matches `actual` with `expectation`
*
@ -21,7 +26,13 @@ function matchObject(actual, expectation, matcher) {
return false;
}
return every(Object.keys(expectation), function(key) {
var expectedKeys = keys(expectation);
/* istanbul ignore else: cannot collect coverage for engine that doesn't support Symbol */
if (typeOf(getOwnPropertySymbols) === "function") {
expectedKeys = concat(expectedKeys, getOwnPropertySymbols(expectation));
}
return every(expectedKeys, function (key) {
var exp = expectation[key];
var act = actual[key];

View file

@ -1,12 +1,12 @@
"use strict";
var matcherPrototype = {
toString: function() {
toString: function () {
return this.message;
}
},
};
matcherPrototype.or = function(valueOrMatcher) {
matcherPrototype.or = function (valueOrMatcher) {
var createMatcher = require("../create-matcher");
var isMatcher = createMatcher.isMatcher;
@ -19,14 +19,14 @@ matcherPrototype.or = function(valueOrMatcher) {
: createMatcher(valueOrMatcher);
var m1 = this;
var or = Object.create(matcherPrototype);
or.test = function(actual) {
or.test = function (actual) {
return m1.test(actual) || m2.test(actual);
};
or.message = m1.message + ".or(" + m2.message + ")";
or.message = `${m1.message}.or(${m2.message})`;
return or;
};
matcherPrototype.and = function(valueOrMatcher) {
matcherPrototype.and = function (valueOrMatcher) {
var createMatcher = require("../create-matcher");
var isMatcher = createMatcher.isMatcher;
@ -39,10 +39,10 @@ matcherPrototype.and = function(valueOrMatcher) {
: createMatcher(valueOrMatcher);
var m1 = this;
var and = Object.create(matcherPrototype);
and.test = function(actual) {
and.test = function (actual) {
return m1.test(actual) && m2.test(actual);
};
and.message = m1.message + ".and(" + m2.message + ")";
and.message = `${m1.message}.and(${m2.message})`;
return and;
};

View file

@ -8,54 +8,54 @@ var valueToString = require("@sinonjs/commons").valueToString;
var matchObject = require("./match-object");
var createTypeMap = function(match) {
var createTypeMap = function (match) {
return {
function: function(m, expectation, message) {
function: function (m, expectation, message) {
m.test = expectation;
m.message = message || "match(" + functionName(expectation) + ")";
m.message = message || `match(${functionName(expectation)})`;
},
number: function(m, expectation) {
m.test = function(actual) {
number: function (m, expectation) {
m.test = function (actual) {
// we need type coercion here
return expectation == actual; // eslint-disable-line eqeqeq
};
},
object: function(m, expectation) {
object: function (m, expectation) {
var array = [];
if (typeof expectation.test === "function") {
m.test = function(actual) {
m.test = function (actual) {
return expectation.test(actual) === true;
};
m.message = "match(" + functionName(expectation.test) + ")";
m.message = `match(${functionName(expectation.test)})`;
return m;
}
array = map(Object.keys(expectation), function(key) {
return key + ": " + valueToString(expectation[key]);
array = map(Object.keys(expectation), function (key) {
return `${key}: ${valueToString(expectation[key])}`;
});
m.test = function(actual) {
m.test = function (actual) {
return matchObject(actual, expectation, match);
};
m.message = "match(" + join(array, ", ") + ")";
m.message = `match(${join(array, ", ")})`;
return m;
},
regexp: function(m, expectation) {
m.test = function(actual) {
regexp: function (m, expectation) {
m.test = function (actual) {
return typeof actual === "string" && expectation.test(actual);
};
},
string: function(m, expectation) {
m.test = function(actual) {
string: function (m, expectation) {
m.test = function (actual) {
return (
typeof actual === "string" &&
stringIndexOf(actual, expectation) !== -1
);
};
m.message = 'match("' + expectation + '")';
}
m.message = `match("${expectation}")`;
},
};
};

View file

@ -24,7 +24,7 @@ function createSet(array) {
var items = typeOf(array) === "array" ? array : [];
var set = new Set();
forEach(items, function(item) {
forEach(items, function (item) {
set.add(item);
});

View file

@ -39,19 +39,19 @@ var complex1 = {
// eslint-disable-next-line no-undef
new Map(),
new Set(),
// eslint-disable-next-line no-undef, ie11/no-weak-collections
// eslint-disable-next-line no-undef
new WeakMap(),
// eslint-disable-next-line no-undef, ie11/no-weak-collections
new WeakSet()
]
}
}
// eslint-disable-next-line no-undef
new WeakSet(),
],
},
},
};
var complex2 = Object.create(complex1);
var cyclic1 = {
"4a092cd1-225e-4739-8331-d6564aafb702":
"d0cebbe0-23fb-4cc4-8fa0-ef11ceedf12e"
"d0cebbe0-23fb-4cc4-8fa0-ef11ceedf12e",
};
cyclic1.cyclicRef = cyclic1;
@ -59,14 +59,14 @@ var cyclic2 = Object.create(cyclic1);
// add tests
suite
.add("complex objects", function() {
.add("complex objects", function () {
return deepEqual(complex1, complex2);
})
.add("cyclic references", function() {
.add("cyclic references", function () {
return deepEqual(cyclic1, cyclic2);
})
// add listeners
.on("cycle", function(event) {
.on("cycle", function (event) {
// eslint-disable-next-line no-console
console.log(String(event.target));
})

View file

@ -117,6 +117,10 @@ function deepEqualCyclic(actual, expectation, match) {
}
}
if (actualObj instanceof Promise && expectationObj instanceof Promise) {
return actualObj === expectationObj;
}
if (actualObj instanceof Error && expectationObj instanceof Error) {
return actualObj === expectationObj;
}
@ -176,7 +180,7 @@ function deepEqualCyclic(actual, expectation, match) {
}
var mapsDeeplyEqual = true;
mapForEach(actualObj, function(value, key) {
mapForEach(actualObj, function (value, key) {
mapsDeeplyEqual =
mapsDeeplyEqual &&
deepEqualCyclic(value, expectationObj.get(key));
@ -185,7 +189,7 @@ function deepEqualCyclic(actual, expectation, match) {
return mapsDeeplyEqual;
}
return every(expectationKeysAndSymbols, function(key) {
return every(expectationKeysAndSymbols, function (key) {
if (!hasOwnProperty(actualObj, key)) {
return false;
}
@ -210,11 +214,11 @@ function deepEqualCyclic(actual, expectation, match) {
var newActualPath =
actualIndex !== -1
? actualPaths[actualIndex]
: actualPath + "[" + JSON.stringify(key) + "]";
: `${actualPath}[${JSON.stringify(key)}]`;
var newExpectationPath =
expectationIndex !== -1
? expectationPaths[expectationIndex]
: expectationPath + "[" + JSON.stringify(key) + "]";
: `${expectationPath}[${JSON.stringify(key)}]`;
var combinedPath = newActualPath + newExpectationPath;
// stop recursion if current objects are already compared
@ -251,7 +255,7 @@ function deepEqualCyclic(actual, expectation, match) {
})(actual, expectation, "$1", "$2");
}
deepEqualCyclic.use = function(match) {
deepEqualCyclic.use = function (match) {
return function deepEqual(a, b) {
return deepEqualCyclic(a, b, match);
};

View file

@ -14,9 +14,9 @@ var forEach = require("@sinonjs/commons").prototypes.set.forEach;
*/
function isSubset(s1, s2, compare) {
var allContained = true;
forEach(s1, function(v1) {
forEach(s1, function (v1) {
var includes = false;
forEach(s2, function(v2) {
forEach(s2, function (v2) {
if (compare(v2, v1)) {
includes = true;
}

View file

@ -29,9 +29,9 @@ function iterableToString(obj) {
function mapToString(map) {
var representation = "";
/* eslint-disable-next-line local-rules/no-prototype-methods */
map.forEach(function(value, key) {
representation += "[" + stringify(key) + "," + stringify(value) + "],";
// eslint-disable-next-line @sinonjs/no-prototype-methods/no-prototype-methods
map.forEach(function (value, key) {
representation += `[${stringify(key)},${stringify(value)}],`;
});
representation = slice(representation, 0, -1);
@ -48,9 +48,9 @@ function mapToString(map) {
function genericIterableToString(iterable) {
var representation = "";
/* eslint-disable-next-line local-rules/no-prototype-methods */
iterable.forEach(function(value) {
representation += stringify(value) + ",";
// eslint-disable-next-line @sinonjs/no-prototype-methods/no-prototype-methods
iterable.forEach(function (value) {
representation += `${stringify(value)},`;
});
representation = slice(representation, 0, -1);
@ -65,7 +65,7 @@ function genericIterableToString(iterable) {
* @returns {string} A string representation of `item`
*/
function stringify(item) {
return typeof item === "string" ? "'" + item + "'" : valueToString(item);
return typeof item === "string" ? `'${item}'` : valueToString(item);
}
module.exports = iterableToString;

View file

@ -167,7 +167,7 @@ function match(object, matcherOrValue) {
}
/* eslint-enable complexity */
forEach(Object.keys(createMatcher), function(key) {
forEach(Object.keys(createMatcher), function (key) {
match[key] = createMatcher[key];
});

View file

@ -22,5 +22,5 @@ module.exports = {
isMap: isMap,
isNegZero: isNegZero,
isSet: isSet,
match: match
match: match,
};

View file

@ -1,23 +1,23 @@
{
"name": "@sinonjs/samsam",
"version": "5.0.3",
"version": "6.0.2",
"description": "Value identification and comparison functions",
"homepage": "http://sinonjs.github.io/samsam/",
"author": "Christian Johansen",
"license": "BSD-3-Clause",
"main": "./lib/samsam",
"types": "./types/samsam.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/sinonjs/samsam.git"
},
"lint-staged": {
"*.{js,css,md}": "prettier --check",
"*.js": "eslint"
},
"scripts": {
"benchmark": "node lib/deep-equal-benchmark.js",
"build": "run-s build:dist-folder build:bundle",
"build:bundle": "rollup -c",
"build:dist-folder": "mkdirp dist",
"build": "rm -rf types && tsc",
"jsdoc": "jsdoc -c jsdoc.conf.json",
"lint": "eslint .",
"prepublishOnly": "npm run build && mkdocs gh-deploy -r upstream || mkdocs gh-deploy -r origin",
@ -26,6 +26,8 @@
"test-check-coverage": "npm run test-coverage && nyc check-coverage --branches 100 --functions 100 --lines 100",
"test-coverage": "nyc --all --reporter text --reporter html --reporter lcovonly npm run test",
"test-headless": "mochify --no-detect-globals --recursive -R dot --plugin [ proxyquire-universal ] \"./lib/*.test.js\"",
"prettier:check": "prettier --check '**/*.{js,css,md}'",
"prettier:write": "prettier --write '**/*.{js,css,md}'",
"preversion": "npm run test-check-coverage",
"version": "changes --commits --footer",
"postversion": "git push --follow-tags && npm publish --access public"
@ -35,10 +37,10 @@
"jsdom-global": false
},
"files": [
"dist/",
"docs/",
"lib/",
"!lib/**/*.test.js"
"!lib/**/*.test.js",
"types/"
],
"dependencies": {
"@sinonjs/commons": "^1.6.0",
@ -46,17 +48,11 @@
"type-detect": "^4.0.8"
},
"devDependencies": {
"@sinonjs/referee": "^4.0.0",
"@sinonjs/eslint-config": "^4.0.0",
"@sinonjs/eslint-plugin-no-prototype-methods": "^0.1.0",
"@sinonjs/referee": "^5.0.0",
"@studio/changes": "^2.0.0",
"benchmark": "2.1.4",
"eslint": "^6.2.0",
"eslint-config-prettier": "^6.1.0",
"eslint-config-sinon": "^3.0.1",
"eslint-plugin-ie11": "^1.0.0",
"eslint-plugin-jsdoc": "^21.0.0",
"eslint-plugin-local-rules": "^0.1.1",
"eslint-plugin-mocha": "^6.0.0",
"eslint-plugin-prettier": "^3.1.0",
"husky": "^4.2.1",
"jquery": "^3.4.1",
"jsdoc": "^3.6.3",
@ -67,14 +63,12 @@
"mkdirp": "^1.0.3",
"mocha": "^7.0.1",
"mochify": "^6.6.0",
"npm-run-all": "^4.1.2",
"nyc": "^15.0.0",
"prettier": "^1.18.2",
"prettier": "^2.2.1",
"proxyquire": "^2.1.3",
"proxyquire-universal": "^2.1.0",
"proxyquireify": "^3.2.1",
"rollup": "^1.23.0",
"rollup-plugin-commonjs": "^10.1.0"
"typescript": "^4.0.5"
},
"nyc": {
"exclude": [
@ -87,5 +81,10 @@
"rollup.config.js",
"lib/deep-equal-benchmark.js"
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
}
}

2
node_modules/@sinonjs/samsam/types/array-types.d.ts generated vendored Normal file
View file

@ -0,0 +1,2 @@
export = ARRAY_TYPES;
declare var ARRAY_TYPES: (ArrayConstructor | Int8ArrayConstructor)[];

40
node_modules/@sinonjs/samsam/types/create-matcher.d.ts generated vendored Normal file
View file

@ -0,0 +1,40 @@
export = createMatcher;
/**
* Creates a matcher object for the passed expectation
*
* @alias module:samsam.createMatcher
* @param {*} expectation An expecttation
* @param {string} message A message for the expectation
* @returns {object} A matcher object
*/
declare function createMatcher(expectation: any, message: string, ...args: any[]): object;
declare namespace createMatcher {
export { isMatcher };
export const any: any;
export const defined: any;
export const truthy: any;
export const falsy: any;
export function same(expectation: any): any;
function _in(arrayOfExpectations: any): any;
export { _in as in };
export function typeOf(type: any): any;
export function instanceOf(type: any): any;
export const has: any;
export const hasOwn: any;
export function hasNested(property: any, value: any, ...args: any[]): any;
export function json(value: any): any;
export function every(predicate: any): any;
export function some(predicate: any): any;
export const array: any;
export const map: any;
export const set: any;
export const bool: any;
export const number: any;
export const string: any;
export const object: any;
export const func: any;
export const regexp: any;
export const date: any;
export const symbol: any;
}
declare var isMatcher: typeof import("./create-matcher/is-matcher");

View file

@ -0,0 +1,8 @@
export = assertMatcher;
/**
* Throws a TypeError when `value` is not a matcher
*
* @private
* @param {*} value The value to examine
*/
declare function assertMatcher(value: any): void;

View file

@ -0,0 +1,12 @@
export = assertMethodExists;
/**
* Throws a TypeError when expected method doesn't exist
*
* @private
* @param {*} value A value to examine
* @param {string} method The name of the method to look for
* @param {name} name A name to use for the error message
* @param {string} methodPath The name of the method to use for error messages
* @throws {TypeError} When the method doesn't exist
*/
declare function assertMethodExists(value: any, method: string, name: never, methodPath: string): void;

View file

@ -0,0 +1,12 @@
export = assertType;
/**
* Ensures that value is of type
*
* @private
* @param {*} value A value to examine
* @param {string} type A basic JavaScript type to compare to, e.g. "object", "string"
* @param {string} name A string to use for the error message
* @throws {TypeError} If value is not of the expected type
* @returns {undefined}
*/
declare function assertType(value: any, type: string, name: string): undefined;

View file

@ -0,0 +1,9 @@
export = isIterable;
/**
* Returns `true` for iterables
*
* @private
* @param {*} value A value to examine
* @returns {boolean} Returns `true` when `value` looks like an iterable
*/
declare function isIterable(value: any): boolean;

View file

@ -0,0 +1,9 @@
export = isMatcher;
/**
* Returns `true` when `object` is a matcher
*
* @private
* @param {*} object A value to examine
* @returns {boolean} Returns `true` when `object` is a matcher
*/
declare function isMatcher(object: any): boolean;

View file

@ -0,0 +1,11 @@
export = matchObject;
/**
* Matches `actual` with `expectation`
*
* @private
* @param {*} actual A value to examine
* @param {object} expectation An object with properties to match on
* @param {object} matcher A matcher to use for comparison
* @returns {boolean} Returns true when `actual` matches all properties in `expectation`
*/
declare function matchObject(actual: any, expectation: object, matcher: object): boolean;

View file

@ -0,0 +1,2 @@
export function or(valueOrMatcher: any, ...args: any[]): any;
export function and(valueOrMatcher: any, ...args: any[]): any;

View file

@ -0,0 +1,8 @@
export = createTypeMap;
declare function createTypeMap(match: any): {
function: (m: any, expectation: any, message: any) => void;
number: (m: any, expectation: any) => void;
object: (m: any, expectation: any) => any;
regexp: (m: any, expectation: any) => void;
string: (m: any, expectation: any) => void;
};

13
node_modules/@sinonjs/samsam/types/create-set.d.ts generated vendored Normal file
View file

@ -0,0 +1,13 @@
export = createSet;
/**
* This helper makes it convenient to create Set instances from a
* collection, an overcomes the shortcoming that IE11 doesn't support
* collection arguments
*
* @private
* @param {Array} array An array to create a set from
* @returns {Set} A set (unique) containing the members from array
*
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
*/
declare function createSet(array: any[], ...args: any[]): any;

View file

@ -0,0 +1 @@
export {};

22
node_modules/@sinonjs/samsam/types/deep-equal.d.ts generated vendored Normal file
View file

@ -0,0 +1,22 @@
export = deepEqualCyclic;
/**
* Deep equal comparison. Two values are "deep equal" when:
*
* - They are equal, according to samsam.identical
* - They are both date objects representing the same time
* - They are both arrays containing elements that are all deepEqual
* - They are objects with the same set of properties, and each property
* in ``actual`` is deepEqual to the corresponding property in ``expectation``
*
* Supports cyclic objects.
*
* @alias module:samsam.deepEqual
* @param {*} actual The object to examine
* @param {*} expectation The object actual is expected to be equal to
* @param {object} match A value to match on
* @returns {boolean} Returns true when actual and expectation are considered equal
*/
declare function deepEqualCyclic(actual: any, expectation: any, match: object): boolean;
declare namespace deepEqualCyclic {
function use(match: any): (a: any, b: any) => boolean;
}

11
node_modules/@sinonjs/samsam/types/get-class.d.ts generated vendored Normal file
View file

@ -0,0 +1,11 @@
export = getClass;
/**
* Returns the internal `Class` by calling `Object.prototype.toString`
* with the provided value as `this`. Return value is a `String`, naming the
* internal class, e.g. "Array"
*
* @private
* @param {*} value - Any value
* @returns {string} - A string representation of the `Class` of `value`
*/
declare function getClass(value: any): string;

19
node_modules/@sinonjs/samsam/types/identical.d.ts generated vendored Normal file
View file

@ -0,0 +1,19 @@
export = identical;
/**
* Strict equality check according to EcmaScript Harmony's `egal`.
*
* **From the Harmony wiki:**
* > An `egal` function simply makes available the internal `SameValue` function
* > from section 9.12 of the ES5 spec. If two values are egal, then they are not
* > observably distinguishable.
*
* `identical` returns `true` when `===` is `true`, except for `-0` and
* `+0`, where it returns `false`. Additionally, it returns `true` when
* `NaN` is compared to itself.
*
* @alias module:samsam.identical
* @param {*} obj1 The first value to compare
* @param {*} obj2 The second value to compare
* @returns {boolean} Returns `true` when the objects are *egal*, `false` otherwise
*/
declare function identical(obj1: any, obj2: any): boolean;

9
node_modules/@sinonjs/samsam/types/is-arguments.d.ts generated vendored Normal file
View file

@ -0,0 +1,9 @@
export = isArguments;
/**
* Returns `true` when `object` is an `arguments` object, `false` otherwise
*
* @alias module:samsam.isArguments
* @param {*} object - The object to examine
* @returns {boolean} `true` when `object` is an `arguments` object
*/
declare function isArguments(object: any): boolean;

View file

@ -0,0 +1,9 @@
export = isArrayType;
/**
* Returns `true` when `object` is an array type, `false` otherwise
*
* @param {*} object - The object to examine
* @returns {boolean} `true` when `object` is an array type
* @private
*/
declare function isArrayType(object: any): boolean;

9
node_modules/@sinonjs/samsam/types/is-date.d.ts generated vendored Normal file
View file

@ -0,0 +1,9 @@
export = isDate;
/**
* Returns `true` when `value` is an instance of Date
*
* @private
* @param {Date} value The value to examine
* @returns {boolean} `true` when `value` is an instance of Date
*/
declare function isDate(value: Date): boolean;

13
node_modules/@sinonjs/samsam/types/is-element.d.ts generated vendored Normal file
View file

@ -0,0 +1,13 @@
export = isElement;
/**
* Returns `true` when `object` is a DOM element node.
*
* Unlike Underscore.js/lodash, this function will return `false` if `object`
* is an *element-like* object, i.e. a regular object with a `nodeType`
* property that holds the value `1`.
*
* @alias module:samsam.isElement
* @param {object} object The object to examine
* @returns {boolean} Returns `true` for DOM element nodes
*/
declare function isElement(object: object): boolean;

9
node_modules/@sinonjs/samsam/types/is-map.d.ts generated vendored Normal file
View file

@ -0,0 +1,9 @@
export = isMap;
/**
* Returns `true` when `value` is a Map
*
* @param {*} value A value to examine
* @returns {boolean} `true` when `value` is an instance of `Map`, `false` otherwise
* @private
*/
declare function isMap(value: any): boolean;

9
node_modules/@sinonjs/samsam/types/is-nan.d.ts generated vendored Normal file
View file

@ -0,0 +1,9 @@
export = isNaN;
/**
* Compares a `value` to `NaN`
*
* @private
* @param {*} value A value to examine
* @returns {boolean} Returns `true` when `value` is `NaN`
*/
declare function isNaN(value: any): boolean;

9
node_modules/@sinonjs/samsam/types/is-neg-zero.d.ts generated vendored Normal file
View file

@ -0,0 +1,9 @@
export = isNegZero;
/**
* Returns `true` when `value` is `-0`
*
* @alias module:samsam.isNegZero
* @param {*} value A value to examine
* @returns {boolean} Returns `true` when `value` is `-0`
*/
declare function isNegZero(value: any): boolean;

16
node_modules/@sinonjs/samsam/types/is-object.d.ts generated vendored Normal file
View file

@ -0,0 +1,16 @@
export = isObject;
/**
* Returns `true` when the value is a regular Object and not a specialized Object
*
* This helps speed up deepEqual cyclic checks
*
* The premise is that only Objects are stored in the visited array.
* So if this function returns false, we don't have to do the
* expensive operation of searching for the value in the the array of already
* visited objects
*
* @private
* @param {object} value The object to examine
* @returns {boolean} `true` when the object is a non-specialised object
*/
declare function isObject(value: object): boolean;

9
node_modules/@sinonjs/samsam/types/is-set.d.ts generated vendored Normal file
View file

@ -0,0 +1,9 @@
export = isSet;
/**
* Returns `true` when the argument is an instance of Set, `false` otherwise
*
* @alias module:samsam.isSet
* @param {*} val - A value to examine
* @returns {boolean} Returns `true` when the argument is an instance of Set, `false` otherwise
*/
declare function isSet(val: any): boolean;

12
node_modules/@sinonjs/samsam/types/is-subset.d.ts generated vendored Normal file
View file

@ -0,0 +1,12 @@
export = isSubset;
/**
* Returns `true` when `s1` is a subset of `s2`, `false` otherwise
*
* @private
* @param {Array|Set} s1 The target value
* @param {Array|Set} s2 The containing value
* @param {Function} compare A comparison function, should return `true` when
* values are considered equal
* @returns {boolean} Returns `true` when `s1` is a subset of `s2`, `false`` otherwise
*/
declare function isSubset(s1: any[] | any, s2: any[] | any, compare: Function): boolean;

View file

@ -0,0 +1,9 @@
export = iterableToString;
/**
* Creates a string represenation of an iterable object
*
* @private
* @param {object} obj The iterable object to stringify
* @returns {string} A string representation
*/
declare function iterableToString(obj: object): string;

10
node_modules/@sinonjs/samsam/types/match.d.ts generated vendored Normal file
View file

@ -0,0 +1,10 @@
export = match;
/**
* Matches an object with a matcher (or value)
*
* @alias module:samsam.match
* @param {object} object The object candidate to match
* @param {object} matcherOrValue A matcher or value to match against
* @returns {boolean} true when `object` matches `matcherOrValue`
*/
declare function match(object: object, matcherOrValue: object): boolean;

13
node_modules/@sinonjs/samsam/types/samsam.d.ts generated vendored Normal file
View file

@ -0,0 +1,13 @@
export var createMatcher: typeof import("./create-matcher");
declare var deepEqualCyclic: (a: any, b: any) => boolean;
/**
* @module samsam
*/
export var identical: typeof import("./identical");
export var isArguments: typeof import("./is-arguments");
export var isElement: typeof import("./is-element");
export var isMap: typeof import("./is-map");
export var isNegZero: typeof import("./is-neg-zero");
export var isSet: typeof import("./is-set");
export var match: typeof import("./match");
export { deepEqualCyclic as deepEqual };