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.15.1 to 1.15.2

3

lib/index.js

@@ -36,3 +36,4 @@ 'use strict';

exports.default = expect;
module.exports = expect;
exports.assert = _assert2.default;

@@ -39,0 +40,0 @@ exports.extend = _extend2.default;

{
"name": "expect",
"version": "1.15.1",
"version": "1.15.2",
"description": "Write better assertions",

@@ -5,0 +5,0 @@ "author": "Michael Jackson",

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

exports.default = expect;
module.exports = expect;
exports.assert = _assert2.default;

@@ -95,0 +96,0 @@ exports.extend = _extend2.default;

@@ -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)}Object.defineProperty(e,"__esModule",{value:!0}),e.restoreSpies=e.isSpy=e.spyOn=e.createSpy=e.extend=e.assert=void 0;var a=n(3),u=r(a),i=n(4),s=n(1),c=r(s),l=n(9),f=r(l);o.createSpy=i.createSpy,o.spyOn=i.spyOn,o.isSpy=i.isSpy,o.restoreSpies=i.restoreSpies,o.assert=c["default"],o.extend=f["default"],e["default"]=o,e.assert=c["default"],e.extend=f["default"],e.createSpy=i.createSpy,e.spyOn=i.spyOn,e.isSpy=i.isSpy,e.restoreSpies=i.restoreSpies},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),s=n(2),c=r(s),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,c["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,c["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)||"string"==typeof this.actual,'The "actual" argument in expect(actual).toInclude() must be an array 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,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]?c:arguments[1];null==t&&(t=c),(0,i["default"])((0,s.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,s.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),s=n(5),c=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.isA=e.isArray=e.stringContains=e.arrayContains=e.functionThrows=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),s=r(i),c=e.isFunction=function(t){return"function"==typeof t};e.functionThrows=function(t,e,n,r){try{t.apply(e,n)}catch(o){if(null==r)return!0;if(c(r)&&o instanceof r)return!0;var a=o.message||o;if("string"==typeof a){if((0,s["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.stringContains=function(t,e){return-1!==t.indexOf(e)},e.isArray=function(t){return Array.isArray(t)},e.isA=function(t,e){return c(e)?t instanceof e:"array"===e?Array.isArray(t):("undefined"==typeof t?"undefined":o(t))===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]",s="[object GeneratorFunction]",c="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(c)return a(t);if(o(t))return!1;var e=u.call(t);return e===i||e===s}},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),s=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)))},c=Math.max(0,e.length-i.length),l=[],f=0;c>f;f++)l.push("$"+f);if(u=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(s),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),s=n(14),c=n(15),l=n(19),f=n(20),p=n(2),y=n(21),h=n(8),d=n(6),g=Object.prototype.isPrototypeOf,m=function(){},b="foo"===m.name,v="function"==typeof Symbol?Symbol.prototype.valueOf:null,S=n(17)(),x=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{x.Map.call(t,function(t,n){e.push([t,n])})}catch(n){try{x.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 m=s(t),A=s(e);if(m||A){if(!m)return"first argument is not a boolean; second argument is";if(!A)return"second argument is not a boolean; first argument is";var M=a.call(t),B=a.call(e);return M===B?"":"primitive value of boolean arguments do not match: "+M+" !== "+B}var _=f(t),N=f(t);if(_||N){if(!_)return"first argument is not a number; second argument is";if(!N)return"second argument is not a number; first argument is";var C=Number(t),F=Number(e);if(C===F)return"";var k=isNaN(t),P=isNaN(e);return k&&!P?"first argument is NaN; second is not":!k&&P?"second argument is NaN; first is not":k&&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=c(t),R=c(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(b&&""!==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(S){var st=t[S],ct=d(st),lt=e[S],ft=d(lt);if(ct!==ft)return ct?"first argument is iterable; second is not":"second argument is iterable; first is not";if(ct&&ft){var pt,yt,ht,dt=st.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(x.Map||x.Set){var mt=E(t),bt=E(e),vt=T(mt),St=T(bt);if(vt&&!St)return"first argument has Collection entries, second does not";if(!vt&&St)return"second argument has Collection entries, first does not";if(vt&&St){var xt=w(mt,bt);return""===xt?"":"Collection entries differ: "+xt}}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]"===c(t)}function o(t){return"[object Date]"===c(t)}function a(t){return"[object RegExp]"===c(t)}function u(t){return"[object Error]"===c(t)}function i(t){return"[object Symbol]"===c(t)}function s(t,e){return O.call(t,e)}function c(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(!b)return!1;try{return b.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,m=Object.getOwnPropertyDescriptor&&g?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,b=g&&m&&"function"==typeof m.get?m.get:null,v=g&&Map.prototype.forEach,S="function"==typeof Set&&Set.prototype,x=Object.getOwnPropertyDescriptor&&S?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,j=S&&x&&"function"==typeof x.get?x.get:null,T=S&&Set.prototype.forEach;t.exports=function E(t,e,c,g){function m(t,n){return n&&(g=g.slice(),g.push(n)),E(t,e,c+1,g)}e||(e={});var S=void 0===e.depth?5:e.depth;if(void 0===c&&(c=0),c>=S&&S>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 x=l(t);return"[Function"+(x?": "+x:"")+"]"}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||[],M=0;M<A.length;M++)w+=" "+A[M].name+'="'+n(A[M].value)+'"';return w+=">",t.childNodes&&t.childNodes.length&&(w+="..."),w+="</"+String(t.nodeName).toLowerCase()+">"}if(r(t)){if(0===t.length)return"[]";for(var B=Array(t.length),M=0;M<t.length;M++)B[M]=s(t,M)?m(t[M],t):"";return"[ "+B.join(", ")+" ]"}if(u(t)){var _=[];for(var N in t)s(t,N)&&(/[^\w$]/.test(N)?_.push(m(N)+": "+m(t[N])):_.push(N+": "+m(t[N])));return 0===_.length?"["+t+"]":"{ ["+t+"] "+_.join(", ")+" }"}if("object"==typeof t&&"function"==typeof t.inspect)return t.inspect();if(p(t)){var _=[];return v.call(t,function(e,n){_.push(m(n,t)+" => "+m(e,t))}),"Map ("+b.call(t)+") {"+_.join(", ")+"}"}if(y(t)){var _=[];return T.call(t,function(e){_.push(m(e,t))}),"Set ("+j.call(t)+") {"+_.join(", ")+"}"}if("object"!=typeof t||o(t)||a(t))return String(t);var B=[],C=[];for(var N in t)s(t,N)&&C.push(N);C.sort();for(var M=0;M<C.length;M++){var N=C[M];/[^\w$]/.test(N)?B.push(m(N)+": "+m(t[N],t)):B.push(N+": "+m(t[N],t))}return 0===B.length?"{}":"{ "+B.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 u["default"](t)}Object.defineProperty(e,"__esModule",{value:!0}),e.restoreSpies=e.isSpy=e.spyOn=e.createSpy=e.extend=e.assert=void 0;var a=n(3),u=r(a),i=n(4),s=n(1),c=r(s),l=n(9),f=r(l);o.createSpy=i.createSpy,o.spyOn=i.spyOn,o.isSpy=i.isSpy,o.restoreSpies=i.restoreSpies,o.assert=c["default"],o.extend=f["default"],t.exports=o,e.assert=c["default"],e.extend=f["default"],e.createSpy=i.createSpy,e.spyOn=i.spyOn,e.isSpy=i.isSpy,e.restoreSpies=i.restoreSpies},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),s=n(2),c=r(s),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,c["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,c["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)||"string"==typeof this.actual,'The "actual" argument in expect(actual).toInclude() must be an array 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,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]?c:arguments[1];null==t&&(t=c),(0,i["default"])((0,s.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,s.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),s=n(5),c=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.isA=e.isArray=e.stringContains=e.arrayContains=e.functionThrows=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),s=r(i),c=e.isFunction=function(t){return"function"==typeof t};e.functionThrows=function(t,e,n,r){try{t.apply(e,n)}catch(o){if(null==r)return!0;if(c(r)&&o instanceof r)return!0;var a=o.message||o;if("string"==typeof a){if((0,s["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.stringContains=function(t,e){return-1!==t.indexOf(e)},e.isArray=function(t){return Array.isArray(t)},e.isA=function(t,e){return c(e)?t instanceof e:"array"===e?Array.isArray(t):("undefined"==typeof t?"undefined":o(t))===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]",s="[object GeneratorFunction]",c="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(c)return a(t);if(o(t))return!1;var e=u.call(t);return e===i||e===s}},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),s=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)))},c=Math.max(0,e.length-i.length),l=[],f=0;c>f;f++)l.push("$"+f);if(u=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(s),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),s=n(14),c=n(15),l=n(19),f=n(20),p=n(2),y=n(21),h=n(8),d=n(6),g=Object.prototype.isPrototypeOf,m=function(){},b="foo"===m.name,v="function"==typeof Symbol?Symbol.prototype.valueOf:null,S=n(17)(),x=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{x.Map.call(t,function(t,n){e.push([t,n])})}catch(n){try{x.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 m=s(t),A=s(e);if(m||A){if(!m)return"first argument is not a boolean; second argument is";if(!A)return"second argument is not a boolean; first argument is";var M=a.call(t),B=a.call(e);return M===B?"":"primitive value of boolean arguments do not match: "+M+" !== "+B}var _=f(t),N=f(t);if(_||N){if(!_)return"first argument is not a number; second argument is";if(!N)return"second argument is not a number; first argument is";var C=Number(t),F=Number(e);if(C===F)return"";var k=isNaN(t),P=isNaN(e);return k&&!P?"first argument is NaN; second is not":!k&&P?"second argument is NaN; first is not":k&&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=c(t),R=c(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(b&&""!==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(S){var st=t[S],ct=d(st),lt=e[S],ft=d(lt);if(ct!==ft)return ct?"first argument is iterable; second is not":"second argument is iterable; first is not";if(ct&&ft){var pt,yt,ht,dt=st.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(x.Map||x.Set){var mt=E(t),bt=E(e),vt=T(mt),St=T(bt);if(vt&&!St)return"first argument has Collection entries, second does not";if(!vt&&St)return"second argument has Collection entries, first does not";if(vt&&St){var xt=w(mt,bt);return""===xt?"":"Collection entries differ: "+xt}}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]"===c(t)}function o(t){return"[object Date]"===c(t)}function a(t){return"[object RegExp]"===c(t)}function u(t){return"[object Error]"===c(t)}function i(t){return"[object Symbol]"===c(t)}function s(t,e){return O.call(t,e)}function c(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(!b)return!1;try{return b.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,m=Object.getOwnPropertyDescriptor&&g?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,b=g&&m&&"function"==typeof m.get?m.get:null,v=g&&Map.prototype.forEach,S="function"==typeof Set&&Set.prototype,x=Object.getOwnPropertyDescriptor&&S?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,j=S&&x&&"function"==typeof x.get?x.get:null,T=S&&Set.prototype.forEach;t.exports=function E(t,e,c,g){function m(t,n){return n&&(g=g.slice(),g.push(n)),E(t,e,c+1,g)}e||(e={});var S=void 0===e.depth?5:e.depth;if(void 0===c&&(c=0),c>=S&&S>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 x=l(t);return"[Function"+(x?": "+x:"")+"]"}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||[],M=0;M<A.length;M++)w+=" "+A[M].name+'="'+n(A[M].value)+'"';return w+=">",t.childNodes&&t.childNodes.length&&(w+="..."),w+="</"+String(t.nodeName).toLowerCase()+">"}if(r(t)){if(0===t.length)return"[]";for(var B=Array(t.length),M=0;M<t.length;M++)B[M]=s(t,M)?m(t[M],t):"";return"[ "+B.join(", ")+" ]"}if(u(t)){var _=[];for(var N in t)s(t,N)&&(/[^\w$]/.test(N)?_.push(m(N)+": "+m(t[N])):_.push(N+": "+m(t[N])));return 0===_.length?"["+t+"]":"{ ["+t+"] "+_.join(", ")+" }"}if("object"==typeof t&&"function"==typeof t.inspect)return t.inspect();if(p(t)){var _=[];return v.call(t,function(e,n){_.push(m(n,t)+" => "+m(e,t))}),"Map ("+b.call(t)+") {"+_.join(", ")+"}"}if(y(t)){var _=[];return T.call(t,function(e){_.push(m(e,t))}),"Set ("+j.call(t)+") {"+_.join(", ")+"}"}if("object"!=typeof t||o(t)||a(t))return String(t);var B=[],C=[];for(var N in t)s(t,N)&&C.push(N);C.sort();for(var M=0;M<C.length;M++){var N=C[M];/[^\w$]/.test(N)?B.push(m(N)+": "+m(t[N],t)):B.push(N+": "+m(t[N],t))}return 0===B.length?"{}":"{ "+B.join(", ")+" }"};var O=Object.prototype.hasOwnProperty||function(t){return t in this}}])});
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