Socket
Socket
Sign inDemoInstall

expect

Package Overview
Dependencies
Maintainers
2
Versions
237
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expect - npm Package Compare versions

Comparing version 1.16.0 to 1.17.0

lib/arrayContains.js

37

CHANGES.md

@@ -0,3 +1,38 @@

## [HEAD]
- Added support for objects in `toExclude` ([#86], thanks @calebmer)
- Added `toIncludeKeys` and `toExcludeKeys` ([#87], thanks @calebmer)
- Added `toNotInclude` alias for `toExclude`
- Deprecated `withContext` and `withArgs`. Use a closure instead.
- Updated `is-equal` and `object-inspect` dependencies
[HEAD]: https://github.com/mjackson/expect/compare/latest...HEAD
[#86]: https://github.com/mjackson/expect/pull/86
[#87]: https://github.com/mjackson/expect/pull/87
## [v1.16.0]
> Mar 23, 1016
- Added support for objects in `toInclude` (thanks @elado)
- Minor fixes to docs
[v1.16.0]: https://github.com/mjackson/expect/compare/v1.15.2...v1.16.0
## [v1.15.2]
> Mar 11, 2016
- Removed named exports, fixed a bad 1.15.0 release ([#72])
[#72]: https://github.com/mjackson/expect/issues/72
[v1.15.2]: https://github.com/mjackson/expect/compare/v1.15.0...v1.15.2
## [v1.15.0]
> Mar 10, 2016
- Various build system improvements
[v1.15.0]: https://github.com/mjackson/expect/compare/v1.14.0...v1.15.0
## [v1.14.0]
> Feb 1, 2015
> Feb 1, 2016

@@ -4,0 +39,0 @@ - Added `toBeGreaterThanOrEqualTo` and `toBeLessThanOrEqualTo` ([#11] and [#59])

192

lib/Expectation.js

@@ -7,2 +7,4 @@ 'use strict';

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

@@ -18,2 +20,6 @@

var _has = require('has');
var _has2 = _interopRequireDefault(_has);
var _assert = require('./assert');

@@ -31,2 +37,14 @@

var addErrorInfo = function addErrorInfo(actual, expected, callback) {
try {
callback();
} catch (error) {
// These attributes are consumed by Mocha to produce a diff output.
error.actual = actual;
error.expected = expected;
error.showDiff = true;
throw error;
}
};
/**

@@ -81,12 +99,8 @@ * An Expectation is a wrapper around an assertion that allows it to be written

value: function toEqual(value, message) {
try {
(0, _assert2.default)((0, _isEqual2.default)(this.actual, value), message || 'Expected %s to equal %s', this.actual, value);
} catch (e) {
// These attributes are consumed by Mocha to produce a diff output.
e.showDiff = true;
e.actual = this.actual;
e.expected = value;
throw e;
}
var _this = this;
addErrorInfo(this.actual, value, function () {
(0, _assert2.default)((0, _isEqual2.default)(_this.actual, value), message || 'Expected %s to equal %s', _this.actual, value);
});
return this;

@@ -97,4 +111,8 @@ }

value: function toNotEqual(value, message) {
(0, _assert2.default)(!(0, _isEqual2.default)(this.actual, value), message || 'Expected %s to not equal %s', this.actual, value);
var _this2 = this;
addErrorInfo(this.actual, value, function () {
(0, _assert2.default)(!(0, _isEqual2.default)(_this2.actual, value), message || 'Expected %s to not equal %s', _this2.actual, value);
});
return this;

@@ -207,4 +225,2 @@ }

value: function toInclude(value, compareValues, message) {
(0, _assert2.default)((0, _TestUtils.isArray)(this.actual) || (0, _TestUtils.isObject)(this.actual) || typeof this.actual === 'string', 'The "actual" argument in expect(actual).toInclude() must be an array, object, or a string');
if (typeof compareValues === 'string') {

@@ -215,12 +231,18 @@ message = compareValues;

message = message || 'Expected %s to include %s';
if (compareValues == null) compareValues = _isEqual2.default;
var contains = false;
if ((0, _TestUtils.isArray)(this.actual)) {
(0, _assert2.default)((0, _TestUtils.arrayContains)(this.actual, value, compareValues), message, this.actual, value);
contains = (0, _TestUtils.arrayContains)(this.actual, value, compareValues);
} else if ((0, _TestUtils.isObject)(this.actual)) {
(0, _assert2.default)((0, _TestUtils.objectContains)(this.actual, value, compareValues), message, this.actual, value);
contains = (0, _TestUtils.objectContains)(this.actual, value, compareValues);
} else if (typeof this.actual === 'string') {
contains = (0, _TestUtils.stringContains)(this.actual, value);
} else {
(0, _assert2.default)((0, _TestUtils.stringContains)(this.actual, value), message, this.actual, value);
(0, _assert2.default)(false, 'The "actual" argument in expect(actual).toInclude() must be an array, object, or a string');
}
(0, _assert2.default)(contains, message || 'Expected %s to include %s', this.actual, value);
return this;

@@ -231,4 +253,2 @@ }

value: function toExclude(value, compareValues, message) {
(0, _assert2.default)((0, _TestUtils.isArray)(this.actual) || typeof this.actual === 'string', 'The "actual" argument in expect(actual).toExclude() must be an array or a string');
if (typeof compareValues === 'string') {

@@ -239,13 +259,83 @@ message = compareValues;

message = message || 'Expected %s to exclude %s';
if (compareValues == null) compareValues = _isEqual2.default;
var contains = false;
if ((0, _TestUtils.isArray)(this.actual)) {
(0, _assert2.default)(!(0, _TestUtils.arrayContains)(this.actual, value, compareValues), message, this.actual, value);
contains = (0, _TestUtils.arrayContains)(this.actual, value, compareValues);
} else if ((0, _TestUtils.isObject)(this.actual)) {
contains = (0, _TestUtils.objectContains)(this.actual, value, compareValues);
} else if (typeof this.actual === 'string') {
contains = (0, _TestUtils.stringContains)(this.actual, value);
} else {
(0, _assert2.default)(!(0, _TestUtils.stringContains)(this.actual, value), message, this.actual, value);
(0, _assert2.default)(false, 'The "actual" argument in expect(actual).toExclude() must be an array, object, or a string');
}
(0, _assert2.default)(!contains, message || 'Expected %s to exclude %s', this.actual, value);
return this;
}
}, {
key: 'toIncludeKeys',
value: function toIncludeKeys(keys, comparator, message) {
var _this3 = this;
if (typeof comparator === 'string') {
message = comparator;
comparator = null;
}
if (comparator == null) comparator = _has2.default;
(0, _assert2.default)(_typeof(this.actual) === 'object', 'The "actual" argument in expect(actual).toIncludeKeys() must be an object, not %s', _typeof(this.actual));
var contains = keys.every(function (key) {
return comparator(_this3.actual, key);
});
(0, _assert2.default)(contains, message || 'Expected %s to include key(s) %s', this.actual, keys.join(', '));
return this;
}
}, {
key: 'toIncludeKey',
value: function toIncludeKey(key) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
return this.toIncludeKeys.apply(this, [[key]].concat(args));
}
}, {
key: 'toExcludeKeys',
value: function toExcludeKeys(keys, comparator, message) {
var _this4 = this;
if (typeof comparator === 'string') {
message = comparator;
comparator = null;
}
if (comparator == null) comparator = _has2.default;
(0, _assert2.default)(_typeof(this.actual) === 'object', 'The "actual" argument in expect(actual).toExcludeKeys() must be an object, not %s', _typeof(this.actual));
var contains = keys.every(function (key) {
return comparator(_this4.actual, key);
});
(0, _assert2.default)(!contains, message || 'Expected %s to exclude key(s) %s', this.actual, keys.join(', '));
return this;
}
}, {
key: 'toExcludeKey',
value: function toExcludeKey(key) {
for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
args[_key2 - 1] = arguments[_key2];
}
return this.toExcludeKeys.apply(this, [[key]].concat(args));
}
}, {
key: 'toHaveBeenCalled',

@@ -264,4 +354,4 @@ value: function toHaveBeenCalled(message) {

value: function toHaveBeenCalledWith() {
for (var _len = arguments.length, expectedArgs = Array(_len), _key = 0; _key < _len; _key++) {
expectedArgs[_key] = arguments[_key];
for (var _len3 = arguments.length, expectedArgs = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
expectedArgs[_key3] = arguments[_key3];
}

@@ -290,27 +380,42 @@

}
}, {
key: 'withContext',
value: function withContext(context) {
(0, _assert2.default)((0, _TestUtils.isFunction)(this.actual), 'The "actual" argument in expect(actual).withContext() must be a function');
}]);
this.context = context;
return Expectation;
}();
return this;
var deprecate = function deprecate(fn, message) {
var alreadyWarned = false;
return function () {
if (!alreadyWarned) {
alreadyWarned = true;
console.warn(message);
}
}, {
key: 'withArgs',
value: function withArgs() {
var _args;
(0, _assert2.default)((0, _TestUtils.isFunction)(this.actual), 'The "actual" argument in expect(actual).withArgs() must be a function');
for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
args[_key4] = arguments[_key4];
}
if (arguments.length) this.args = (_args = this.args).concat.apply(_args, arguments);
return fn.apply(this, args);
};
};
return this;
}
}]);
Expectation.prototype.withContext = deprecate(function (context) {
(0, _assert2.default)((0, _TestUtils.isFunction)(this.actual), 'The "actual" argument in expect(actual).withContext() must be a function');
return Expectation;
}();
this.context = context;
return this;
}, '\nwithContext is deprecated; use a closure instead.\n\n expect(fn).withContext(context).toThrow()\n\nbecomes\n\n expect(() => fn.call(context)).toThrow()\n');
Expectation.prototype.withArgs = deprecate(function () {
var _args;
(0, _assert2.default)((0, _TestUtils.isFunction)(this.actual), 'The "actual" argument in expect(actual).withArgs() must be a function');
if (arguments.length) this.args = (_args = this.args).concat.apply(_args, arguments);
return this;
}, '\nwithArgs is deprecated; use a closure instead.\n\n expect(fn).withArgs(a, b, c).toThrow()\n\nbecomes\n\n expect(() => fn(a, b, c)).toThrow()\n');
var aliases = {

@@ -324,3 +429,8 @@ toBeAn: 'toBeA',

toContain: 'toInclude',
toNotContain: 'toExclude'
toNotInclude: 'toExclude',
toNotContain: 'toExclude',
toContainKeys: 'toIncludeKeys',
toNotContainKeys: 'toExcludeKeys',
toContainKey: 'toIncludeKey',
toNotContainKey: 'toExcludeKey'
};

@@ -327,0 +437,0 @@

@@ -10,6 +10,2 @@ 'use strict';

var _isEqual = require('is-equal');
var _isEqual2 = _interopRequireDefault(_isEqual);
var _isRegex = require('is-regex');

@@ -19,2 +15,6 @@

var _objectKeys = require('object-keys');
var _objectKeys2 = _interopRequireDefault(_objectKeys);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -90,4 +90,2 @@

var arrayContains = exports.arrayContains = function arrayContains(array, value, compareValues) {
if (compareValues == null) compareValues = _isEqual2.default;
return array.some(function (item) {

@@ -98,2 +96,18 @@ return compareValues(item, value) !== false;

var ownEnumerableKeys = function ownEnumerableKeys(object) {
if ((typeof Reflect === 'undefined' ? 'undefined' : _typeof(Reflect)) === 'object' && typeof Reflect.ownKeys === 'function') {
return Reflect.ownKeys(object).filter(function (key) {
return Object.getOwnPropertyDescriptor(object, key).enumerable;
});
}
if (typeof Object.getOwnPropertySymbols === 'function') {
return Object.getOwnPropertySymbols(object).filter(function (key) {
return Object.getOwnPropertyDescriptor(object, key).enumerable;
}).concat((0, _objectKeys2.default)(object));
}
return (0, _objectKeys2.default)(object);
};
/**

@@ -105,9 +119,5 @@ * Returns true if the given object contains the value, false

var objectContains = exports.objectContains = function objectContains(object, value, compareValues) {
if (compareValues == null) compareValues = _isEqual2.default;
return ownEnumerableKeys(value).every(function (k) {
if (isObject(object[k]) && isObject(value[k])) return objectContains(object[k], value[k], compareValues);
return Object.keys(value).every(function (k) {
if (isObject(object[k])) {
return objectContains(object[k], value[k], compareValues);
}
return compareValues(object[k], value[k]);

@@ -114,0 +124,0 @@ });

{
"name": "expect",
"version": "1.16.0",
"version": "1.17.0",
"description": "Write better assertions",

@@ -23,26 +23,28 @@ "author": "Michael Jackson",

"dependencies": {
"is-equal": "^1.4.2",
"has": "^1.0.1",
"is-equal": "^1.5.1",
"is-regex": "^1.0.3",
"object-inspect": "^1.0.2"
"object-inspect": "^1.1.0",
"object-keys": "^1.0.9"
},
"devDependencies": {
"babel-cli": "^6.6.5",
"babel-eslint": "^5.0.0",
"babel-eslint": "^6.0.0",
"babel-loader": "^6.2.4",
"babel-preset-es2015": "^6.6.0",
"eslint": "2.2.0",
"eslint-config-airbnb": "^6.1.0",
"eslint-plugin-react": "^4.2.1",
"eslint": "^2.5.1",
"eslint-config-airbnb": "^6.2.0",
"eslint-plugin-react": "^4.2.3",
"gzip-size": "^3.0.0",
"karma": "^0.13.3",
"karma-browserstack-launcher": "^0.1.6",
"karma-chrome-launcher": "^0.2.0",
"karma-mocha": "^0.2.0",
"karma-mocha-reporter": "^1.0.4",
"karma-sourcemap-loader": "^0.3.5",
"karma": "^0.13.22",
"karma-browserstack-launcher": "^0.1.10",
"karma-chrome-launcher": "^0.2.3",
"karma-mocha": "^0.2.2",
"karma-mocha-reporter": "^2.0.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^1.7.0",
"mocha": "^2.0.1",
"pretty-bytes": "^2.0.1",
"mocha": "^2.4.5",
"pretty-bytes": "^3.0.1",
"readline-sync": "^1.4.1",
"webpack": "^1.4.13"
"webpack": "^1.12.14"
},

@@ -49,0 +51,0 @@ "keywords": [

@@ -100,28 +100,2 @@ # expect [![Travis][build-badge]][build] [![npm package][npm-badge]][npm]

### withArgs
> `expect(block).withArgs(...args).toThrow([error], [message])`
Asserts that the given `block` `throw`s an error when called with `args`. The `error` argument may be a constructor (to test using `instanceof`), or a string/`RegExp` to test against `error.message`.
```js
expect(function (check) {
if (check === 'bad')
throw new Error('boom!')
}).withArgs('bad').toThrow(/boom/)
```
### withContext
> `expect(block).withContext(context).toThrow([error], [message])`
Asserts that the given `block` `throw`s an error when called in the given `context`. The `error` argument may be a constructor (to test using `instanceof`), or a string/`RegExp` to test against `error.message`.
```js
expect(function () {
if (this.check === 'bad')
throw new Error('boom!')
}).withContext({ check: 'bad' }).toThrow(/boom/)
```
### toNotThrow

@@ -232,58 +206,66 @@

### (array) toInclude
### toInclude
> `expect(array).toInclude(value, [comparator], [message])`<br>
> `expect(array).toContain(value, [comparator], [message])`
> `expect(object).toInclude(value, [comparator], [message])`<br>
> `expect(string).toInclude(value, [message])`
Asserts the given `array` contains `value`. The `comparator` function, if given, should compare two objects and either `return false` or `throw` if they are not equal. It defaults to `assert.deepEqual`.
Asserts that a given `value` is included (or "contained") within another. The `actual` value may be an array, object, or a string. The `comparator` function, if given, should compare two objects and `return false` if they are not equal. The default is to use [`isEqual`](https://github.com/ljharb/is-equal).
```js
expect([ 1, 2, 3 ]).toInclude(3)
expect({ a: 1, b: 2 }).toInclude({ b: 2 })
expect({ a: 1, b: 2, c: { d: 3 } }).toInclude({ b: 2, c: { d: 3 } })
expect('hello world').toInclude('world')
```
### (array) toExclude
Aliases:
- `toContain`
### toExclude
> `expect(array).toExclude(value, [comparator], [message])`<br>
> `expect(array).toNotContain(value, [comparator], [message])`
> `expect(object).toExclude(value, [comparator], [message])`<br>
> `expect(string).toExclude(value, [message])`
Asserts the given `array` does not contain `value`. The `comparator` function, if given, should compare two objects and either `return false` or `throw` if they are not equal. It defaults to `assert.deepEqual`.
Asserts that a given `value` is not included (or "contained") within another. The `actual` value may be an array, object, or a string. The `comparator` function, if given, should compare two objects and `return false` if they are not equal. The default is to use [`isEqual`](https://github.com/ljharb/is-equal).
```js
expect([ 1, 2, 3 ]).toExclude(4)
expect({ a: 1, b: 2 }).toExclude({ c: 2 })
expect({ a: 1, b: 2 }).toExclude({ b: 3 })
expect({ a: 1, b: 2, c: { d: 3 } }).toExclude({ c: { d: 4 } })
expect('hello world').toExclude('goodbye')
```
### (object) toInclude
Aliases:
- `toNotInclude`
- `toNotContain`
> `expect(object).toInclude(value, [comparator], [message])`<br>
> `expect(object).toContain(value, [comparator], [message])`
### toIncludeKey(s)
Asserts the given `object` contains all keys and values in `value`, recursively. The `comparator` function, if given, should compare two objects and either `return false` or `throw` if they are not equal. It defaults to `assert.deepEqual`.
> `expect(object).toIncludeKeys(keys, [comparator], [message])`<br>
> `expect(object).toIncludeKey(key, [comparator], [message])`<br>
> `expect(object).toContainKeys(keys, [comparator], [message])`<br>
> `expect(object).toContainKey(key, [comparator], [message])`
```js
expect({ a: 1, b: 2 }).toInclude({ b: 2 })
expect({ a: 1, b: 2, c: { d: 3 } }).toInclude({ b: 2, c: { d: 3 } })
```
Asserts that the given `object` (may be an array, or a function, or anything with keys) contains *all* of the provided keys. The optional parameter `comparator` is a function which if given an object and a string key, it should return a boolean detailing whether or not the key exists in the object. By default, a shallow check with `Object.prototype.hasOwnProperty` is performed.
### (string) toInclude
> `expect(string).toInclude(value, [message])`<br>
> `expect(string).toContain(value, [message])`
Asserts the given `string` contains `value`.
```js
expect('hello world').toInclude('world')
expect('hello world').toContain('world')
expect({ a: 1 }).toIncludeKey('a')
expect({ a: 1, b: 2 }).toIncludeKeys([ 'a', 'b' ])
```
### (string) toExclude
### toExcludeKey(s)
> `expect(string).toExclude(value, [message])`<br>
> `expect(string).toNotContain(value, [message])`
> `expect(object).toExcludeKeys(keys, [comparator], [message])`<br>
> `expect(object).toExcludeKey(key, [comparator], [message])`<br>
> `expect(object).toNotContainKeys(keys, [comparator], [message])`<br>
> `expect(object).toNotContainKey(key, [comparator], [message])`
Asserts the given `string` does not contain `value`.
Asserts that the given `object` (may be an array, or a function, or anything with keys) does not contain *any* of the provided keys. The optional parameter `comparator` is a function which if given an object and a string key, it should return a boolean detailing whether or not the key exists in the object. By default, a shallow check with `Object.prototype.hasOwnProperty` is performed.
```js
expect('hello world').toExclude('goodbye')
expect('hello world').toNotContain('goodbye')
expect({ a: 1 }).toExcludeKey('b')
expect({ a: 1, b: 2 }).toExcludeKeys([ 'c', 'd' ])
```

@@ -414,3 +396,3 @@

```
```js
var dice = createSpy().andCall(function () {

@@ -417,0 +399,0 @@ return (Math.random() * 6) | 0

@@ -69,3 +69,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

var _extend = __webpack_require__(22);
var _extend = __webpack_require__(24);

@@ -99,2 +99,4 @@ var _extend2 = _interopRequireDefault(_extend);

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

@@ -110,2 +112,6 @@

var _has = __webpack_require__(4);
var _has2 = _interopRequireDefault(_has);
var _assert = __webpack_require__(18);

@@ -123,2 +129,14 @@

var addErrorInfo = function addErrorInfo(actual, expected, callback) {
try {
callback();
} catch (error) {
// These attributes are consumed by Mocha to produce a diff output.
error.actual = actual;
error.expected = expected;
error.showDiff = true;
throw error;
}
};
/**

@@ -173,12 +191,8 @@ * An Expectation is a wrapper around an assertion that allows it to be written

value: function toEqual(value, message) {
try {
(0, _assert2.default)((0, _isEqual2.default)(this.actual, value), message || 'Expected %s to equal %s', this.actual, value);
} catch (e) {
// These attributes are consumed by Mocha to produce a diff output.
e.showDiff = true;
e.actual = this.actual;
e.expected = value;
throw e;
}
var _this = this;
addErrorInfo(this.actual, value, function () {
(0, _assert2.default)((0, _isEqual2.default)(_this.actual, value), message || 'Expected %s to equal %s', _this.actual, value);
});
return this;

@@ -189,4 +203,8 @@ }

value: function toNotEqual(value, message) {
(0, _assert2.default)(!(0, _isEqual2.default)(this.actual, value), message || 'Expected %s to not equal %s', this.actual, value);
var _this2 = this;
addErrorInfo(this.actual, value, function () {
(0, _assert2.default)(!(0, _isEqual2.default)(_this2.actual, value), message || 'Expected %s to not equal %s', _this2.actual, value);
});
return this;

@@ -299,4 +317,2 @@ }

value: function toInclude(value, compareValues, message) {
(0, _assert2.default)((0, _TestUtils.isArray)(this.actual) || (0, _TestUtils.isObject)(this.actual) || typeof this.actual === 'string', 'The "actual" argument in expect(actual).toInclude() must be an array, object, or a string');
if (typeof compareValues === 'string') {

@@ -307,12 +323,18 @@ message = compareValues;

message = message || 'Expected %s to include %s';
if (compareValues == null) compareValues = _isEqual2.default;
var contains = false;
if ((0, _TestUtils.isArray)(this.actual)) {
(0, _assert2.default)((0, _TestUtils.arrayContains)(this.actual, value, compareValues), message, this.actual, value);
contains = (0, _TestUtils.arrayContains)(this.actual, value, compareValues);
} else if ((0, _TestUtils.isObject)(this.actual)) {
(0, _assert2.default)((0, _TestUtils.objectContains)(this.actual, value, compareValues), message, this.actual, value);
contains = (0, _TestUtils.objectContains)(this.actual, value, compareValues);
} else if (typeof this.actual === 'string') {
contains = (0, _TestUtils.stringContains)(this.actual, value);
} else {
(0, _assert2.default)((0, _TestUtils.stringContains)(this.actual, value), message, this.actual, value);
(0, _assert2.default)(false, 'The "actual" argument in expect(actual).toInclude() must be an array, object, or a string');
}
(0, _assert2.default)(contains, message || 'Expected %s to include %s', this.actual, value);
return this;

@@ -323,4 +345,2 @@ }

value: function toExclude(value, compareValues, message) {
(0, _assert2.default)((0, _TestUtils.isArray)(this.actual) || typeof this.actual === 'string', 'The "actual" argument in expect(actual).toExclude() must be an array or a string');
if (typeof compareValues === 'string') {

@@ -331,13 +351,83 @@ message = compareValues;

message = message || 'Expected %s to exclude %s';
if (compareValues == null) compareValues = _isEqual2.default;
var contains = false;
if ((0, _TestUtils.isArray)(this.actual)) {
(0, _assert2.default)(!(0, _TestUtils.arrayContains)(this.actual, value, compareValues), message, this.actual, value);
contains = (0, _TestUtils.arrayContains)(this.actual, value, compareValues);
} else if ((0, _TestUtils.isObject)(this.actual)) {
contains = (0, _TestUtils.objectContains)(this.actual, value, compareValues);
} else if (typeof this.actual === 'string') {
contains = (0, _TestUtils.stringContains)(this.actual, value);
} else {
(0, _assert2.default)(!(0, _TestUtils.stringContains)(this.actual, value), message, this.actual, value);
(0, _assert2.default)(false, 'The "actual" argument in expect(actual).toExclude() must be an array, object, or a string');
}
(0, _assert2.default)(!contains, message || 'Expected %s to exclude %s', this.actual, value);
return this;
}
}, {
key: 'toIncludeKeys',
value: function toIncludeKeys(keys, comparator, message) {
var _this3 = this;
if (typeof comparator === 'string') {
message = comparator;
comparator = null;
}
if (comparator == null) comparator = _has2.default;
(0, _assert2.default)(_typeof(this.actual) === 'object', 'The "actual" argument in expect(actual).toIncludeKeys() must be an object, not %s', _typeof(this.actual));
var contains = keys.every(function (key) {
return comparator(_this3.actual, key);
});
(0, _assert2.default)(contains, message || 'Expected %s to include key(s) %s', this.actual, keys.join(', '));
return this;
}
}, {
key: 'toIncludeKey',
value: function toIncludeKey(key) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
return this.toIncludeKeys.apply(this, [[key]].concat(args));
}
}, {
key: 'toExcludeKeys',
value: function toExcludeKeys(keys, comparator, message) {
var _this4 = this;
if (typeof comparator === 'string') {
message = comparator;
comparator = null;
}
if (comparator == null) comparator = _has2.default;
(0, _assert2.default)(_typeof(this.actual) === 'object', 'The "actual" argument in expect(actual).toExcludeKeys() must be an object, not %s', _typeof(this.actual));
var contains = keys.every(function (key) {
return comparator(_this4.actual, key);
});
(0, _assert2.default)(!contains, message || 'Expected %s to exclude key(s) %s', this.actual, keys.join(', '));
return this;
}
}, {
key: 'toExcludeKey',
value: function toExcludeKey(key) {
for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
args[_key2 - 1] = arguments[_key2];
}
return this.toExcludeKeys.apply(this, [[key]].concat(args));
}
}, {
key: 'toHaveBeenCalled',

@@ -356,4 +446,4 @@ value: function toHaveBeenCalled(message) {

value: function toHaveBeenCalledWith() {
for (var _len = arguments.length, expectedArgs = Array(_len), _key = 0; _key < _len; _key++) {
expectedArgs[_key] = arguments[_key];
for (var _len3 = arguments.length, expectedArgs = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
expectedArgs[_key3] = arguments[_key3];
}

@@ -382,27 +472,42 @@

}
}, {
key: 'withContext',
value: function withContext(context) {
(0, _assert2.default)((0, _TestUtils.isFunction)(this.actual), 'The "actual" argument in expect(actual).withContext() must be a function');
}]);
this.context = context;
return Expectation;
}();
return this;
var deprecate = function deprecate(fn, message) {
var alreadyWarned = false;
return function () {
if (!alreadyWarned) {
alreadyWarned = true;
console.warn(message);
}
}, {
key: 'withArgs',
value: function withArgs() {
var _args;
(0, _assert2.default)((0, _TestUtils.isFunction)(this.actual), 'The "actual" argument in expect(actual).withArgs() must be a function');
for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
args[_key4] = arguments[_key4];
}
if (arguments.length) this.args = (_args = this.args).concat.apply(_args, arguments);
return fn.apply(this, args);
};
};
return this;
}
}]);
Expectation.prototype.withContext = deprecate(function (context) {
(0, _assert2.default)((0, _TestUtils.isFunction)(this.actual), 'The "actual" argument in expect(actual).withContext() must be a function');
return Expectation;
}();
this.context = context;
return this;
}, '\nwithContext is deprecated; use a closure instead.\n\n expect(fn).withContext(context).toThrow()\n\nbecomes\n\n expect(() => fn.call(context)).toThrow()\n');
Expectation.prototype.withArgs = deprecate(function () {
var _args;
(0, _assert2.default)((0, _TestUtils.isFunction)(this.actual), 'The "actual" argument in expect(actual).withArgs() must be a function');
if (arguments.length) this.args = (_args = this.args).concat.apply(_args, arguments);
return this;
}, '\nwithArgs is deprecated; use a closure instead.\n\n expect(fn).withArgs(a, b, c).toThrow()\n\nbecomes\n\n expect(() => fn(a, b, c)).toThrow()\n');
var aliases = {

@@ -416,3 +521,8 @@ toBeAn: 'toBeA',

toContain: 'toInclude',
toNotContain: 'toExclude'
toNotInclude: 'toExclude',
toNotContain: 'toExclude',
toContainKeys: 'toIncludeKeys',
toNotContainKeys: 'toExcludeKeys',
toContainKey: 'toIncludeKey',
toNotContainKey: 'toExcludeKey'
};

@@ -1465,6 +1575,2 @@

var _isEqual = __webpack_require__(2);
var _isEqual2 = _interopRequireDefault(_isEqual);
var _isRegex = __webpack_require__(13);

@@ -1474,2 +1580,6 @@

var _objectKeys = __webpack_require__(22);
var _objectKeys2 = _interopRequireDefault(_objectKeys);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -1545,4 +1655,2 @@

var arrayContains = exports.arrayContains = function arrayContains(array, value, compareValues) {
if (compareValues == null) compareValues = _isEqual2.default;
return array.some(function (item) {

@@ -1553,2 +1661,18 @@ return compareValues(item, value) !== false;

var ownEnumerableKeys = function ownEnumerableKeys(object) {
if ((typeof Reflect === 'undefined' ? 'undefined' : _typeof(Reflect)) === 'object' && typeof Reflect.ownKeys === 'function') {
return Reflect.ownKeys(object).filter(function (key) {
return Object.getOwnPropertyDescriptor(object, key).enumerable;
});
}
if (typeof Object.getOwnPropertySymbols === 'function') {
return Object.getOwnPropertySymbols(object).filter(function (key) {
return Object.getOwnPropertyDescriptor(object, key).enumerable;
}).concat((0, _objectKeys2.default)(object));
}
return (0, _objectKeys2.default)(object);
};
/**

@@ -1560,9 +1684,5 @@ * Returns true if the given object contains the value, false

var objectContains = exports.objectContains = function objectContains(object, value, compareValues) {
if (compareValues == null) compareValues = _isEqual2.default;
return ownEnumerableKeys(value).every(function (k) {
if (isObject(object[k]) && isObject(value[k])) return objectContains(object[k], value[k], compareValues);
return Object.keys(value).every(function (k) {
if (isObject(object[k])) {
return objectContains(object[k], value[k], compareValues);
}
return compareValues(object[k], value[k]);

@@ -1585,2 +1705,159 @@ });

// modified from https://github.com/es-shims/es5-shim
var has = Object.prototype.hasOwnProperty;
var toStr = Object.prototype.toString;
var slice = Array.prototype.slice;
var isArgs = __webpack_require__(23);
var hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString');
var hasProtoEnumBug = function () {}.propertyIsEnumerable('prototype');
var dontEnums = [
'toString',
'toLocaleString',
'valueOf',
'hasOwnProperty',
'isPrototypeOf',
'propertyIsEnumerable',
'constructor'
];
var equalsConstructorPrototype = function (o) {
var ctor = o.constructor;
return ctor && ctor.prototype === o;
};
var blacklistedKeys = {
$console: true,
$frame: true,
$frameElement: true,
$frames: true,
$parent: true,
$self: true,
$webkitIndexedDB: true,
$webkitStorageInfo: true,
$window: true
};
var hasAutomationEqualityBug = (function () {
/* global window */
if (typeof window === 'undefined') { return false; }
for (var k in window) {
try {
if (!blacklistedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {
try {
equalsConstructorPrototype(window[k]);
} catch (e) {
return true;
}
}
} catch (e) {
return true;
}
}
return false;
}());
var equalsConstructorPrototypeIfNotBuggy = function (o) {
/* global window */
if (typeof window === 'undefined' || !hasAutomationEqualityBug) {
return equalsConstructorPrototype(o);
}
try {
return equalsConstructorPrototype(o);
} catch (e) {
return false;
}
};
var keysShim = function keys(object) {
var isObject = object !== null && typeof object === 'object';
var isFunction = toStr.call(object) === '[object Function]';
var isArguments = isArgs(object);
var isString = isObject && toStr.call(object) === '[object String]';
var theKeys = [];
if (!isObject && !isFunction && !isArguments) {
throw new TypeError('Object.keys called on a non-object');
}
var skipProto = hasProtoEnumBug && isFunction;
if (isString && object.length > 0 && !has.call(object, 0)) {
for (var i = 0; i < object.length; ++i) {
theKeys.push(String(i));
}
}
if (isArguments && object.length > 0) {
for (var j = 0; j < object.length; ++j) {
theKeys.push(String(j));
}
} else {
for (var name in object) {
if (!(skipProto && name === 'prototype') && has.call(object, name)) {
theKeys.push(String(name));
}
}
}
if (hasDontEnumBug) {
var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
for (var k = 0; k < dontEnums.length; ++k) {
if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {
theKeys.push(dontEnums[k]);
}
}
}
return theKeys;
};
keysShim.shim = function shimObjectKeys() {
if (Object.keys) {
var keysWorksWithArguments = (function () {
// Safari 5.0 bug
return (Object.keys(arguments) || '').length === 2;
}(1, 2));
if (!keysWorksWithArguments) {
var originalKeys = Object.keys;
Object.keys = function keys(object) {
if (isArgs(object)) {
return originalKeys(slice.call(object));
} else {
return originalKeys(object);
}
};
}
} else {
Object.keys = keysShim;
}
return Object.keys || keysShim;
};
module.exports = keysShim;
/***/ },
/* 23 */
/***/ function(module, exports) {
'use strict';
var toStr = Object.prototype.toString;
module.exports = function isArguments(value) {
var str = toStr.call(value);
var isArgs = str === '[object Arguments]';
if (!isArgs) {
isArgs = str !== '[object Array]' &&
value !== null &&
typeof value === 'object' &&
typeof value.length === 'number' &&
value.length >= 0 &&
toStr.call(value.callee) === '[object Function]';
}
return isArgs;
};
/***/ },
/* 24 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {

@@ -1587,0 +1864,0 @@ value: true

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.expect=e():t.expect=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){return new u["default"](t)}var a=n(3),u=r(a),i=n(4),c=n(1),s=r(c),l=n(9),f=r(l);o.createSpy=i.createSpy,o.spyOn=i.spyOn,o.isSpy=i.isSpy,o.restoreSpies=i.restoreSpies,o.assert=s["default"],o.extend=f["default"],t.exports=o},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;n>o;o++)r[o-2]=arguments[o];if(!t){var a=0;throw new Error(e.replace(/%s/g,function(){return(0,u["default"])(r[a++])}))}}Object.defineProperty(e,"__esModule",{value:!0});var a=n(22),u=r(a);e["default"]=o},function(t,e){"use strict";var n=RegExp.prototype.exec,r=function(t){try{return n.call(t),!0}catch(e){return!1}},o=Object.prototype.toString,a="[object RegExp]",u="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){return"object"!=typeof t?!1:u?r(t):o.call(t)===a}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(7),i=r(u),c=n(2),s=r(c),l=n(1),f=r(l),p=n(4),y=n(5),h=function(){function t(e){o(this,t),this.actual=e,(0,y.isFunction)(e)&&(this.context=null,this.args=[])}return a(t,[{key:"toExist",value:function(t){return(0,f["default"])(this.actual,t||"Expected %s to exist",this.actual),this}},{key:"toNotExist",value:function(t){return(0,f["default"])(!this.actual,t||"Expected %s to not exist",this.actual),this}},{key:"toBe",value:function(t,e){return(0,f["default"])(this.actual===t,e||"Expected %s to be %s",this.actual,t),this}},{key:"toNotBe",value:function(t,e){return(0,f["default"])(this.actual!==t,e||"Expected %s to not be %s",this.actual,t),this}},{key:"toEqual",value:function(t,e){try{(0,f["default"])((0,i["default"])(this.actual,t),e||"Expected %s to equal %s",this.actual,t)}catch(n){throw n.showDiff=!0,n.actual=this.actual,n.expected=t,n}return this}},{key:"toNotEqual",value:function(t,e){return(0,f["default"])(!(0,i["default"])(this.actual,t),e||"Expected %s to not equal %s",this.actual,t),this}},{key:"toThrow",value:function(t,e){return(0,f["default"])((0,y.isFunction)(this.actual),'The "actual" argument in expect(actual).toThrow() must be a function, %s was given',this.actual),(0,f["default"])((0,y.functionThrows)(this.actual,this.context,this.args,t),e||"Expected %s to throw %s",this.actual,t||"an error"),this}},{key:"toNotThrow",value:function(t,e){return(0,f["default"])((0,y.isFunction)(this.actual),'The "actual" argument in expect(actual).toNotThrow() must be a function, %s was given',this.actual),(0,f["default"])(!(0,y.functionThrows)(this.actual,this.context,this.args,t),e||"Expected %s to not throw %s",this.actual,t||"an error"),this}},{key:"toBeA",value:function(t,e){return(0,f["default"])((0,y.isFunction)(t)||"string"==typeof t,'The "value" argument in toBeA(value) must be a function or a string'),(0,f["default"])((0,y.isA)(this.actual,t),e||"Expected %s to be a %s",this.actual,t),this}},{key:"toNotBeA",value:function(t,e){return(0,f["default"])((0,y.isFunction)(t)||"string"==typeof t,'The "value" argument in toNotBeA(value) must be a function or a string'),(0,f["default"])(!(0,y.isA)(this.actual,t),e||"Expected %s to be a %s",this.actual,t),this}},{key:"toMatch",value:function(t,e){return(0,f["default"])("string"==typeof this.actual,'The "actual" argument in expect(actual).toMatch() must be a string'),(0,f["default"])((0,s["default"])(t),'The "value" argument in toMatch(value) must be a RegExp'),(0,f["default"])(t.test(this.actual),e||"Expected %s to match %s",this.actual,t),this}},{key:"toNotMatch",value:function(t,e){return(0,f["default"])("string"==typeof this.actual,'The "actual" argument in expect(actual).toNotMatch() must be a string'),(0,f["default"])((0,s["default"])(t),'The "value" argument in toNotMatch(value) must be a RegExp'),(0,f["default"])(!t.test(this.actual),e||"Expected %s to not match %s",this.actual,t),this}},{key:"toBeLessThan",value:function(t,e){return(0,f["default"])("number"==typeof this.actual,'The "actual" argument in expect(actual).toBeLessThan() must be a number'),(0,f["default"])("number"==typeof t,'The "value" argument in toBeLessThan(value) must be a number'),(0,f["default"])(this.actual<t,e||"Expected %s to be less than %s",this.actual,t),this}},{key:"toBeLessThanOrEqualTo",value:function(t,e){return(0,f["default"])("number"==typeof this.actual,'The "actual" argument in expect(actual).toBeLessThanOrEqualTo() must be a number'),(0,f["default"])("number"==typeof t,'The "value" argument in toBeLessThanOrEqualTo(value) must be a number'),(0,f["default"])(this.actual<=t,e||"Expected %s to be less than or equal to %s",this.actual,t),this}},{key:"toBeGreaterThan",value:function(t,e){return(0,f["default"])("number"==typeof this.actual,'The "actual" argument in expect(actual).toBeGreaterThan() must be a number'),(0,f["default"])("number"==typeof t,'The "value" argument in toBeGreaterThan(value) must be a number'),(0,f["default"])(this.actual>t,e||"Expected %s to be greater than %s",this.actual,t),this}},{key:"toBeGreaterThanOrEqualTo",value:function(t,e){return(0,f["default"])("number"==typeof this.actual,'The "actual" argument in expect(actual).toBeGreaterThanOrEqualTo() must be a number'),(0,f["default"])("number"==typeof t,'The "value" argument in toBeGreaterThanOrEqualTo(value) must be a number'),(0,f["default"])(this.actual>=t,e||"Expected %s to be greater than or equal to %s",this.actual,t),this}},{key:"toInclude",value:function(t,e,n){return(0,f["default"])((0,y.isArray)(this.actual)||(0,y.isObject)(this.actual)||"string"==typeof this.actual,'The "actual" argument in expect(actual).toInclude() must be an array, object, or a string'),"string"==typeof e&&(n=e,e=null),n=n||"Expected %s to include %s",(0,y.isArray)(this.actual)?(0,f["default"])((0,y.arrayContains)(this.actual,t,e),n,this.actual,t):(0,y.isObject)(this.actual)?(0,f["default"])((0,y.objectContains)(this.actual,t,e),n,this.actual,t):(0,f["default"])((0,y.stringContains)(this.actual,t),n,this.actual,t),this}},{key:"toExclude",value:function(t,e,n){return(0,f["default"])((0,y.isArray)(this.actual)||"string"==typeof this.actual,'The "actual" argument in expect(actual).toExclude() must be an array or a string'),"string"==typeof e&&(n=e,e=null),n=n||"Expected %s to exclude %s",(0,y.isArray)(this.actual)?(0,f["default"])(!(0,y.arrayContains)(this.actual,t,e),n,this.actual,t):(0,f["default"])(!(0,y.stringContains)(this.actual,t),n,this.actual,t),this}},{key:"toHaveBeenCalled",value:function(t){var e=this.actual;return(0,f["default"])((0,p.isSpy)(e),'The "actual" argument in expect(actual).toHaveBeenCalled() must be a spy'),(0,f["default"])(e.calls.length>0,t||"spy was not called"),this}},{key:"toHaveBeenCalledWith",value:function(){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];var r=this.actual;return(0,f["default"])((0,p.isSpy)(r),'The "actual" argument in expect(actual).toHaveBeenCalledWith() must be a spy'),(0,f["default"])(r.calls.some(function(t){return(0,i["default"])(t.arguments,e)}),"spy was never called with %s",e),this}},{key:"toNotHaveBeenCalled",value:function(t){var e=this.actual;return(0,f["default"])((0,p.isSpy)(e),'The "actual" argument in expect(actual).toNotHaveBeenCalled() must be a spy'),(0,f["default"])(0===e.calls.length,t||"spy was not supposed to be called"),this}},{key:"withContext",value:function(t){return(0,f["default"])((0,y.isFunction)(this.actual),'The "actual" argument in expect(actual).withContext() must be a function'),this.context=t,this}},{key:"withArgs",value:function(){var t;return(0,f["default"])((0,y.isFunction)(this.actual),'The "actual" argument in expect(actual).withArgs() must be a function'),arguments.length&&(this.args=(t=this.args).concat.apply(t,arguments)),this}}]),t}(),d={toBeAn:"toBeA",toNotBeAn:"toNotBeA",toBeTruthy:"toExist",toBeFalsy:"toNotExist",toBeFewerThan:"toBeLessThan",toBeMoreThan:"toBeGreaterThan",toContain:"toInclude",toNotContain:"toExclude"};for(var g in d)d.hasOwnProperty(g)&&(h.prototype[g]=h.prototype[d[g]]);e["default"]=h},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){var e=arguments.length<=1||void 0===arguments[1]?s:arguments[1];null==t&&(t=s),(0,i["default"])((0,c.isFunction)(t),"createSpy needs a function");var n=void 0,r=void 0,o=void 0,a=function u(){if(u.calls.push({context:this,arguments:Array.prototype.slice.call(arguments,0)}),n)return n.apply(this,arguments);if(r)throw r;return o};return a.calls=[],a.andCall=function(t){return n=t,a},a.andCallThrough=function(){return a.andCall(t)},a.andThrow=function(t){return r=t,a},a.andReturn=function(t){return o=t,a},a.getLastCall=function(){return a.calls[a.calls.length-1]},a.reset=function(){a.calls=[]},a.restore=a.destroy=e,a.__isSpy=!0,f.push(a),a}function a(t,e){var n=t[e];return l(n)||((0,i["default"])((0,c.isFunction)(n),"Cannot spyOn the %s property; it is not a function",e),t[e]=o(n,function(){t[e]=n})),t[e]}Object.defineProperty(e,"__esModule",{value:!0}),e.restoreSpies=e.isSpy=void 0,e.createSpy=o,e.spyOn=a;var u=n(1),i=r(u),c=n(5),s=function(){},l=e.isSpy=function(t){return t&&t.__isSpy===!0},f=[];e.restoreSpies=function(){for(var t=f.length-1;t>=0;t--)f[t].restore();f=[]}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.stringContains=e.objectContains=e.arrayContains=e.functionThrows=e.isA=e.isObject=e.isArray=e.isFunction=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},a=n(7),u=r(a),i=n(2),c=r(i),s=e.isFunction=function(t){return"function"==typeof t},l=e.isArray=function(t){return Array.isArray(t)},f=e.isObject=function(t){return t&&!l(t)&&"object"===("undefined"==typeof t?"undefined":o(t))};e.isA=function(t,e){return s(e)?t instanceof e:"array"===e?Array.isArray(t):("undefined"==typeof t?"undefined":o(t))===e},e.functionThrows=function(t,e,n,r){try{t.apply(e,n)}catch(o){if(null==r)return!0;if(s(r)&&o instanceof r)return!0;var a=o.message||o;if("string"==typeof a){if((0,c["default"])(r)&&r.test(o.message))return!0;if("string"==typeof r&&-1!==a.indexOf(r))return!0}}return!1},e.arrayContains=function(t,e,n){return null==n&&(n=u["default"]),t.some(function(t){return n(t,e)!==!1})},e.objectContains=function p(t,e,n){return null==n&&(n=u["default"]),Object.keys(e).every(function(r){return f(t[r])?p(t[r],e[r],n):n(t[r],e[r])})},e.stringContains=function(t,e){return-1!==t.indexOf(e)}},function(t,e){"use strict";var n=Function.prototype.toString,r=/^\s*class /,o=function(t){try{var e=n.call(t),o=e.replace(/\/\/.*\n/g,""),a=o.replace(/\/\*[.\s\S]*\*\//g,""),u=a.replace(/\n/gm," ").replace(/ {2}/g," ");return r.test(u)}catch(i){return!1}},a=function(t){try{return o(t)?!1:(n.call(t),!0)}catch(e){return!1}},u=Object.prototype.toString,i="[object Function]",c="[object GeneratorFunction]",s="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(s)return a(t);if(o(t))return!1;var e=u.call(t);return e===i||e===c}},function(t,e,n){"use strict";var r=n(18);t.exports=function(t,e){return""===r(t,e)}},function(t,e){"use strict";var n=Object.prototype.toString,r="function"==typeof Symbol&&"symbol"==typeof Symbol();if(r){var o=Symbol.prototype.toString,a=/^Symbol\(.*\)$/,u=function(t){return"symbol"!=typeof t.valueOf()?!1:a.test(o.call(t))};t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return u(t)}catch(e){return!1}}}else t.exports=function(t){return!1}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){if(-1===i.indexOf(t)){i.push(t);for(var e in t)t.hasOwnProperty(e)&&(u["default"].prototype[e]=t[e])}}Object.defineProperty(e,"__esModule",{value:!0});var a=n(3),u=r(a),i=[];e["default"]=o},function(t,e){var n="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,o=Object.prototype.toString,a="[object Function]";t.exports=function(t){var e=this;if("function"!=typeof e||o.call(e)!==a)throw new TypeError(n+e);for(var u,i=r.call(arguments,1),c=function(){if(this instanceof u){var n=e.apply(this,i.concat(r.call(arguments)));return Object(n)===n?n:this}return e.apply(t,i.concat(r.call(arguments)))},s=Math.max(0,e.length-i.length),l=[],f=0;s>f;f++)l.push("$"+f);if(u=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(c),e.prototype){var p=function(){};p.prototype=e.prototype,u.prototype=new p,p.prototype=null}return u}},function(t,e,n){var r=n(10);t.exports=Function.prototype.bind||r},function(t,e,n){var r=n(11);t.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},function(t,e,n){"use strict";var r=n(6),o=Function.prototype.toString,a=/^\s*function/,u=/^\([^\)]*\) *=>/,i=/^[^=]*=>/;t.exports=function(t){if(!r(t))return!1;var e=o.call(t);return e.length>0&&!a.test(e)&&(u.test(e)||i.test(e))}},function(t,e){"use strict";var n=Boolean.prototype.toString,r=function(t){try{return n.call(t),!0}catch(e){return!1}},o=Object.prototype.toString,a="[object Boolean]",u="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){return"boolean"==typeof t?!0:"object"!=typeof t?!1:u?r(t):o.call(t)===a}},function(t,e){"use strict";var n=Date.prototype.getDay,r=function(t){try{return n.call(t),!0}catch(e){return!1}},o=Object.prototype.toString,a="[object Date]",u="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){return"object"!=typeof t||null===t?!1:u?r(t):o.call(t)===a}},function(t,e){"use strict";t.exports=function(){var t=function(){if("function"!=typeof Map)return null;try{Map.prototype.forEach.call({},function(){})}catch(t){return Map.prototype.forEach}return null}(),e=function(){if("function"!=typeof Set)return null;try{Set.prototype.forEach.call({},function(){})}catch(t){return Set.prototype.forEach}return null}();return{Map:t,Set:e}}},function(t,e,n){"use strict";var r=n(8);t.exports=function(){var t="function"==typeof Symbol&&r(Symbol.iterator)?Symbol.iterator:null;return"function"==typeof Object.getOwnPropertyNames&&"function"==typeof Map&&"function"==typeof Map.prototype.entries&&Object.getOwnPropertyNames(Map.prototype).forEach(function(e){"entries"!==e&&"size"!==e&&Map.prototype[e]===Map.prototype.entries&&(t=e)}),t}},function(t,e,n){"use strict";var r=Object.prototype,o=r.toString,a=Boolean.prototype.valueOf,u=n(12),i=n(13),c=n(14),s=n(15),l=n(19),f=n(20),p=n(2),y=n(21),h=n(8),d=n(6),g=Object.prototype.isPrototypeOf,b=function(){},m="foo"===b.name,v="function"==typeof Symbol?Symbol.prototype.valueOf:null,x=n(17)(),S=n(16)(),j=Object.getPrototypeOf;j||(j="object"==typeof"test".__proto__?function(t){return t.__proto__}:function(t){var e,n=t.constructor;if(u(t,"constructor")){if(e=n,!delete t.constructor)return null;n=t.constructor,t.constructor=e}return n?n.prototype:r});var T=Array.isArray||function(t){return"[object Array]"===o.call(t)},O=function(t){return t.replace(/^function ?\(/,"function (").replace("){",") {")},E=function(t){var e=[];try{S.Map.call(t,function(t,n){e.push([t,n])})}catch(n){try{S.Set.call(t,function(t){e.push([t])})}catch(r){return!1}}return e};t.exports=function w(t,e){if(t===e)return"";if(null==t||null==e)return t===e?"":String(t)+" !== "+String(e);var n=o.call(t),r=o.call(t);if(n!==r)return"toStringTag is not the same: "+n+" !== "+r;var b=c(t),A=c(e);if(b||A){if(!b)return"first argument is not a boolean; second argument is";if(!A)return"second argument is not a boolean; first argument is";var B=a.call(t),M=a.call(e);return B===M?"":"primitive value of boolean arguments do not match: "+B+" !== "+M}var N=f(t),C=f(t);if(N||C){if(!N)return"first argument is not a number; second argument is";if(!C)return"second argument is not a number; first argument is";var _=Number(t),k=Number(e);if(_===k)return"";var F=isNaN(t),P=isNaN(e);return F&&!P?"first argument is NaN; second is not":!F&&P?"second argument is NaN; first is not":F&&P?"":"numbers are different: "+t+" !== "+e}var q=y(t),D=y(e);if(q||D){if(!q)return"second argument is string; first is not";if(!D)return"first argument is string; second is not";var L=String(t),G=String(e);return L===G?"":'string values are different: "'+L+'" !== "'+G+'"'}var H=s(t),R=s(e);if(H||R){if(!H)return"second argument is Date, first is not";if(!R)return"first argument is Date, second is not";var $=+t,z=+e;return $===z?"":"Dates have different time values: "+$+" !== "+z}var I=p(t),W=p(e);if(I||W){if(!I)return"second argument is RegExp, first is not";if(!W)return"first argument is RegExp, second is not";var J=String(t),K=String(e);return J===K?"":"regular expressions differ: "+J+" !== "+K}var Q=T(t),U=T(e);if(Q||U){if(!Q)return"second argument is an Array, first is not";if(!U)return"first argument is an Array, second is not";if(t.length!==e.length)return"arrays have different length: "+t.length+" !== "+e.length;if(String(t)!==String(e))return"stringified Arrays differ";for(var V,X,Y=t.length-1,Z="";""===Z&&Y>=0;){if(V=u(t,Y),X=u(e,Y),!V&&X)return"second argument has index "+Y+"; first does not";if(V&&!X)return"first argument has index "+Y+"; second does not";Z=w(t[Y],e[Y]),Y-=1}return Z}var tt=h(t),et=h(e);if(tt!==et)return tt?"first argument is Symbol; second is not":"second argument is Symbol; first is not";if(tt&&et)return v.call(t)===v.call(e)?"":"first Symbol value !== second Symbol value";var nt=l(t),rt=l(e);if(nt!==rt)return nt?"first argument is a Generator; second is not":"second argument is a Generator; first is not";var ot=i(t),at=i(e);if(ot!==at)return ot?"first argument is an Arrow function; second is not":"second argument is an Arrow function; first is not";if(d(t)||d(e)){if(m&&""!==w(t.name,e.name))return'Function names differ: "'+t.name+'" !== "'+e.name+'"';if(""!==w(t.length,e.length))return"Function lengths differ: "+t.length+" !== "+e.length;var ut=O(String(t)),it=O(String(e));return""===w(ut,it)?"":nt||ot?""===w(ut,it)?"":"Function string representations differ":""===w(ut.replace(/\)\s*\{/,"){"),it.replace(/\)\s*\{/,"){"))?"":"Function string representations differ"}if("object"==typeof t||"object"==typeof e){if(typeof t!=typeof e)return"arguments have a different typeof: "+typeof t+" !== "+typeof e;if(g.call(t,e))return"first argument is the [[Prototype]] of the second";if(g.call(e,t))return"second argument is the [[Prototype]] of the first";if(j(t)!==j(e))return"arguments have a different [[Prototype]]";if(x){var ct=t[x],st=d(ct),lt=e[x],ft=d(lt);if(st!==ft)return st?"first argument is iterable; second is not":"second argument is iterable; first is not";if(st&&ft){var pt,yt,ht,dt=ct.call(t),gt=lt.call(e);do if(pt=dt.next(),yt=gt.next(),!pt.done&&!yt.done&&(ht=w(pt,yt),""!==ht))return"iteration results are not equal: "+ht;while(!pt.done&&!yt.done);return pt.done&&!yt.done?"first argument finished iterating before second":!pt.done&&yt.done?"second argument finished iterating before first":""}}else if(S.Map||S.Set){var bt=E(t),mt=E(e),vt=T(bt),xt=T(mt);if(vt&&!xt)return"first argument has Collection entries, second does not";if(!vt&&xt)return"second argument has Collection entries, first does not";if(vt&&xt){var St=w(bt,mt);return""===St?"":"Collection entries differ: "+St}}var jt,Tt,Ot,Et;for(jt in t)if(u(t,jt)){if(!u(e,jt))return'first argument has key "'+jt+'"; second does not';if(Tt=t[jt]&&t[jt][jt]===t,Ot=e[jt]&&e[jt][jt]===e,Tt!==Ot)return Tt?'first argument has a circular reference at key "'+jt+'"; second does not':'second argument has a circular reference at key "'+jt+'"; first does not';if(!Tt&&!Ot&&(Et=w(t[jt],e[jt]),""!==Et))return'value at key "'+jt+'" differs: '+Et}for(jt in e)if(u(e,jt)&&!u(t,jt))return'second argument has key "'+jt+'"; first does not';return""}return!1}},function(t,e){"use strict";var n=Object.prototype.toString,r=Function.prototype.toString,o=/^\s*function\*/;t.exports=function(t){if("function"!=typeof t)return!1;var e=n.call(t);return("[object Function]"===e||"[object GeneratorFunction]"===e)&&o.test(r.call(t))}},function(t,e){"use strict";var n=Number.prototype.toString,r=function(t){try{return n.call(t),!0}catch(e){return!1}},o=Object.prototype.toString,a="[object Number]",u="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){return"number"==typeof t?!0:"object"!=typeof t?!1:u?r(t):o.call(t)===a}},function(t,e){"use strict";var n=String.prototype.valueOf,r=function(t){try{return n.call(t),!0}catch(e){return!1}},o=Object.prototype.toString,a="[object String]",u="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){return"string"==typeof t?!0:"object"!=typeof t?!1:u?r(t):o.call(t)===a}},function(t,e){function n(t){return String(t).replace(/"/g,"&quot;")}function r(t){return"[object Array]"===s(t)}function o(t){return"[object Date]"===s(t)}function a(t){return"[object RegExp]"===s(t)}function u(t){return"[object Error]"===s(t)}function i(t){return"[object Symbol]"===s(t)}function c(t,e){return O.call(t,e)}function s(t){return Object.prototype.toString.call(t)}function l(t){if(t.name)return t.name;var e=t.toString().match(/^function\s*([\w$]+)/);return e?e[1]:void 0}function f(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;r>n;n++)if(t[n]===e)return n;return-1}function p(t){if(!m)return!1;try{return m.call(t),!0}catch(e){}return!1}function y(t){if(!j)return!1;try{return j.call(t),!0}catch(e){}return!1}function h(t){return t&&"object"==typeof t?"undefined"!=typeof HTMLElement&&t instanceof HTMLElement?!0:"string"==typeof t.nodeName&&"function"==typeof t.getAttribute:!1}function d(t){function e(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(16>e?"0":"")+e.toString(16)}var n=t.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,e);return"'"+n+"'"}var g="function"==typeof Map&&Map.prototype,b=Object.getOwnPropertyDescriptor&&g?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,m=g&&b&&"function"==typeof b.get?b.get:null,v=g&&Map.prototype.forEach,x="function"==typeof Set&&Set.prototype,S=Object.getOwnPropertyDescriptor&&x?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,j=x&&S&&"function"==typeof S.get?S.get:null,T=x&&Set.prototype.forEach;t.exports=function E(t,e,s,g){function b(t,n){return n&&(g=g.slice(),g.push(n)),E(t,e,s+1,g)}e||(e={});var x=void 0===e.depth?5:e.depth;if(void 0===s&&(s=0),s>=x&&x>0&&t&&"object"==typeof t)return"[Object]";if(void 0===g)g=[];else if(f(g,t)>=0)return"[Circular]";if("string"==typeof t)return d(t);if("function"==typeof t){var S=l(t);return"[Function"+(S?": "+S:"")+"]"}if(null===t)return"null";if(i(t)){var O=Symbol.prototype.toString.call(t);return"object"==typeof t?"Object("+O+")":O}if(h(t)){for(var w="<"+String(t.nodeName).toLowerCase(),A=t.attributes||[],B=0;B<A.length;B++)w+=" "+A[B].name+'="'+n(A[B].value)+'"';return w+=">",t.childNodes&&t.childNodes.length&&(w+="..."),w+="</"+String(t.nodeName).toLowerCase()+">"}if(r(t)){if(0===t.length)return"[]";for(var M=Array(t.length),B=0;B<t.length;B++)M[B]=c(t,B)?b(t[B],t):"";return"[ "+M.join(", ")+" ]"}if(u(t)){var N=[];for(var C in t)c(t,C)&&(/[^\w$]/.test(C)?N.push(b(C)+": "+b(t[C])):N.push(C+": "+b(t[C])));return 0===N.length?"["+t+"]":"{ ["+t+"] "+N.join(", ")+" }"}if("object"==typeof t&&"function"==typeof t.inspect)return t.inspect();if(p(t)){var N=[];return v.call(t,function(e,n){N.push(b(n,t)+" => "+b(e,t))}),"Map ("+m.call(t)+") {"+N.join(", ")+"}"}if(y(t)){var N=[];return T.call(t,function(e){N.push(b(e,t))}),"Set ("+j.call(t)+") {"+N.join(", ")+"}"}if("object"!=typeof t||o(t)||a(t))return String(t);var M=[],_=[];for(var C in t)c(t,C)&&_.push(C);_.sort();for(var B=0;B<_.length;B++){var C=_[B];/[^\w$]/.test(C)?M.push(b(C)+": "+b(t[C],t)):M.push(C+": "+b(t[C],t))}return 0===M.length?"{}":"{ "+M.join(", ")+" }"};var O=Object.prototype.hasOwnProperty||function(t){return t in this}}])});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.expect=e():t.expect=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){return new a["default"](t)}var u=n(3),a=r(u),i=n(4),c=n(1),s=r(c),l=n(9),f=r(l);o.createSpy=i.createSpy,o.spyOn=i.spyOn,o.isSpy=i.isSpy,o.restoreSpies=i.restoreSpies,o.assert=s["default"],o.extend=f["default"],t.exports=o},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;n>o;o++)r[o-2]=arguments[o];if(!t){var u=0;throw new Error(e.replace(/%s/g,function(){return(0,a["default"])(r[u++])}))}}Object.defineProperty(e,"__esModule",{value:!0});var u=n(22),a=r(u);e["default"]=o},function(t,e){"use strict";var n=RegExp.prototype.exec,r=function(t){try{return n.call(t),!0}catch(e){return!1}},o=Object.prototype.toString,u="[object RegExp]",a="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){return"object"!=typeof t?!1:a?r(t):o.call(t)===u}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(17),c=r(i),s=n(2),l=r(s),f=n(6),p=r(f),y=n(1),h=r(y),d=n(4),g=n(5),b=function(t,e,n){try{n()}catch(r){throw r.actual=t,r.expected=e,r.showDiff=!0,r}},m=function(){function t(e){o(this,t),this.actual=e,(0,g.isFunction)(e)&&(this.context=null,this.args=[])}return a(t,[{key:"toExist",value:function(t){return(0,h["default"])(this.actual,t||"Expected %s to exist",this.actual),this}},{key:"toNotExist",value:function(t){return(0,h["default"])(!this.actual,t||"Expected %s to not exist",this.actual),this}},{key:"toBe",value:function(t,e){return(0,h["default"])(this.actual===t,e||"Expected %s to be %s",this.actual,t),this}},{key:"toNotBe",value:function(t,e){return(0,h["default"])(this.actual!==t,e||"Expected %s to not be %s",this.actual,t),this}},{key:"toEqual",value:function(t,e){var n=this;return b(this.actual,t,function(){(0,h["default"])((0,c["default"])(n.actual,t),e||"Expected %s to equal %s",n.actual,t)}),this}},{key:"toNotEqual",value:function(t,e){var n=this;return b(this.actual,t,function(){(0,h["default"])(!(0,c["default"])(n.actual,t),e||"Expected %s to not equal %s",n.actual,t)}),this}},{key:"toThrow",value:function(t,e){return(0,h["default"])((0,g.isFunction)(this.actual),'The "actual" argument in expect(actual).toThrow() must be a function, %s was given',this.actual),(0,h["default"])((0,g.functionThrows)(this.actual,this.context,this.args,t),e||"Expected %s to throw %s",this.actual,t||"an error"),this}},{key:"toNotThrow",value:function(t,e){return(0,h["default"])((0,g.isFunction)(this.actual),'The "actual" argument in expect(actual).toNotThrow() must be a function, %s was given',this.actual),(0,h["default"])(!(0,g.functionThrows)(this.actual,this.context,this.args,t),e||"Expected %s to not throw %s",this.actual,t||"an error"),this}},{key:"toBeA",value:function(t,e){return(0,h["default"])((0,g.isFunction)(t)||"string"==typeof t,'The "value" argument in toBeA(value) must be a function or a string'),(0,h["default"])((0,g.isA)(this.actual,t),e||"Expected %s to be a %s",this.actual,t),this}},{key:"toNotBeA",value:function(t,e){return(0,h["default"])((0,g.isFunction)(t)||"string"==typeof t,'The "value" argument in toNotBeA(value) must be a function or a string'),(0,h["default"])(!(0,g.isA)(this.actual,t),e||"Expected %s to be a %s",this.actual,t),this}},{key:"toMatch",value:function(t,e){return(0,h["default"])("string"==typeof this.actual,'The "actual" argument in expect(actual).toMatch() must be a string'),(0,h["default"])((0,l["default"])(t),'The "value" argument in toMatch(value) must be a RegExp'),(0,h["default"])(t.test(this.actual),e||"Expected %s to match %s",this.actual,t),this}},{key:"toNotMatch",value:function(t,e){return(0,h["default"])("string"==typeof this.actual,'The "actual" argument in expect(actual).toNotMatch() must be a string'),(0,h["default"])((0,l["default"])(t),'The "value" argument in toNotMatch(value) must be a RegExp'),(0,h["default"])(!t.test(this.actual),e||"Expected %s to not match %s",this.actual,t),this}},{key:"toBeLessThan",value:function(t,e){return(0,h["default"])("number"==typeof this.actual,'The "actual" argument in expect(actual).toBeLessThan() must be a number'),(0,h["default"])("number"==typeof t,'The "value" argument in toBeLessThan(value) must be a number'),(0,h["default"])(this.actual<t,e||"Expected %s to be less than %s",this.actual,t),this}},{key:"toBeLessThanOrEqualTo",value:function(t,e){return(0,h["default"])("number"==typeof this.actual,'The "actual" argument in expect(actual).toBeLessThanOrEqualTo() must be a number'),(0,h["default"])("number"==typeof t,'The "value" argument in toBeLessThanOrEqualTo(value) must be a number'),(0,h["default"])(this.actual<=t,e||"Expected %s to be less than or equal to %s",this.actual,t),this}},{key:"toBeGreaterThan",value:function(t,e){return(0,h["default"])("number"==typeof this.actual,'The "actual" argument in expect(actual).toBeGreaterThan() must be a number'),(0,h["default"])("number"==typeof t,'The "value" argument in toBeGreaterThan(value) must be a number'),(0,h["default"])(this.actual>t,e||"Expected %s to be greater than %s",this.actual,t),this}},{key:"toBeGreaterThanOrEqualTo",value:function(t,e){return(0,h["default"])("number"==typeof this.actual,'The "actual" argument in expect(actual).toBeGreaterThanOrEqualTo() must be a number'),(0,h["default"])("number"==typeof t,'The "value" argument in toBeGreaterThanOrEqualTo(value) must be a number'),(0,h["default"])(this.actual>=t,e||"Expected %s to be greater than or equal to %s",this.actual,t),this}},{key:"toInclude",value:function(t,e,n){"string"==typeof e&&(n=e,e=null),null==e&&(e=c["default"]);var r=!1;return(0,g.isArray)(this.actual)?r=(0,g.arrayContains)(this.actual,t,e):(0,g.isObject)(this.actual)?r=(0,g.objectContains)(this.actual,t,e):"string"==typeof this.actual?r=(0,g.stringContains)(this.actual,t):(0,h["default"])(!1,'The "actual" argument in expect(actual).toInclude() must be an array, object, or a string'),(0,h["default"])(r,n||"Expected %s to include %s",this.actual,t),this}},{key:"toExclude",value:function(t,e,n){"string"==typeof e&&(n=e,e=null),null==e&&(e=c["default"]);var r=!1;return(0,g.isArray)(this.actual)?r=(0,g.arrayContains)(this.actual,t,e):(0,g.isObject)(this.actual)?r=(0,g.objectContains)(this.actual,t,e):"string"==typeof this.actual?r=(0,g.stringContains)(this.actual,t):(0,h["default"])(!1,'The "actual" argument in expect(actual).toExclude() must be an array, object, or a string'),(0,h["default"])(!r,n||"Expected %s to exclude %s",this.actual,t),this}},{key:"toIncludeKeys",value:function(t,e,n){var r=this;"string"==typeof e&&(n=e,e=null),null==e&&(e=p["default"]),(0,h["default"])("object"===u(this.actual),'The "actual" argument in expect(actual).toIncludeKeys() must be an object, not %s',u(this.actual));var o=t.every(function(t){return e(r.actual,t)});return(0,h["default"])(o,n||"Expected %s to include key(s) %s",this.actual,t.join(", ")),this}},{key:"toIncludeKey",value:function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;e>r;r++)n[r-1]=arguments[r];return this.toIncludeKeys.apply(this,[[t]].concat(n))}},{key:"toExcludeKeys",value:function(t,e,n){var r=this;"string"==typeof e&&(n=e,e=null),null==e&&(e=p["default"]),(0,h["default"])("object"===u(this.actual),'The "actual" argument in expect(actual).toExcludeKeys() must be an object, not %s',u(this.actual));var o=t.every(function(t){return e(r.actual,t)});return(0,h["default"])(!o,n||"Expected %s to exclude key(s) %s",this.actual,t.join(", ")),this}},{key:"toExcludeKey",value:function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;e>r;r++)n[r-1]=arguments[r];return this.toExcludeKeys.apply(this,[[t]].concat(n))}},{key:"toHaveBeenCalled",value:function(t){var e=this.actual;return(0,h["default"])((0,d.isSpy)(e),'The "actual" argument in expect(actual).toHaveBeenCalled() must be a spy'),(0,h["default"])(e.calls.length>0,t||"spy was not called"),this}},{key:"toHaveBeenCalledWith",value:function(){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];var r=this.actual;return(0,h["default"])((0,d.isSpy)(r),'The "actual" argument in expect(actual).toHaveBeenCalledWith() must be a spy'),(0,h["default"])(r.calls.some(function(t){return(0,c["default"])(t.arguments,e)}),"spy was never called with %s",e),this}},{key:"toNotHaveBeenCalled",value:function(t){var e=this.actual;return(0,h["default"])((0,d.isSpy)(e),'The "actual" argument in expect(actual).toNotHaveBeenCalled() must be a spy'),(0,h["default"])(0===e.calls.length,t||"spy was not supposed to be called"),this}}]),t}(),v=function(t,e){var n=!1;return function(){n||(n=!0,console.warn(e));for(var r=arguments.length,o=Array(r),u=0;r>u;u++)o[u]=arguments[u];return t.apply(this,o)}};m.prototype.withContext=v(function(t){return(0,h["default"])((0,g.isFunction)(this.actual),'The "actual" argument in expect(actual).withContext() must be a function'),this.context=t,this},"\nwithContext is deprecated; use a closure instead.\n\n expect(fn).withContext(context).toThrow()\n\nbecomes\n\n expect(() => fn.call(context)).toThrow()\n"),m.prototype.withArgs=v(function(){var t;return(0,h["default"])((0,g.isFunction)(this.actual),'The "actual" argument in expect(actual).withArgs() must be a function'),arguments.length&&(this.args=(t=this.args).concat.apply(t,arguments)),this},"\nwithArgs is deprecated; use a closure instead.\n\n expect(fn).withArgs(a, b, c).toThrow()\n\nbecomes\n\n expect(() => fn(a, b, c)).toThrow()\n");var x={toBeAn:"toBeA",toNotBeAn:"toNotBeA",toBeTruthy:"toExist",toBeFalsy:"toNotExist",toBeFewerThan:"toBeLessThan",toBeMoreThan:"toBeGreaterThan",toContain:"toInclude",toNotInclude:"toExclude",toNotContain:"toExclude",toContainKeys:"toIncludeKeys",toNotContainKeys:"toExcludeKeys",toContainKey:"toIncludeKey",toNotContainKey:"toExcludeKey"};for(var S in x)x.hasOwnProperty(S)&&(m.prototype[S]=m.prototype[x[S]]);e["default"]=m},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){var e=arguments.length<=1||void 0===arguments[1]?s:arguments[1];null==t&&(t=s),(0,i["default"])((0,c.isFunction)(t),"createSpy needs a function");var n=void 0,r=void 0,o=void 0,u=function a(){if(a.calls.push({context:this,arguments:Array.prototype.slice.call(arguments,0)}),n)return n.apply(this,arguments);if(r)throw r;return o};return u.calls=[],u.andCall=function(t){return n=t,u},u.andCallThrough=function(){return u.andCall(t)},u.andThrow=function(t){return r=t,u},u.andReturn=function(t){return o=t,u},u.getLastCall=function(){return u.calls[u.calls.length-1]},u.reset=function(){u.calls=[]},u.restore=u.destroy=e,u.__isSpy=!0,f.push(u),u}function u(t,e){var n=t[e];return l(n)||((0,i["default"])((0,c.isFunction)(n),"Cannot spyOn the %s property; it is not a function",e),t[e]=o(n,function(){t[e]=n})),t[e]}Object.defineProperty(e,"__esModule",{value:!0}),e.restoreSpies=e.isSpy=void 0,e.createSpy=o,e.spyOn=u;var a=n(1),i=r(a),c=n(5),s=function(){},l=e.isSpy=function(t){return t&&t.__isSpy===!0},f=[];e.restoreSpies=function(){for(var t=f.length-1;t>=0;t--)f[t].restore();f=[]}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.stringContains=e.objectContains=e.arrayContains=e.functionThrows=e.isA=e.isObject=e.isArray=e.isFunction=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},u=n(2),a=r(u),i=n(23),c=r(i),s=e.isFunction=function(t){return"function"==typeof t},l=e.isArray=function(t){return Array.isArray(t)},f=e.isObject=function(t){return t&&!l(t)&&"object"===("undefined"==typeof t?"undefined":o(t))},p=(e.isA=function(t,e){return s(e)?t instanceof e:"array"===e?Array.isArray(t):("undefined"==typeof t?"undefined":o(t))===e},e.functionThrows=function(t,e,n,r){try{t.apply(e,n)}catch(o){if(null==r)return!0;if(s(r)&&o instanceof r)return!0;var u=o.message||o;if("string"==typeof u){if((0,a["default"])(r)&&r.test(o.message))return!0;if("string"==typeof r&&-1!==u.indexOf(r))return!0}}return!1},e.arrayContains=function(t,e,n){return t.some(function(t){return n(t,e)!==!1})},function(t){return"object"===("undefined"==typeof Reflect?"undefined":o(Reflect))&&"function"==typeof Reflect.ownKeys?Reflect.ownKeys(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}):"function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}).concat((0,c["default"])(t)):(0,c["default"])(t)});e.objectContains=function y(t,e,n){return p(e).every(function(r){return f(t[r])&&f(e[r])?y(t[r],e[r],n):n(t[r],e[r])})},e.stringContains=function(t,e){return-1!==t.indexOf(e)}},function(t,e,n){var r=n(11);t.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},function(t,e){"use strict";var n=Function.prototype.toString,r=/^\s*class /,o=function(t){try{var e=n.call(t),o=e.replace(/\/\/.*\n/g,""),u=o.replace(/\/\*[.\s\S]*\*\//g,""),a=u.replace(/\n/gm," ").replace(/ {2}/g," ");return r.test(a)}catch(i){return!1}},u=function(t){try{return o(t)?!1:(n.call(t),!0)}catch(e){return!1}},a=Object.prototype.toString,i="[object Function]",c="[object GeneratorFunction]",s="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(s)return u(t);if(o(t))return!1;var e=a.call(t);return e===i||e===c}},function(t,e){"use strict";var n=Object.prototype.toString,r="function"==typeof Symbol&&"symbol"==typeof Symbol();if(r){var o=Symbol.prototype.toString,u=/^Symbol\(.*\)$/,a=function(t){return"symbol"!=typeof t.valueOf()?!1:u.test(o.call(t))};t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return a(t)}catch(e){return!1}}}else t.exports=function(t){return!1}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){if(-1===i.indexOf(t)){i.push(t);for(var e in t)t.hasOwnProperty(e)&&(a["default"].prototype[e]=t[e])}}Object.defineProperty(e,"__esModule",{value:!0});var u=n(3),a=r(u),i=[];e["default"]=o},function(t,e){var n="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,o=Object.prototype.toString,u="[object Function]";t.exports=function(t){var e=this;if("function"!=typeof e||o.call(e)!==u)throw new TypeError(n+e);for(var a,i=r.call(arguments,1),c=function(){if(this instanceof a){var n=e.apply(this,i.concat(r.call(arguments)));return Object(n)===n?n:this}return e.apply(t,i.concat(r.call(arguments)))},s=Math.max(0,e.length-i.length),l=[],f=0;s>f;f++)l.push("$"+f);if(a=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(c),e.prototype){var p=function(){};p.prototype=e.prototype,a.prototype=new p,p.prototype=null}return a}},function(t,e,n){var r=n(10);t.exports=Function.prototype.bind||r},function(t,e,n){"use strict";var r=n(7),o=Function.prototype.toString,u=/^\s*function/,a=/^\([^\)]*\) *=>/,i=/^[^=]*=>/;t.exports=function(t){if(!r(t))return!1;var e=o.call(t);return e.length>0&&!u.test(e)&&(a.test(e)||i.test(e))}},function(t,e){"use strict";var n=Boolean.prototype.toString,r=function(t){try{return n.call(t),!0}catch(e){return!1}},o=Object.prototype.toString,u="[object Boolean]",a="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){return"boolean"==typeof t?!0:"object"!=typeof t?!1:a?r(t):o.call(t)===u}},function(t,e){"use strict";var n=Date.prototype.getDay,r=function(t){try{return n.call(t),!0}catch(e){return!1}},o=Object.prototype.toString,u="[object Date]",a="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){return"object"!=typeof t||null===t?!1:a?r(t):o.call(t)===u}},function(t,e){"use strict";t.exports=function(){var t=function(){if("function"!=typeof Map)return null;try{Map.prototype.forEach.call({},function(){})}catch(t){return Map.prototype.forEach}return null}(),e=function(){if("function"!=typeof Set)return null;try{Set.prototype.forEach.call({},function(){})}catch(t){return Set.prototype.forEach}return null}();return{Map:t,Set:e}}},function(t,e,n){"use strict";var r=n(8);t.exports=function(){var t="function"==typeof Symbol&&r(Symbol.iterator)?Symbol.iterator:null;return"function"==typeof Object.getOwnPropertyNames&&"function"==typeof Map&&"function"==typeof Map.prototype.entries&&Object.getOwnPropertyNames(Map.prototype).forEach(function(e){"entries"!==e&&"size"!==e&&Map.prototype[e]===Map.prototype.entries&&(t=e)}),t}},function(t,e,n){"use strict";var r=n(18);t.exports=function(t,e){return""===r(t,e)}},function(t,e,n){"use strict";var r=Object.prototype,o=r.toString,u=Boolean.prototype.valueOf,a=n(6),i=n(12),c=n(13),s=n(14),l=n(19),f=n(20),p=n(2),y=n(21),h=n(8),d=n(7),g=Object.prototype.isPrototypeOf,b=function(){},m="foo"===b.name,v="function"==typeof Symbol?Symbol.prototype.valueOf:null,x=n(16)(),S=n(15)(),j=Object.getPrototypeOf;j||(j="object"==typeof"test".__proto__?function(t){return t.__proto__}:function(t){var e,n=t.constructor;if(a(t,"constructor")){if(e=n,!delete t.constructor)return null;n=t.constructor,t.constructor=e}return n?n.prototype:r});var w=Array.isArray||function(t){return"[object Array]"===o.call(t)},O=function(t){return t.replace(/^function ?\(/,"function (").replace("){",") {")},T=function(t){var e=[];try{S.Map.call(t,function(t,n){e.push([t,n])})}catch(n){try{S.Set.call(t,function(t){e.push([t])})}catch(r){return!1}}return e};t.exports=function E(t,e){if(t===e)return"";if(null==t||null==e)return t===e?"":String(t)+" !== "+String(e);var n=o.call(t),r=o.call(t);if(n!==r)return"toStringTag is not the same: "+n+" !== "+r;var b=c(t),A=c(e);if(b||A){if(!b)return"first argument is not a boolean; second argument is";if(!A)return"second argument is not a boolean; first argument is";var k=u.call(t),C=u.call(e);return k===C?"":"primitive value of boolean arguments do not match: "+k+" !== "+C}var B=f(t),N=f(t);if(B||N){if(!B)return"first argument is not a number; second argument is";if(!N)return"second argument is not a number; first argument is";var M=Number(t),_=Number(e);if(M===_)return"";var F=isNaN(t),P=isNaN(e);return F&&!P?"first argument is NaN; second is not":!F&&P?"second argument is NaN; first is not":F&&P?"":"numbers are different: "+t+" !== "+e}var K=y(t),$=y(e);if(K||$){if(!K)return"second argument is string; first is not";if(!$)return"first argument is string; second is not";var D=String(t),I=String(e);return D===I?"":'string values are different: "'+D+'" !== "'+I+'"'}var q=s(t),L=s(e);if(q||L){if(!q)return"second argument is Date, first is not";if(!L)return"first argument is Date, second is not";var R=+t,G=+e;return R===G?"":"Dates have different time values: "+R+" !== "+G}var H=p(t),z=p(e);if(H||z){if(!H)return"second argument is RegExp, first is not";if(!z)return"first argument is RegExp, second is not";var W=String(t),J=String(e);return W===J?"":"regular expressions differ: "+W+" !== "+J}var Q=w(t),U=w(e);if(Q||U){if(!Q)return"second argument is an Array, first is not";if(!U)return"first argument is an Array, second is not";if(t.length!==e.length)return"arrays have different length: "+t.length+" !== "+e.length;if(String(t)!==String(e))return"stringified Arrays differ";for(var V,X,Y=t.length-1,Z="";""===Z&&Y>=0;){if(V=a(t,Y),X=a(e,Y),!V&&X)return"second argument has index "+Y+"; first does not";if(V&&!X)return"first argument has index "+Y+"; second does not";Z=E(t[Y],e[Y]),Y-=1}return Z}var tt=h(t),et=h(e);if(tt!==et)return tt?"first argument is Symbol; second is not":"second argument is Symbol; first is not";if(tt&&et)return v.call(t)===v.call(e)?"":"first Symbol value !== second Symbol value";var nt=l(t),rt=l(e);if(nt!==rt)return nt?"first argument is a Generator; second is not":"second argument is a Generator; first is not";var ot=i(t),ut=i(e);if(ot!==ut)return ot?"first argument is an Arrow function; second is not":"second argument is an Arrow function; first is not";if(d(t)||d(e)){if(m&&""!==E(t.name,e.name))return'Function names differ: "'+t.name+'" !== "'+e.name+'"';if(""!==E(t.length,e.length))return"Function lengths differ: "+t.length+" !== "+e.length;var at=O(String(t)),it=O(String(e));return""===E(at,it)?"":nt||ot?""===E(at,it)?"":"Function string representations differ":""===E(at.replace(/\)\s*\{/,"){"),it.replace(/\)\s*\{/,"){"))?"":"Function string representations differ"}if("object"==typeof t||"object"==typeof e){if(typeof t!=typeof e)return"arguments have a different typeof: "+typeof t+" !== "+typeof e;if(g.call(t,e))return"first argument is the [[Prototype]] of the second";if(g.call(e,t))return"second argument is the [[Prototype]] of the first";if(j(t)!==j(e))return"arguments have a different [[Prototype]]";if(x){var ct=t[x],st=d(ct),lt=e[x],ft=d(lt);if(st!==ft)return st?"first argument is iterable; second is not":"second argument is iterable; first is not";if(st&&ft){var pt,yt,ht,dt=ct.call(t),gt=lt.call(e);do if(pt=dt.next(),yt=gt.next(),!pt.done&&!yt.done&&(ht=E(pt,yt),""!==ht))return"iteration results are not equal: "+ht;while(!pt.done&&!yt.done);return pt.done&&!yt.done?"first argument finished iterating before second":!pt.done&&yt.done?"second argument finished iterating before first":""}}else if(S.Map||S.Set){var bt=T(t),mt=T(e),vt=w(bt),xt=w(mt);if(vt&&!xt)return"first argument has Collection entries, second does not";if(!vt&&xt)return"second argument has Collection entries, first does not";if(vt&&xt){var St=E(bt,mt);return""===St?"":"Collection entries differ: "+St}}var jt,wt,Ot,Tt;for(jt in t)if(a(t,jt)){if(!a(e,jt))return'first argument has key "'+jt+'"; second does not';if(wt=t[jt]&&t[jt][jt]===t,Ot=e[jt]&&e[jt][jt]===e,wt!==Ot)return wt?'first argument has a circular reference at key "'+jt+'"; second does not':'second argument has a circular reference at key "'+jt+'"; first does not';if(!wt&&!Ot&&(Tt=E(t[jt],e[jt]),""!==Tt))return'value at key "'+jt+'" differs: '+Tt}for(jt in e)if(a(e,jt)&&!a(t,jt))return'second argument has key "'+jt+'"; first does not';return""}return!1}},function(t,e){"use strict";var n=Object.prototype.toString,r=Function.prototype.toString,o=/^\s*function\*/;t.exports=function(t){if("function"!=typeof t)return!1;var e=n.call(t);return("[object Function]"===e||"[object GeneratorFunction]"===e)&&o.test(r.call(t))}},function(t,e){"use strict";var n=Number.prototype.toString,r=function(t){try{return n.call(t),!0}catch(e){return!1}},o=Object.prototype.toString,u="[object Number]",a="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){return"number"==typeof t?!0:"object"!=typeof t?!1:a?r(t):o.call(t)===u}},function(t,e){"use strict";var n=String.prototype.valueOf,r=function(t){try{return n.call(t),!0}catch(e){return!1}},o=Object.prototype.toString,u="[object String]",a="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){return"string"==typeof t?!0:"object"!=typeof t?!1:a?r(t):o.call(t)===u}},function(t,e){function n(t){return String(t).replace(/"/g,"&quot;")}function r(t){return"[object Array]"===s(t)}function o(t){return"[object Date]"===s(t)}function u(t){return"[object RegExp]"===s(t)}function a(t){return"[object Error]"===s(t)}function i(t){return"[object Symbol]"===s(t)}function c(t,e){return O.call(t,e)}function s(t){return Object.prototype.toString.call(t)}function l(t){if(t.name)return t.name;var e=t.toString().match(/^function\s*([\w$]+)/);return e?e[1]:void 0}function f(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;r>n;n++)if(t[n]===e)return n;return-1}function p(t){if(!m)return!1;try{return m.call(t),!0}catch(e){}return!1}function y(t){if(!j)return!1;try{return j.call(t),!0}catch(e){}return!1}function h(t){return t&&"object"==typeof t?"undefined"!=typeof HTMLElement&&t instanceof HTMLElement?!0:"string"==typeof t.nodeName&&"function"==typeof t.getAttribute:!1}function d(t){function e(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(16>e?"0":"")+e.toString(16)}var n=t.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,e);return"'"+n+"'"}var g="function"==typeof Map&&Map.prototype,b=Object.getOwnPropertyDescriptor&&g?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,m=g&&b&&"function"==typeof b.get?b.get:null,v=g&&Map.prototype.forEach,x="function"==typeof Set&&Set.prototype,S=Object.getOwnPropertyDescriptor&&x?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,j=x&&S&&"function"==typeof S.get?S.get:null,w=x&&Set.prototype.forEach;t.exports=function T(t,e,s,g){function b(t,n){return n&&(g=g.slice(),g.push(n)),T(t,e,s+1,g)}e||(e={});var x=void 0===e.depth?5:e.depth;if(void 0===s&&(s=0),s>=x&&x>0&&t&&"object"==typeof t)return"[Object]";if(void 0===g)g=[];else if(f(g,t)>=0)return"[Circular]";if("string"==typeof t)return d(t);if("function"==typeof t){var S=l(t);return"[Function"+(S?": "+S:"")+"]"}if(null===t)return"null";if(i(t)){var O=Symbol.prototype.toString.call(t);return"object"==typeof t?"Object("+O+")":O}if(h(t)){for(var E="<"+String(t.nodeName).toLowerCase(),A=t.attributes||[],k=0;k<A.length;k++)E+=" "+A[k].name+'="'+n(A[k].value)+'"';return E+=">",t.childNodes&&t.childNodes.length&&(E+="..."),E+="</"+String(t.nodeName).toLowerCase()+">"}if(r(t)){if(0===t.length)return"[]";for(var C=Array(t.length),k=0;k<t.length;k++)C[k]=c(t,k)?b(t[k],t):"";return"[ "+C.join(", ")+" ]"}if(a(t)){var B=[];for(var N in t)c(t,N)&&(/[^\w$]/.test(N)?B.push(b(N)+": "+b(t[N])):B.push(N+": "+b(t[N])));return 0===B.length?"["+t+"]":"{ ["+t+"] "+B.join(", ")+" }"}if("object"==typeof t&&"function"==typeof t.inspect)return t.inspect();if(p(t)){var B=[];return v.call(t,function(e,n){B.push(b(n,t)+" => "+b(e,t))}),"Map ("+m.call(t)+") {"+B.join(", ")+"}"}if(y(t)){var B=[];return w.call(t,function(e){B.push(b(e,t))}),"Set ("+j.call(t)+") {"+B.join(", ")+"}"}if("object"!=typeof t||o(t)||u(t))return String(t);var C=[],M=[];for(var N in t)c(t,N)&&M.push(N);M.sort();for(var k=0;k<M.length;k++){var N=M[k];/[^\w$]/.test(N)?C.push(b(N)+": "+b(t[N],t)):C.push(N+": "+b(t[N],t))}return 0===C.length?"{}":"{ "+C.join(", ")+" }"};var O=Object.prototype.hasOwnProperty||function(t){return t in this}},function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty,o=Object.prototype.toString,u=Array.prototype.slice,a=n(24),i=!{toString:null}.propertyIsEnumerable("toString"),c=function(){}.propertyIsEnumerable("prototype"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(t){var e=t.constructor;return e&&e.prototype===t},f={$console:!0,$frame:!0,$frameElement:!0,$frames:!0,$parent:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!f["$"+t]&&r.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{l(window[t])}catch(e){return!0}}catch(e){return!0}return!1}(),y=function(t){if("undefined"==typeof window||!p)return l(t);try{return l(t)}catch(e){return!1}},h=function(t){var e=null!==t&&"object"==typeof t,n="[object Function]"===o.call(t),u=a(t),l=e&&"[object String]"===o.call(t),f=[];if(!e&&!n&&!u)throw new TypeError("Object.keys called on a non-object");var p=c&&n;if(l&&t.length>0&&!r.call(t,0))for(var h=0;h<t.length;++h)f.push(String(h));if(u&&t.length>0)for(var d=0;d<t.length;++d)f.push(String(d));else for(var g in t)p&&"prototype"===g||!r.call(t,g)||f.push(String(g));if(i)for(var b=y(t),m=0;m<s.length;++m)b&&"constructor"===s[m]||!r.call(t,s[m])||f.push(s[m]);return f};h.shim=function(){if(Object.keys){var t=function(){return 2===(Object.keys(arguments)||"").length}(1,2);if(!t){var e=Object.keys;Object.keys=function(t){return e(a(t)?u.call(t):t)}}}else Object.keys=h;return Object.keys||h},t.exports=h},function(t,e){"use strict";var n=Object.prototype.toString;t.exports=function(t){var e=n.call(t),r="[object Arguments]"===e;return r||(r="[object Array]"!==e&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===n.call(t.callee)),r}}])});
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