Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

should

Package Overview
Dependencies
Maintainers
4
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

should - npm Package Compare versions

Comparing version 4.4.4 to 4.5.0

lib/config.js

5

History.md

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

4.5.0 / 2015-01-11
==================
* Added config flag .useOldDeepEqual to use old .eql implementation
4.4.4 / 2015-01-08

@@ -2,0 +7,0 @@ ==================

7

lib/ext/contain.js

@@ -7,4 +7,4 @@ /*!

var util = require('../util'),
eql = require('should-equal');
var util = require('../util');
_eql = require('../eql');

@@ -39,2 +39,3 @@ module.exports = function(should, Assertion) {

Assertion.add('containEql', function(other) {
var eql = _eql();
this.params = { operator: 'to contain ' + i(other) };

@@ -83,2 +84,3 @@ var obj = this.obj;

Assertion.add('containDeepOrdered', function(other) {
var eql = _eql();
this.params = { operator: 'to contain ' + i(other) };

@@ -135,2 +137,3 @@

Assertion.add('containDeep', function(other) {
var eql = _eql();
this.params = { operator: 'to contain ' + i(other) };

@@ -137,0 +140,0 @@

@@ -7,4 +7,6 @@ /*!

var eql = require('should-equal');
var _eql = require('../eql');
var config = require('../config');
var util = require('../util');

@@ -34,2 +36,3 @@

Assertion.add('eql', function(val, description) {
var eql = _eql();
this.params = {operator: 'to equal', expected: val, showDiff: true, message: description};

@@ -39,7 +42,9 @@

if(!strictResult.result) {
var result = config.useOldDeepEqual ? strictResult: strictResult.result;
if(!config.useOldDeepEqual && !strictResult.result) {
this.params.details = util.formatEqlResult(strictResult, this.obj, val, should.format);
}
this.assert(strictResult.result);
this.assert(result);
});

@@ -46,0 +51,0 @@

@@ -8,3 +8,3 @@ /*!

var util = require('../util'),
eql = require('should-equal');
_eql = require('../eql');

@@ -54,2 +54,3 @@ module.exports = function(should, Assertion) {

Assertion.add('match', function(other, description) {
var eql = _eql();
this.params = {operator: 'to match ' + i(other), message: description};

@@ -146,2 +147,3 @@

Assertion.add('matchEach', function(other, description) {
var eql = _eql();
this.params = {operator: 'to match each ' + i(other), message: description};

@@ -148,0 +150,0 @@

@@ -8,3 +8,3 @@ /*!

var util = require('../util'),
eql = require('should-equal');
_eql = require('../eql');

@@ -31,2 +31,4 @@ var aSlice = Array.prototype.slice;

var eql = _eql();
this.params = {

@@ -113,2 +115,3 @@ operator: "to have enumerable property " + util.formatProp(name)

var values = {};
var eql = _eql();
if(arguments.length > 1) {

@@ -115,0 +118,0 @@ names = aSlice.call(arguments);

@@ -34,2 +34,3 @@ /*!

* * `checkProtoEql` boolean - Affect if `.eql` will check objects prototypes
* * `useOldDeepEqual` boolean - Use old deepEqual implementation, that was copied from node's assert.deepEqual (will be removed in 5.x)
*

@@ -51,5 +52,3 @@ * @type {Object}

*/
should.config = {
checkProtoEql: false
};
should.config = require('./config');

@@ -56,0 +55,0 @@ //Expose should to external world.

{
"name": "should",
"description": "test framework agnostic BDD-style assertions",
"version": "4.4.4",
"version": "4.5.0",
"author": "TJ Holowaychuk <tj@vision-media.ca> and contributors",

@@ -6,0 +6,0 @@ "repository": {

@@ -15,2 +15,6 @@ # should.js

### .eql implementation in 4.x
In 4.x `.eql` implementation was changed to fix old bug in deepEqual from node's `assert` module. To do not allow to assume that `10` is equal to `'10'`. You can still use old .eql implementation via `should.config` flags.
## Example

@@ -93,21 +97,6 @@ ```javascript

## Static should and assert module
## API docs
For some rare cases _should_ can be used statically, without `Object.prototype`.
It can be a replacement for the node assert module:
Actual api docs generated by jsdoc comments and available at [http://shouldjs.github.io](http://shouldjs.github.io).
```javascript
assert.fail(actual, expected, message, operator) // just write wrong should assertion
assert(value, message), assert.ok(value, [message]) // should(value).ok
assert.equal(actual, expected, [message]) // should(actual).eql(expected, [message])
assert.notEqual(actual, expected, [message]) // should(actual).not.eql(expected, [message])
assert.deepEqual(actual, expected, [message]) // should(actual).eql(expected, [message])
assert.notDeepEqual(actual, expected, [message]) // should(actual).not.eql(expected, [message])
assert.strictEqual(actual, expected, [message]) // should(actual).equal(expected, [message])
assert.notStrictEqual(actual, expected, [message]) // should(actual).not.equal(expected, [message])
assert.throws(block, [error], [message]) // should(block).throw([error])
assert.doesNotThrow(block, [message]) // should(block).not.throw([error])
assert.ifError(value) // should(value).Error (to check if it is error) or should(value).not.ok (to check that it is falsy)
```
## .not

@@ -114,0 +103,0 @@

/*
* should - test framework agnostic BDD-style assertions
* @version v4.4.4
* @version v4.5.0
* @author TJ Holowaychuk <tj@vision-media.ca> and contributors

@@ -8,2 +8,2 @@ * @link https://github.com/shouldjs/should.js

*/
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Should=t()}}(function(){return function t(e,r,n){function o(s,i){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!i&&u)return u(s,!0);if(a)return a(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var f=r[s]={exports:{}};e[s][0].call(f.exports,function(t){var r=e[s][1][t];return o(r?r:t)},f,f.exports,t,e,r,n)}return r[s].exports}for(var a="function"==typeof require&&require,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(t,e,r){var n=t("./util"),o=t("should-format"),a=function c(t){return new c.Assertion(t)};a.AssertionError=t("./assertion-error"),a.Assertion=t("./assertion"),a.format=o,a.config={checkProtoEql:!1},r=e.exports=a,a.extend=function(t,e){t=t||"should",e=e||Object.prototype;var r=Object.getOwnPropertyDescriptor(e,t);return Object.defineProperty(e,t,{set:function(){},get:function(){return a(n.isWrapperType(this)?this.valueOf():this)},configurable:!0}),{name:t,descriptor:r,proto:e}};var s=Object.prototype,i="should",u=a.extend(i,s);a.noConflict=function(t){return t=t||u,delete t.proto[t.name],t.descriptor&&Object.defineProperty(t.proto,t.name,t.descriptor),a},a.use=function(t){return t(this,this.Assertion),this},a.use(t("./ext/assert")).use(t("./ext/chain")).use(t("./ext/bool")).use(t("./ext/number")).use(t("./ext/eql")).use(t("./ext/type")).use(t("./ext/string")).use(t("./ext/property")).use(t("./ext/error")).use(t("./ext/match")).use(t("./ext/contain"))},{"./assertion":3,"./assertion-error":2,"./ext/assert":5,"./ext/bool":6,"./ext/chain":7,"./ext/contain":8,"./ext/eql":9,"./ext/error":10,"./ext/match":11,"./ext/number":12,"./ext/property":13,"./ext/string":14,"./ext/type":15,"./util":16,"should-format":19}],2:[function(t,e){var r=t("./util"),n=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,this.message=t.message;var e=t.stackStartFunction;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var n=new Error;if(n.stack){var o=n.stack;if(e){var a=r.functionName(e),s=o.indexOf("\n"+a);if(s>=0){var i=o.indexOf("\n",s+1);o=o.substring(i+1)}}this.stack=o}}};n.prototype=Object.create(Error.prototype),e.exports=n},{"./util":16}],3:[function(t,e){function r(t){this.obj=t}function n(t){return i+t}function o(t){return t.split("\n").map(n).join("\n")}var a=t("./assertion-error"),s=(t("./util"),t("should-format"));r.add=function(t,e,n){var o={enumerable:!0};"undefined"==typeof n&&(n=!1),o[n?"get":"value"]=function(){var t=new r(this.obj,s);t.anyOne=this.anyOne;try{e.apply(t,arguments)}catch(n){if(this.params=t.params,n instanceof a){if(this.negate)return this.obj=t.obj,this.negate=!1,this;this.nestedErrorMessage=n.message,this.fail()}throw n}return this.params=t.params,this.negate&&(t.negate=!0,this.nestedErrorMessage=t.params.message?t.params.message:t.getMessage(),this.fail()),this.obj=t.obj,this.negate=!1,this},Object.defineProperty(r.prototype,t,o)},r.alias=function(t,e){var n=Object.getOwnPropertyDescriptor(r.prototype,t);if(!n)throw new Error("Alias "+t+" -> "+e+" could not be created as "+t+" not defined");Object.defineProperty(r.prototype,e,n)};var i=" ";r.prototype={constructor:r,assert:function(t){if(t)return this;var e=this.params,r=e.message,n=!1;r||(r=this.getMessage(),n=!0),this.nestedErrorMessage&&r!=this.nestedErrorMessage&&(r=r+"\n"+o(this.nestedErrorMessage));var s=new a({message:r,actual:this.obj,expected:e.expected,stackStartFunction:e.stackStartFunction||this.assert});throw s.showDiff=e.showDiff,s.operator=e.operator,s.generatedMessage=n,s},fail:function(){return this.assert(!1)},getMessage:function(){var t=s("obj"in this.params?this.params.obj:this.obj),e="expected"in this.params?" "+s(this.params.expected):"",r="details"in this.params&&this.params.details?" ("+this.params.details+")":"";return"expected "+t+(this.negate?" not ":" ")+this.params.operator+e+r},get not(){return this.negate=!this.negate,this},get any(){return this.anyOne=!0,this}},e.exports=r},{"./assertion-error":2,"./util":16,"should-format":19}],4:[function(t,e){function r(t,e,n,o,a){var s=new i(t);s.params={operator:o,expected:e,message:n,stackStartFunction:a||r},s.fail()}function n(t,e){t||r(t,!0,e,"==",f.ok)}function o(t,e){return t&&e?"[object RegExp]"==Object.prototype.toString.call(e)?e.test(t):t instanceof e?!0:e.call({},t)===!0?!0:!1:!1}function a(t,e,n,a){var i;s.isString(n)&&(a=n,n=null);try{e()}catch(u){i=u}if(a=(n&&n.name?" ("+n.name+")":".")+(a?" "+a:"."),t&&!i&&r(i,n,"Missing expected exception"+a),!t&&o(i,n)&&r(i,n,"Got unwanted exception"+a),t&&i&&n&&!o(i,n)||!t&&i)throw i}var s=t("./../util"),i=t("./../assertion"),u=t("should-equal"),c=Array.prototype.slice,f=e.exports=n;f.fail=r,f.ok=n,f.equal=function(t,e,n){t!=e&&r(t,e,n,"==",f.equal)},f.notEqual=function(t,e,n){t==e&&r(t,e,n,"!=",f.notEqual)},f.deepEqual=function(t,e,n){u(t,e).result||r(t,e,n,"deepEqual",f.deepEqual)},f.notDeepEqual=function(t,e,n){u(t,e).result&&r(t,e,n,"notDeepEqual",f.notDeepEqual)},f.strictEqual=function(t,e,n){t!==e&&r(t,e,n,"===",f.strictEqual)},f.notStrictEqual=function(t,e,n){t===e&&r(t,e,n,"!==",f.notStrictEqual)},f.throws=function(){a.apply(this,[!0].concat(c.call(arguments)))},f.doesNotThrow=function(){a.apply(this,[!1].concat(c.call(arguments)))},f.ifError=function(t){if(t)throw t}},{"./../assertion":3,"./../util":16,"should-equal":17}],5:[function(t,e){var r=t("../util"),n=t("./_assert"),o=t("../assertion-error");e.exports=function(t){var e=t.format;r.merge(t,n),t.exist=t.exists=function(r,n){if(null==r)throw new o({message:n||"expected "+e(r)+" to exist",stackStartFunction:t.exist})},t.not={},t.not.exist=t.not.exists=function(r,n){if(null!=r)throw new o({message:n||"expected "+e(r)+" to not exist",stackStartFunction:t.not.exist})}}},{"../assertion-error":2,"../util":16,"./_assert":4}],6:[function(t,e){e.exports=function(t,e){e.add("true",function(){this.is.exactly(!0)},!0),e.alias("true","True"),e.add("false",function(){this.is.exactly(!1)},!0),e.alias("false","False"),e.add("ok",function(){this.params={operator:"to be truthy"},this.assert(this.obj)},!0)}},{}],7:[function(t,e){e.exports=function(t,e){function r(t){Object.defineProperty(e.prototype,t,{get:function(){return this},enumerable:!0})}["an","of","a","and","be","have","with","is","which","the"].forEach(r)}},{}],8:[function(t,e){var r=t("../util"),n=t("should-equal");e.exports=function(t,e){var o=t.format;e.add("containEql",function(t){this.params={operator:"to contain "+o(t)};var e=this.obj;r.isArray(e)?this.assert(e.some(function(e){return n(e,t).result})):r.isString(e)?this.assert(e.indexOf(String(t))>=0):r.isObject(e)?r.forOwn(t,function(t,r){e.should.have.property(r,t)}):this.assert(!1)}),e.add("containDeepOrdered",function(e){this.params={operator:"to contain "+o(e)};var n=this.obj;if(r.isArray(n))if(r.isArray(e)){var a=0;n.forEach(function(r){try{t(r).not.be.Null.and.containDeepOrdered(e[a]),a++}catch(n){if(n instanceof t.AssertionError)return;throw n}},this),this.assert(a==e.length)}else this.assert(!1);else r.isString(n)?this.assert(n.indexOf(String(e))>=0):r.isObject(n)?r.isObject(e)?r.forOwn(e,function(e,r){t(n[r]).not.be.Null.and.containDeepOrdered(e)}):this.assert(!1):this.eql(e)}),e.add("containDeep",function(e){this.params={operator:"to contain "+o(e)};var n=this.obj;if(r.isArray(n))if(r.isArray(e)){var a={};e.forEach(function(e){this.assert(n.some(function(r,n){if(n in a)return!1;try{return t(r).not.be.Null.and.containDeep(e),a[n]=!0,!0}catch(o){if(o instanceof t.AssertionError)return!1;throw o}}))},this)}else this.assert(!1);else r.isString(n)?this.assert(n.indexOf(String(e))>=0):r.isObject(n)?r.isObject(e)?r.forOwn(e,function(e,r){t(n[r]).not.be.Null.and.containDeep(e)}):this.assert(!1):this.eql(e)})}},{"../util":16,"should-equal":17}],9:[function(t,e){var r=t("should-equal"),n=t("../util");e.exports=function(t,e){e.add("eql",function(e,o){this.params={operator:"to equal",expected:e,showDiff:!0,message:o};var a=r(this.obj,e,t.config);a.result||(this.params.details=n.formatEqlResult(a,this.obj,e,t.format)),this.assert(a.result)}),e.add("equal",function(t,e){this.params={operator:"to be",expected:t,showDiff:!0,message:e},this.assert(t===this.obj)}),e.alias("equal","exactly")}},{"../util":16,"should-equal":17}],10:[function(t,e){var r=t("../util");e.exports=function(t,e){var n=t.format;e.add("throw",function(e,o){var a=this.obj,s={},i="",u=!1;this.is.a.Function;var c=!0;try{a()}catch(f){u=!0,s=f}if(u)if(e){if("string"==typeof e)c=e==s.message;else if(e instanceof RegExp)c=e.test(s.message);else if("function"==typeof e)c=s instanceof e;else if(r.isObject(e))try{s.should.match(e)}catch(f){if(!(f instanceof t.AssertionError))throw f;i=": "+f.message,c=!1}if(c){if("function"==typeof e&&o)try{s.should.match(o)}catch(f){if(!(f instanceof t.AssertionError))throw f;i=": "+f.message,c=!1}}else"string"==typeof e||e instanceof RegExp?i=" with a message matching "+n(e)+", but got '"+s.message+"'":"function"==typeof e&&(i=" of type "+r.functionName(e)+", but got "+r.functionName(s.constructor))}else i=" (got "+n(s)+")";this.params={operator:"to throw exception"+i},this.assert(u),this.assert(c)}),e.alias("throw","throwError")}},{"../util":16}],11:[function(t,e){var r=t("../util"),n=t("should-equal");e.exports=function(t,e){var o=t.format;e.add("match",function(a,s){if(this.params={operator:"to match "+o(a),message:s},!n(this.obj,a).result)if(r.isRegExp(a)){if(r.isString(this.obj))this.assert(a.exec(this.obj));else if(r.isArray(this.obj))this.obj.forEach(function(t){this.assert(a.exec(t))},this);else if(r.isObject(this.obj)){var i=[],u=[];r.forOwn(this.obj,function(t,e){a.exec(t)?u.push(r.formatProp(e)):i.push(r.formatProp(e)+" ("+o(t)+")")},this),i.length&&(this.params.operator+="\n not matched properties: "+i.join(", ")),u.length&&(this.params.operator+="\n matched properties: "+u.join(", ")),this.assert(0==i.length)}}else if(r.isFunction(a)){var c;c=a(this.obj),c instanceof e&&(this.params.operator+="\n "+c.getMessage()),r.isBoolean(c)&&this.assert(c)}else r.isObject(a)?(i=[],u=[],r.forOwn(a,function(e,n){try{t(this.obj[n]).match(e),u.push(r.formatProp(n))}catch(a){if(!(a instanceof t.AssertionError))throw a;i.push(r.formatProp(n)+" ("+o(this.obj[n])+")")}},this),i.length&&(this.params.operator+="\n not matched properties: "+i.join(", ")),u.length&&(this.params.operator+="\n matched properties: "+u.join(", ")),this.assert(0==i.length)):this.assert(!1)}),e.add("matchEach",function(t,e){this.params={operator:"to match each "+o(t),message:e};var a=t;r.isRegExp(t)?a=function(e){return!!t.exec(e)}:r.isFunction(t)||(a=function(e){return n(e,t).result}),r.forOwn(this.obj,function(t,e){var n=a(t,e);r.isBoolean(n)&&this.assert(n)},this)})}},{"../util":16,"should-equal":17}],12:[function(t,e){e.exports=function(t,e){e.add("NaN",function(){this.params={operator:"to be NaN"},this.assert(this.obj!==this.obj)},!0),e.add("Infinity",function(){this.params={operator:"to be Infinity"},this.obj.should.be.a.Number.and.not.a.NaN.and.assert(!isFinite(this.obj))},!0),e.add("within",function(t,e,r){this.params={operator:"to be within "+t+".."+e,message:r},this.assert(this.obj>=t&&this.obj<=e)}),e.add("approximately",function(t,e,r){this.params={operator:"to be approximately "+t+" ±"+e,message:r},this.assert(Math.abs(this.obj-t)<=e)}),e.add("above",function(t,e){this.params={operator:"to be above "+t,message:e},this.assert(this.obj>t)}),e.add("below",function(t,e){this.params={operator:"to be below "+t,message:e},this.assert(this.obj<t)}),e.alias("above","greaterThan"),e.alias("below","lessThan")}},{}],13:[function(t,e){var r=t("../util"),n=t("should-equal"),o=Array.prototype.slice;e.exports=function(t,e){var a=t.format;e.add("enumerable",function(t,e){t=String(t),this.params={operator:"to have enumerable property "+r.formatProp(t)},this.assert(this.obj.propertyIsEnumerable(t)),arguments.length>1&&(this.params.operator+=" equal to "+a(e),this.assert(n(e,this.obj[t]).result))}),e.add("enumerables",function(t){arguments.length>1?t=o.call(arguments):r.isArray(t)||(r.isString(t)?t=[t]:(values=t,t=Object.keys(t))),this.params={operator:"to have enumerables "+t.map(r.formatProp)},t.forEach(function(t){this.assert(this.obj.propertyIsEnumerable(t))},this)}),e.add("property",function(t,e){if(t=String(t),arguments.length>1){var r={};r[t]=e,this.have.properties(r)}else this.have.properties(t);this.obj=this.obj[t]}),e.add("properties",function(t){var e={};arguments.length>1?t=o.call(arguments):r.isArray(t)||(r.isString(t)?t=[t]:(e=t,t=Object.keys(t)));var s=Object(this.obj),i=[];t.forEach(function(t){t in s||i.push(r.formatProp(t))});var u=i;0===u.length?u=t.map(r.formatProp):this.anyOne&&(u=t.filter(function(t){return i.indexOf(r.formatProp(t))<0}).map(r.formatProp));var c=(1===u.length?"to have property ":"to have "+(this.anyOne?"any of ":"")+"properties ")+u.join(", ");this.params={obj:this.obj,operator:c},this.assert(0===i.length||this.anyOne&&i.length!=t.length);var f=Object.keys(e);if(f.length){var h=[];u=[],f.forEach(function(t){var o=e[t];n(s[t],o).result?u.push(r.formatProp(t)+" of "+a(o)):h.push(r.formatProp(t)+" of "+a(o)+" (got "+a(s[t])+")")}),(0!==h.length&&!this.anyOne||this.anyOne&&0===u.length)&&(u=h),c=(1===u.length?"to have property ":"to have "+(this.anyOne?"any of ":"")+"properties ")+u.join(", "),this.params={obj:this.obj,operator:c},this.assert(0===h.length||this.anyOne&&h.length!=f.length)}}),e.add("length",function(t,e){this.have.property("length",t,e)}),e.alias("length","lengthOf");var s=Object.prototype.hasOwnProperty;e.add("ownProperty",function(t,e){t=String(t),this.params={obj:this.obj,operator:"to have own property "+r.formatProp(t),message:e},this.assert(s.call(this.obj,t)),this.obj=this.obj[t]}),e.alias("ownProperty","hasOwnProperty"),e.add("empty",function(){if(this.params={operator:"to be empty"},r.isString(this.obj)||r.isArray(this.obj)||r.isArguments(this.obj))this.obj.should.have.property("length",0);else{var t=Object(this.obj);for(var e in t)this.obj.should.not.have.ownProperty(e)}},!0),e.add("keys",function(t){arguments.length>1?t=o.call(arguments):1===arguments.length&&r.isString(t)?t=[t]:0===arguments.length&&(t=[]),t=t.map(String);var e=Object(this.obj),n=[];t.forEach(function(t){s.call(this.obj,t)||n.push(r.formatProp(t))},this);var a=[];Object.keys(e).forEach(function(e){t.indexOf(e)<0&&a.push(r.formatProp(e))});var i=0===t.length?"to be empty":"to have "+(1===t.length?"key ":"keys ");this.params={operator:i+t.map(r.formatProp).join(", ")},n.length>0&&(this.params.operator+="\n missing keys: "+n.join(", ")),a.length>0&&(this.params.operator+="\n extra keys: "+a.join(", ")),this.assert(0===n.length&&0===a.length)}),e.alias("keys","key"),e.add("propertyByPath",function(e){arguments.length>1?e=o.call(arguments):1===arguments.length&&r.isString(e)?e=[e]:0===arguments.length&&(e=[]);var n=e.map(r.formatProp);e=e.map(String);for(var a,s=t(Object(this.obj)),i=[];a=e.shift();)this.params={operator:"to have property by path "+n.join(", ")+" - failed on "+r.formatProp(a)},s=s.have.property(a),i.push(a);this.params={obj:this.obj,operator:"to have property by path "+n.join(", ")},this.obj=s.obj})}},{"../util":16,"should-equal":17}],14:[function(t,e){e.exports=function(t,e){e.add("startWith",function(e,r){this.params={operator:"to start with "+t.format(e),message:r},this.assert(0===this.obj.indexOf(e))}),e.add("endWith",function(e,r){this.params={operator:"to end with "+t.format(e),message:r},this.assert(this.obj.indexOf(e,this.obj.length-e.length)>=0)})}},{}],15:[function(t,e){var r=t("../util");e.exports=function(t,e){e.add("Number",function(){this.params={operator:"to be a number"},this.assert(r.isNumber(this.obj))},!0),e.add("arguments",function(){this.params={operator:"to be arguments"},this.assert(r.isArguments(this.obj))},!0),e.alias("arguments","Arguments"),e.add("type",function(t,e){this.params={operator:"to have type "+t,message:e},(typeof this.obj).should.be.exactly(t,e)}),e.add("instanceof",function(t,e){this.params={operator:"to be an instance of "+r.functionName(t),message:e},this.assert(Object(this.obj)instanceof t)}),e.alias("instanceof","instanceOf"),e.add("Function",function(){this.params={operator:"to be a function"},this.assert(r.isFunction(this.obj))},!0),e.add("Object",function(){this.params={operator:"to be an object"},this.assert(r.isObject(this.obj))},!0),e.add("String",function(){this.params={operator:"to be a string"},this.assert(r.isString(this.obj))},!0),e.add("Array",function(){this.params={operator:"to be an array"},this.assert(r.isArray(this.obj))},!0),e.add("Boolean",function(){this.params={operator:"to be a boolean"},this.assert(r.isBoolean(this.obj))},!0),e.add("Error",function(){this.params={operator:"to be an error"},this.assert(r.isError(this.obj))},!0),e.add("null",function(){this.params={operator:"to be null"},this.assert(null===this.obj)},!0),e.alias("null","Null")}},{"../util":16}],16:[function(t,e,r){function n(t){return f(t)&&(t.__ArrayLike||Array.isArray(t))}function o(t){return"number"==typeof t}function a(t){return"string"==typeof t}function s(t){return"boolean"==typeof t}function i(t){return"undefined"!=typeof Buffer&&t instanceof Buffer}function u(t){return f(t)&&"[object Date]"===c(t)}function c(t){return Object.prototype.toString.call(t)}function f(t){return"object"==typeof t&&null!==t}function h(t){return f(t)&&"[object RegExp]"===c(t)}function p(t){return null==t}function l(t){return null===t}function m(t){return"[object Arguments]"===c(t)}function b(t){return f(t)&&"[object Error]"===c(t)||t instanceof Error}function g(t){return void 0===t}r.isWrapperType=function(t){return t instanceof Number||t instanceof String||t instanceof Boolean},r.merge=function(t,e){if(t&&e)for(var r in e)t[r]=e[r];return t},r.isArray=n,r.isNumber=o,r.isBoolean=s,r.isString=a,r.isBuffer=i,r.isDate=u,r.isObject=f,r.isRegExp=h,r.isNullOrUndefined=p,r.isNull=l,r.isArguments=m,r.isFunction=function(t){return"function"==typeof t||t instanceof Function},r.isError=b,r.isUndefined=g;var d=Object.prototype.hasOwnProperty;r.forOwn=function(t,e,r){for(var n in t)d.call(t,n)&&e.call(r,t[n],n)};var y=/^\s*function\s*(\S*)\s*\(/;r.functionName=function(t){if(t.name)return t.name;var e=t.toString().match(y)[1];return e};var j=t("should-format").formatPropertyName;r.formatProp=function(t){return j(String(t))},r.formatEqlResult=function(t,e,n,o){return((t.path.length>0?"at "+t.path.map(r.formatProp).join(" -> "):"")+(t.a===e?"":", A has "+o(t.a))+(t.b===n?"":" and B has "+o(t.b))+(t.showReason?" because "+t.reason:"")).trim()}},{"should-format":19}],17:[function(t,e){function r(t,e,r,n,o,a){var s={result:t};return t||(s.path=e,s.reason=r,s.a=n,s.b=o,s.showReason=a),s}function n(t){for(var e=arguments,r=1,n=e.length;n>r;r++)t=t.replace(/%s/,e[r]);return t}function o(t,e,m,b,g,d){if(d=d||[],m=m||{checkProtoEql:!0},t===e)return r(0!==t||1/t==1/e,d,u.PLUS_0_AND_MINUS_0,t,e);var y,j,E=a(t),v=a(e);if(E!==v)return r(!1,d,n(u.DIFFERENT_TYPES,E,v),t,e);switch(E){case"number":return t!==t?r(e!==e,d,u.NAN_NUMBER,t,e):0===t?r(1/t===1/e,d,u.PLUS_0_AND_MINUS_0,t,e):r(t===e,d,u.EQUALITY,t,e);case"regexp":if(j=t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase)break;return r(!1,d,u.EQUALITY,t,e);case"boolean":case"string":return r(t===e,d,u.EQUALITY,t,e);case"date":if(j=+t===+e)break;return r(!1,d,u.EQUALITY,t,e);case"object-number":case"object-boolean":case"object-string":if(j=t.valueOf()===e.valueOf())break;return r(!1,d,u.WRAPPED_VALUE,t.valueOf(),e.valueOf());case"buffer":if(t.length!==e.length)return r(!1,d.concat(c),u.EQUALITY,t.length,e.length);for(y=t.length;y--;)if(t[y]!==e[y])return r(!1,d.concat([y]),u.EQUALITY,t[y],e[y]);return i;case"error":if(t.name!==e.name)return r(!1,d.concat(f),u.EQUALITY,t.name,e.name);if(t.message!==e.message)return r(!1,d.concat(h),u.EQUALITY,t.message,e.message);break;case"array-buffer":if(t.byteLength!==e.byteLength)return r(!1,d.concat(p),u.EQUALITY,t.byteLength,e.byteLength);for(y=t.byteLength;y--;)if(t[y]!==e[y])return r(!1,d.concat([y]),u.EQUALITY,t[y],e[y]);return i}for(b||(b=[]),g||(g=[]),y=b.length;y--;)if(b[y]==t)return r(g[y]==e,d,u.CIRCULAR_VALUES,t,e);b.push(t),g.push(e);var O,A,x;if(("array"===E||"arguments"===E)&&t.length!==e.length)return r(!1,d.concat(c),u.EQUALITY,t.length,e.length);if("function"===v){var S=t.toString(),N=e.toString();if(S!==N)return r(!1,d,u.FUNCTION_SOURCES,S,N)}for(x in e)if(s.call(e,x)){if(O=s.call(t,x),!O)return r(!1,d,n(u.MISSING_KEY,"A",x),t,e);if(A=o(t[x],e[x],m,b,g,d.concat([x])),!A.result)return A}for(x in t)if(s.call(t,x)&&(O=s.call(e,x),!O))return r(!1,d,n(u.MISSING_KEY,"B",x),t,e);var R=!1,P=!1;return m.checkProtoEql&&(Object.getPrototypeOf?(R=Object.getPrototypeOf(t)===Object.getPrototypeOf(e),P=!0):t.__proto__&&e.__proto__&&(R=t.__proto__===e.__proto__,P=!0),P&&!R)?r(!1,d,u.EQUALITY_PROTOTYPE,t,e,!0):(b.pop(),g.pop(),"function"!==v||(A=o(t.prototype,e.prototype,m,b,g,d.concat(l)),A.result)?i:A)}var a=t("should-type"),s=Object.prototype.hasOwnProperty,i=r(!0),u={PLUS_0_AND_MINUS_0:"+0 is not equal to -0",DIFFERENT_TYPES:"A has type %s and B has type %s",NAN_NUMBER:"NaN is not equal to any number",EQUALITY:"A is not equal to B",EQUALITY_PROTOTYPE:"A and B have different prototypes",WRAPPED_VALUE:"A wrapped value is not equal to B wrapped value",FUNCTION_SOURCES:"function A is not equal to B by source code value (via .toString call)",MISSING_KEY:"%s does not have key %s",CIRCULAR_VALUES:"A has circular reference that was visited not in the same time as B"},c=["length"],f=["name"],h=["message"],p=["byteLength"],l=["prototype"];e.exports=o},{"should-type":18}],18:[function(t,e){var r=Object.prototype.toString,n={NUMBER:"number",UNDEFINED:"undefined",STRING:"string",BOOLEAN:"boolean",OBJECT:"object",FUNCTION:"function",NULL:"null",ARRAY:"array",REGEXP:"regexp",DATE:"date",ERROR:"error",ARGUMENTS:"arguments",SYMBOL:"symbol",ARRAY_BUFFER:"array-buffer",TYPED_ARRAY:"typed-array",DATA_VIEW:"data-view",MAP:"map",SET:"set",WEAK_SET:"weak-set",WEAK_MAP:"weak-map",PROMISE:"promise",WRAPPER_NUMBER:"object-number",WRAPPER_BOOLEAN:"object-boolean",WRAPPER_STRING:"object-string",BUFFER:"buffer",HTML_ELEMENT:"html-element",HTML_ELEMENT_TEXT:"html-element-text",DOCUMENT:"document",WINDOW:"window",FILE:"file",FILE_LIST:"file-list",BLOB:"blob",XHR:"xhr"};e.exports=function o(t){var e=typeof t;switch(e){case n.NUMBER:return n.NUMBER;case n.UNDEFINED:return n.UNDEFINED;case n.STRING:return n.STRING;case n.BOOLEAN:return n.BOOLEAN;case n.FUNCTION:return n.FUNCTION;case n.SYMBOL:return n.SYMBOL;case n.OBJECT:if(null===t)return n.NULL;var a=r.call(t);switch(a){case"[object String]":return n.WRAPPER_STRING;case"[object Boolean]":return n.WRAPPER_BOOLEAN;case"[object Number]":return n.WRAPPER_NUMBER;case"[object Array]":return n.ARRAY;case"[object RegExp]":return n.REGEXP;case"[object Error]":return n.ERROR;case"[object Date]":return n.DATE;case"[object Arguments]":return n.ARGUMENTS;case"[object Math]":return n.OBJECT;case"[object JSON]":return n.OBJECT;case"[object ArrayBuffer]":return n.ARRAY_BUFFER;case"[object Int8Array]":return n.TYPED_ARRAY;case"[object Uint8Array]":return n.TYPED_ARRAY;case"[object Uint8ClampedArray]":return n.TYPED_ARRAY;case"[object Int16Array]":return n.TYPED_ARRAY;case"[object Uint16Array]":return n.TYPED_ARRAY;case"[object Int32Array]":return n.TYPED_ARRAY;case"[object Uint32Array]":return n.TYPED_ARRAY;case"[object Float32Array]":return n.TYPED_ARRAY;case"[object Float64Array]":return n.TYPED_ARRAY;case"[object DataView]":return n.DATA_VIEW;case"[object Map]":return n.MAP;case"[object WeakMap]":return n.WEAK_MAP;case"[object Set]":return n.SET;case"[object WeakSet]":return n.WEAK_SET;case"[object Promise]":return n.PROMISE;case"[object Window]":return n.WINDOW;case"[object HTMLDocument]":return n.DOCUMENT;case"[object Blob]":return n.BLOB;case"[object File]":return n.FILE;case"[object FileList]":return n.FILE_LIST;case"[object XMLHttpRequest]":return n.XHR;case"[object Text]":return n.HTML_ELEMENT_TEXT;default:if(typeof Promise===n.FUNCTION&&t instanceof Promise||o(t.then)===n.FUNCTION&&t.then.length>=2)return n.PROMISE;if("undefined"!=typeof Buffer&&t instanceof Buffer)return n.BUFFER;if(/^\[object HTML\w+Element\]$/.test(a))return n.HTML_ELEMENT;if("[object Object]"===a)return n.OBJECT}}},Object.keys(n).forEach(function(t){e.exports[t]=n[t]})},{}],19:[function(t,e){function r(t){return function(e){var r=t(e);return r.sort(),r}}function n(t,e){m.formats[t]=e}function o(t){return" "+t}function a(t,e,r,n){n=n||e.keys(t);var a=0;return e.seen.push(t),n=n.map(function(r){var n=s(t,e,r);return a+=n.length,n}),e.seen.pop(),0===n.length?"{}":a<=e.maxLineLength?"{ "+(r?r+" ":"")+n.join(e.propSep+" ")+" }":"{\n"+(r?r+"\n":"")+n.map(o).join(e.propSep+"\n")+"\n}"}function s(t,e,r){var n;try{n=Object.getOwnPropertyDescriptor(t,r)||{value:t[r]}}catch(o){n={value:o}}var a=m.formatPropertyName(r,e),s=n.get&&n.set?"[Getter/Setter]":n.get?"[Getter]":n.set?"[Setter]":e.seen.indexOf(n.value)>=0?"[Circular]":m(n.value,e);return a+": "+s}function i(t){return 10>t?"0"+t:""+t}function u(t){return 100>t?"0"+i(t):""+t}function c(t){var e=t.getTimezoneOffset(),r=Math.abs(e),n=Math.floor(r/60),o=r-60*n,a="GMT"+(0>e?"+":"-")+i(n)+i(o);return t.toLocaleDateString()+" "+t.toLocaleTimeString()+"."+u(t.getMilliseconds())+" "+a}function f(t){return function(e,r){var n=t(e),o=r.keys(e);return 0==o.length?n:a(e,r,n,o)}}function h(t){if(t.name)return t.name;var e=t.toString().match(b)[1];return e}function p(t,e){return function(r){var n="",o=50,a=r[t];if(a>0){for(var s=0;o>s&&a>s;s++){var u=r[s]||0;n+=" "+i(u.toString(16))}a>o&&(n+=" ... ")}return"["+(r.constructor.name||e)+(n?":"+n:"")+"]"}}var l=t("should-type"),m=function(t,e){e=e||{},"seen"in e||(e.seen=[]),e.keys=r("keys"in e&&e.keys===!1?Object.getOwnPropertyNames:Object.keys),"maxLineLength"in e||(e.maxLineLength=60),"propSep"in e||(e.propSep=",");var n=l(t);return(m.formats[n]||m.formats.object)(t,e)};e.exports=m,m.formats={},["undefined","boolean","null"].forEach(function(t){n(t,String)}),["number","boolean"].forEach(function(t){var e=t.substring(0,1).toUpperCase()+t.substring(1);n("object-"+t,f(function(t){return"["+e+": "+m(t.valueOf())+"]"}))}),n("object-string",function(t,e){var r=t.valueOf(),n="[String: "+m(r)+"]",o=e.keys(t);return o=o.filter(function(t){return!(t.match(/\d+/)&&parseInt(t,10)<r.length)}),0==o.length?n:a(t,e,n,o)}),n("regexp",f(String)),n("number",function(t){return 0===t&&0>1/t?"-0":String(t)}),n("string",function(t){return"'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'"}),n("object",a),n("array",function(t,e){var r=e.keys(t),n=0;e.seen.push(t);var a=r.map(function(r){var o;try{o=Object.getOwnPropertyDescriptor(t,r)||{value:t[r]}}catch(a){o={value:a}}var i;return i=r.match(/\d+/)?m(o.value,e):s(o.value,e,r),n+=i.length,i});return e.seen.pop(),0===a.length?"[]":n<=e.maxLineLength?"[ "+a.join(e.propSep+" ")+" ]":"[\n"+a.map(o).join(e.propSep+"\n")+"\n]"}),m.formatPropertyName=function(t,e){return t.match(/^[a-zA-Z_$][a-zA-Z_$0-9]*$/)?t:m(t,e)},n("date",f(c));var b=/^\s*function\s*(\S*)\s*\(/;n("function",f(function(t){var e=h(t);return"[Function"+(e?": "+e:"")+"]"})),n("error",f(function(t){var e=t.name,r=t.message;return"["+e+(r?": "+r:"")+"]"})),n("buffer",p("length","Buffer")),n("array-buffer",p("byteLength")),n("typed-array",p("byteLength")),n("promise",function(){return"[Promise]"}),n("xhr",function(){return"[XMLHttpRequest]"}),n("html-element",function(t){return t.outerHTML}),n("html-element-text",function(t){return t.nodeValue}),n("document",function(t){return t.documentElement.outerHTML}),n("window",function(){return"[Window]"})},{"should-type":20}],20:[function(t,e,r){arguments[4][18][0].apply(r,arguments)},{dup:18}]},{},[1])(1)});
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Should=t()}}(function(){return function t(e,r,n){function o(s,i){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!i&&u)return u(s,!0);if(a)return a(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var f=r[s]={exports:{}};e[s][0].call(f.exports,function(t){var r=e[s][1][t];return o(r?r:t)},f,f.exports,t,e,r,n)}return r[s].exports}for(var a="function"==typeof require&&require,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(t,e,r){var n=t("./util"),o=t("should-format"),a=function c(t){return new c.Assertion(t)};a.AssertionError=t("./assertion-error"),a.Assertion=t("./assertion"),a.format=o,a.config=t("./config"),r=e.exports=a,a.extend=function(t,e){t=t||"should",e=e||Object.prototype;var r=Object.getOwnPropertyDescriptor(e,t);return Object.defineProperty(e,t,{set:function(){},get:function(){return a(n.isWrapperType(this)?this.valueOf():this)},configurable:!0}),{name:t,descriptor:r,proto:e}};var s=Object.prototype,i="should",u=a.extend(i,s);a.noConflict=function(t){return t=t||u,delete t.proto[t.name],t.descriptor&&Object.defineProperty(t.proto,t.name,t.descriptor),a},a.use=function(t){return t(this,this.Assertion),this},a.use(t("./ext/assert")).use(t("./ext/chain")).use(t("./ext/bool")).use(t("./ext/number")).use(t("./ext/eql")).use(t("./ext/type")).use(t("./ext/string")).use(t("./ext/property")).use(t("./ext/error")).use(t("./ext/match")).use(t("./ext/contain"))},{"./assertion":3,"./assertion-error":2,"./config":4,"./ext/assert":7,"./ext/bool":8,"./ext/chain":9,"./ext/contain":10,"./ext/eql":11,"./ext/error":12,"./ext/match":13,"./ext/number":14,"./ext/property":15,"./ext/string":16,"./ext/type":17,"./util":19,"should-format":22}],2:[function(t,e){var r=t("./util"),n=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,this.message=t.message;var e=t.stackStartFunction;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var n=new Error;if(n.stack){var o=n.stack;if(e){var a=r.functionName(e),s=o.indexOf("\n"+a);if(s>=0){var i=o.indexOf("\n",s+1);o=o.substring(i+1)}}this.stack=o}}};n.prototype=Object.create(Error.prototype),e.exports=n},{"./util":19}],3:[function(t,e){function r(t){this.obj=t}function n(t){return i+t}function o(t){return t.split("\n").map(n).join("\n")}var a=t("./assertion-error"),s=(t("./util"),t("should-format"));r.add=function(t,e,n){var o={enumerable:!0};"undefined"==typeof n&&(n=!1),o[n?"get":"value"]=function(){var t=new r(this.obj,s);t.anyOne=this.anyOne;try{e.apply(t,arguments)}catch(n){if(this.params=t.params,n instanceof a){if(this.negate)return this.obj=t.obj,this.negate=!1,this;this.nestedErrorMessage=n.message,this.fail()}throw n}return this.params=t.params,this.negate&&(t.negate=!0,this.nestedErrorMessage=t.params.message?t.params.message:t.getMessage(),this.fail()),this.obj=t.obj,this.negate=!1,this},Object.defineProperty(r.prototype,t,o)},r.alias=function(t,e){var n=Object.getOwnPropertyDescriptor(r.prototype,t);if(!n)throw new Error("Alias "+t+" -> "+e+" could not be created as "+t+" not defined");Object.defineProperty(r.prototype,e,n)};var i=" ";r.prototype={constructor:r,assert:function(t){if(t)return this;var e=this.params,r=e.message,n=!1;r||(r=this.getMessage(),n=!0),this.nestedErrorMessage&&r!=this.nestedErrorMessage&&(r=r+"\n"+o(this.nestedErrorMessage));var s=new a({message:r,actual:this.obj,expected:e.expected,stackStartFunction:e.stackStartFunction||this.assert});throw s.showDiff=e.showDiff,s.operator=e.operator,s.generatedMessage=n,s},fail:function(){return this.assert(!1)},getMessage:function(){var t=s("obj"in this.params?this.params.obj:this.obj),e="expected"in this.params?" "+s(this.params.expected):"",r="details"in this.params&&this.params.details?" ("+this.params.details+")":"";return"expected "+t+(this.negate?" not ":" ")+this.params.operator+e+r},get not(){return this.negate=!this.negate,this},get any(){return this.anyOne=!0,this}},e.exports=r},{"./assertion-error":2,"./util":19,"should-format":22}],4:[function(t,e){var r={checkProtoEql:!1,useOldDeepEqual:!1};e.exports=r},{}],5:[function(t,e){var r=t("./config"),n=t("./node-equal"),o=t("should-equal");e.exports=function(){return r.useOldDeepEqual?n:o}},{"./config":4,"./node-equal":18,"should-equal":20}],6:[function(t,e){function r(t,e,n,o,a){var s=new i(t);s.params={operator:o,expected:e,message:n,stackStartFunction:a||r},s.fail()}function n(t,e){t||r(t,!0,e,"==",f.ok)}function o(t,e){return t&&e?"[object RegExp]"==Object.prototype.toString.call(e)?e.test(t):t instanceof e?!0:e.call({},t)===!0?!0:!1:!1}function a(t,e,n,a){var i;s.isString(n)&&(a=n,n=null);try{e()}catch(u){i=u}if(a=(n&&n.name?" ("+n.name+")":".")+(a?" "+a:"."),t&&!i&&r(i,n,"Missing expected exception"+a),!t&&o(i,n)&&r(i,n,"Got unwanted exception"+a),t&&i&&n&&!o(i,n)||!t&&i)throw i}var s=t("./../util"),i=t("./../assertion"),u=t("should-equal"),c=Array.prototype.slice,f=e.exports=n;f.fail=r,f.ok=n,f.equal=function(t,e,n){t!=e&&r(t,e,n,"==",f.equal)},f.notEqual=function(t,e,n){t==e&&r(t,e,n,"!=",f.notEqual)},f.deepEqual=function(t,e,n){u(t,e).result||r(t,e,n,"deepEqual",f.deepEqual)},f.notDeepEqual=function(t,e,n){u(t,e).result&&r(t,e,n,"notDeepEqual",f.notDeepEqual)},f.strictEqual=function(t,e,n){t!==e&&r(t,e,n,"===",f.strictEqual)},f.notStrictEqual=function(t,e,n){t===e&&r(t,e,n,"!==",f.notStrictEqual)},f.throws=function(){a.apply(this,[!0].concat(c.call(arguments)))},f.doesNotThrow=function(){a.apply(this,[!1].concat(c.call(arguments)))},f.ifError=function(t){if(t)throw t}},{"./../assertion":3,"./../util":19,"should-equal":20}],7:[function(t,e){var r=t("../util"),n=t("./_assert"),o=t("../assertion-error");e.exports=function(t){var e=t.format;r.merge(t,n),t.exist=t.exists=function(r,n){if(null==r)throw new o({message:n||"expected "+e(r)+" to exist",stackStartFunction:t.exist})},t.not={},t.not.exist=t.not.exists=function(r,n){if(null!=r)throw new o({message:n||"expected "+e(r)+" to not exist",stackStartFunction:t.not.exist})}}},{"../assertion-error":2,"../util":19,"./_assert":6}],8:[function(t,e){e.exports=function(t,e){e.add("true",function(){this.is.exactly(!0)},!0),e.alias("true","True"),e.add("false",function(){this.is.exactly(!1)},!0),e.alias("false","False"),e.add("ok",function(){this.params={operator:"to be truthy"},this.assert(this.obj)},!0)}},{}],9:[function(t,e){e.exports=function(t,e){function r(t){Object.defineProperty(e.prototype,t,{get:function(){return this},enumerable:!0})}["an","of","a","and","be","have","with","is","which","the"].forEach(r)}},{}],10:[function(t,e){var r=t("../util");_eql=t("../eql"),e.exports=function(t,e){var n=t.format;e.add("containEql",function(t){var e=_eql();this.params={operator:"to contain "+n(t)};var o=this.obj;r.isArray(o)?this.assert(o.some(function(r){return e(r,t).result})):r.isString(o)?this.assert(o.indexOf(String(t))>=0):r.isObject(o)?r.forOwn(t,function(t,e){o.should.have.property(e,t)}):this.assert(!1)}),e.add("containDeepOrdered",function(e){_eql();this.params={operator:"to contain "+n(e)};var o=this.obj;if(r.isArray(o))if(r.isArray(e)){var a=0;o.forEach(function(r){try{t(r).not.be.Null.and.containDeepOrdered(e[a]),a++}catch(n){if(n instanceof t.AssertionError)return;throw n}},this),this.assert(a==e.length)}else this.assert(!1);else r.isString(o)?this.assert(o.indexOf(String(e))>=0):r.isObject(o)?r.isObject(e)?r.forOwn(e,function(e,r){t(o[r]).not.be.Null.and.containDeepOrdered(e)}):this.assert(!1):this.eql(e)}),e.add("containDeep",function(e){_eql();this.params={operator:"to contain "+n(e)};var o=this.obj;if(r.isArray(o))if(r.isArray(e)){var a={};e.forEach(function(e){this.assert(o.some(function(r,n){if(n in a)return!1;try{return t(r).not.be.Null.and.containDeep(e),a[n]=!0,!0}catch(o){if(o instanceof t.AssertionError)return!1;throw o}}))},this)}else this.assert(!1);else r.isString(o)?this.assert(o.indexOf(String(e))>=0):r.isObject(o)?r.isObject(e)?r.forOwn(e,function(e,r){t(o[r]).not.be.Null.and.containDeep(e)}):this.assert(!1):this.eql(e)})}},{"../eql":5,"../util":19}],11:[function(t,e){var r=t("../eql"),n=t("../config"),o=t("../util");e.exports=function(t,e){e.add("eql",function(e,a){var s=r();this.params={operator:"to equal",expected:e,showDiff:!0,message:a};var i=s(this.obj,e,t.config),u=n.useOldDeepEqual?i:i.result;n.useOldDeepEqual||i.result||(this.params.details=o.formatEqlResult(i,this.obj,e,t.format)),this.assert(u)}),e.add("equal",function(t,e){this.params={operator:"to be",expected:t,showDiff:!0,message:e},this.assert(t===this.obj)}),e.alias("equal","exactly")}},{"../config":4,"../eql":5,"../util":19}],12:[function(t,e){var r=t("../util");e.exports=function(t,e){var n=t.format;e.add("throw",function(e,o){var a=this.obj,s={},i="",u=!1;this.is.a.Function;var c=!0;try{a()}catch(f){u=!0,s=f}if(u)if(e){if("string"==typeof e)c=e==s.message;else if(e instanceof RegExp)c=e.test(s.message);else if("function"==typeof e)c=s instanceof e;else if(r.isObject(e))try{s.should.match(e)}catch(f){if(!(f instanceof t.AssertionError))throw f;i=": "+f.message,c=!1}if(c){if("function"==typeof e&&o)try{s.should.match(o)}catch(f){if(!(f instanceof t.AssertionError))throw f;i=": "+f.message,c=!1}}else"string"==typeof e||e instanceof RegExp?i=" with a message matching "+n(e)+", but got '"+s.message+"'":"function"==typeof e&&(i=" of type "+r.functionName(e)+", but got "+r.functionName(s.constructor))}else i=" (got "+n(s)+")";this.params={operator:"to throw exception"+i},this.assert(u),this.assert(c)}),e.alias("throw","throwError")}},{"../util":19}],13:[function(t,e){var r=t("../util"),n=t("../eql");e.exports=function(t,e){var o=t.format;e.add("match",function(a,s){var i=n();if(this.params={operator:"to match "+o(a),message:s},!i(this.obj,a).result)if(r.isRegExp(a)){if(r.isString(this.obj))this.assert(a.exec(this.obj));else if(r.isArray(this.obj))this.obj.forEach(function(t){this.assert(a.exec(t))},this);else if(r.isObject(this.obj)){var u=[],c=[];r.forOwn(this.obj,function(t,e){a.exec(t)?c.push(r.formatProp(e)):u.push(r.formatProp(e)+" ("+o(t)+")")},this),u.length&&(this.params.operator+="\n not matched properties: "+u.join(", ")),c.length&&(this.params.operator+="\n matched properties: "+c.join(", ")),this.assert(0==u.length)}}else if(r.isFunction(a)){var f;f=a(this.obj),f instanceof e&&(this.params.operator+="\n "+f.getMessage()),r.isBoolean(f)&&this.assert(f)}else r.isObject(a)?(u=[],c=[],r.forOwn(a,function(e,n){try{t(this.obj[n]).match(e),c.push(r.formatProp(n))}catch(a){if(!(a instanceof t.AssertionError))throw a;u.push(r.formatProp(n)+" ("+o(this.obj[n])+")")}},this),u.length&&(this.params.operator+="\n not matched properties: "+u.join(", ")),c.length&&(this.params.operator+="\n matched properties: "+c.join(", ")),this.assert(0==u.length)):this.assert(!1)}),e.add("matchEach",function(t,e){var a=n();this.params={operator:"to match each "+o(t),message:e};var s=t;r.isRegExp(t)?s=function(e){return!!t.exec(e)}:r.isFunction(t)||(s=function(e){return a(e,t).result}),r.forOwn(this.obj,function(t,e){var n=s(t,e);r.isBoolean(n)&&this.assert(n)},this)})}},{"../eql":5,"../util":19}],14:[function(t,e){e.exports=function(t,e){e.add("NaN",function(){this.params={operator:"to be NaN"},this.assert(this.obj!==this.obj)},!0),e.add("Infinity",function(){this.params={operator:"to be Infinity"},this.obj.should.be.a.Number.and.not.a.NaN.and.assert(!isFinite(this.obj))},!0),e.add("within",function(t,e,r){this.params={operator:"to be within "+t+".."+e,message:r},this.assert(this.obj>=t&&this.obj<=e)}),e.add("approximately",function(t,e,r){this.params={operator:"to be approximately "+t+" ±"+e,message:r},this.assert(Math.abs(this.obj-t)<=e)}),e.add("above",function(t,e){this.params={operator:"to be above "+t,message:e},this.assert(this.obj>t)}),e.add("below",function(t,e){this.params={operator:"to be below "+t,message:e},this.assert(this.obj<t)}),e.alias("above","greaterThan"),e.alias("below","lessThan")}},{}],15:[function(t,e){var r=t("../util"),n=t("../eql"),o=Array.prototype.slice;e.exports=function(t,e){var a=t.format;e.add("enumerable",function(t,e){t=String(t);var o=n();this.params={operator:"to have enumerable property "+r.formatProp(t)},this.assert(this.obj.propertyIsEnumerable(t)),arguments.length>1&&(this.params.operator+=" equal to "+a(e),this.assert(o(e,this.obj[t]).result))}),e.add("enumerables",function(t){arguments.length>1?t=o.call(arguments):r.isArray(t)||(r.isString(t)?t=[t]:(values=t,t=Object.keys(t))),this.params={operator:"to have enumerables "+t.map(r.formatProp)},t.forEach(function(t){this.assert(this.obj.propertyIsEnumerable(t))},this)}),e.add("property",function(t,e){if(t=String(t),arguments.length>1){var r={};r[t]=e,this.have.properties(r)}else this.have.properties(t);this.obj=this.obj[t]}),e.add("properties",function(t){var e={},s=n();arguments.length>1?t=o.call(arguments):r.isArray(t)||(r.isString(t)?t=[t]:(e=t,t=Object.keys(t)));var i=Object(this.obj),u=[];t.forEach(function(t){t in i||u.push(r.formatProp(t))});var c=u;0===c.length?c=t.map(r.formatProp):this.anyOne&&(c=t.filter(function(t){return u.indexOf(r.formatProp(t))<0}).map(r.formatProp));var f=(1===c.length?"to have property ":"to have "+(this.anyOne?"any of ":"")+"properties ")+c.join(", ");this.params={obj:this.obj,operator:f},this.assert(0===u.length||this.anyOne&&u.length!=t.length);var h=Object.keys(e);if(h.length){var p=[];c=[],h.forEach(function(t){var n=e[t];s(i[t],n).result?c.push(r.formatProp(t)+" of "+a(n)):p.push(r.formatProp(t)+" of "+a(n)+" (got "+a(i[t])+")")}),(0!==p.length&&!this.anyOne||this.anyOne&&0===c.length)&&(c=p),f=(1===c.length?"to have property ":"to have "+(this.anyOne?"any of ":"")+"properties ")+c.join(", "),this.params={obj:this.obj,operator:f},this.assert(0===p.length||this.anyOne&&p.length!=h.length)}}),e.add("length",function(t,e){this.have.property("length",t,e)}),e.alias("length","lengthOf");var s=Object.prototype.hasOwnProperty;e.add("ownProperty",function(t,e){t=String(t),this.params={obj:this.obj,operator:"to have own property "+r.formatProp(t),message:e},this.assert(s.call(this.obj,t)),this.obj=this.obj[t]}),e.alias("ownProperty","hasOwnProperty"),e.add("empty",function(){if(this.params={operator:"to be empty"},r.isString(this.obj)||r.isArray(this.obj)||r.isArguments(this.obj))this.obj.should.have.property("length",0);else{var t=Object(this.obj);for(var e in t)this.obj.should.not.have.ownProperty(e)}},!0),e.add("keys",function(t){arguments.length>1?t=o.call(arguments):1===arguments.length&&r.isString(t)?t=[t]:0===arguments.length&&(t=[]),t=t.map(String);var e=Object(this.obj),n=[];t.forEach(function(t){s.call(this.obj,t)||n.push(r.formatProp(t))},this);var a=[];Object.keys(e).forEach(function(e){t.indexOf(e)<0&&a.push(r.formatProp(e))});var i=0===t.length?"to be empty":"to have "+(1===t.length?"key ":"keys ");this.params={operator:i+t.map(r.formatProp).join(", ")},n.length>0&&(this.params.operator+="\n missing keys: "+n.join(", ")),a.length>0&&(this.params.operator+="\n extra keys: "+a.join(", ")),this.assert(0===n.length&&0===a.length)}),e.alias("keys","key"),e.add("propertyByPath",function(e){arguments.length>1?e=o.call(arguments):1===arguments.length&&r.isString(e)?e=[e]:0===arguments.length&&(e=[]);var n=e.map(r.formatProp);e=e.map(String);for(var a,s=t(Object(this.obj)),i=[];a=e.shift();)this.params={operator:"to have property by path "+n.join(", ")+" - failed on "+r.formatProp(a)},s=s.have.property(a),i.push(a);this.params={obj:this.obj,operator:"to have property by path "+n.join(", ")},this.obj=s.obj})}},{"../eql":5,"../util":19}],16:[function(t,e){e.exports=function(t,e){e.add("startWith",function(e,r){this.params={operator:"to start with "+t.format(e),message:r},this.assert(0===this.obj.indexOf(e))}),e.add("endWith",function(e,r){this.params={operator:"to end with "+t.format(e),message:r},this.assert(this.obj.indexOf(e,this.obj.length-e.length)>=0)})}},{}],17:[function(t,e){var r=t("../util");e.exports=function(t,e){e.add("Number",function(){this.params={operator:"to be a number"},this.assert(r.isNumber(this.obj))},!0),e.add("arguments",function(){this.params={operator:"to be arguments"},this.assert(r.isArguments(this.obj))},!0),e.alias("arguments","Arguments"),e.add("type",function(t,e){this.params={operator:"to have type "+t,message:e},(typeof this.obj).should.be.exactly(t,e)}),e.add("instanceof",function(t,e){this.params={operator:"to be an instance of "+r.functionName(t),message:e},this.assert(Object(this.obj)instanceof t)}),e.alias("instanceof","instanceOf"),e.add("Function",function(){this.params={operator:"to be a function"},this.assert(r.isFunction(this.obj))},!0),e.add("Object",function(){this.params={operator:"to be an object"},this.assert(r.isObject(this.obj))},!0),e.add("String",function(){this.params={operator:"to be a string"},this.assert(r.isString(this.obj))},!0),e.add("Array",function(){this.params={operator:"to be an array"},this.assert(r.isArray(this.obj))},!0),e.add("Boolean",function(){this.params={operator:"to be a boolean"},this.assert(r.isBoolean(this.obj))},!0),e.add("Error",function(){this.params={operator:"to be an error"},this.assert(r.isError(this.obj))},!0),e.add("null",function(){this.params={operator:"to be null"},this.assert(null===this.obj)},!0),e.alias("null","Null")}},{"../util":19}],18:[function(t,e){function r(t,e){if(t===e)return!0;if(o.isBuffer(t)&&o.isBuffer(e)){if(t.length!=e.length)return!1;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}return o.isDate(t)&&o.isDate(e)?t.getTime()===e.getTime():o.isRegExp(t)&&o.isRegExp(e)?t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase:o.isObject(t)||o.isObject(e)?n(t,e):t==e}function n(t,e){if(o.isNullOrUndefined(t)||o.isNullOrUndefined(e))return!1;if(t.prototype!==e.prototype)return!1;if(o.isArguments(t))return o.isArguments(e)?(t=a.call(t),e=a.call(e),r(t,e)):!1;try{var n,s,i=Object.keys(t),u=Object.keys(e)}catch(c){return!1}if(i.length!=u.length)return!1;for(i.sort(),u.sort(),s=i.length-1;s>=0;s--)if(i[s]!=u[s])return!1;for(s=i.length-1;s>=0;s--)if(n=i[s],!r(t[n],e[n]))return!1;return!0}var o=t("./util");e.exports=r;var a=Array.prototype.slice},{"./util":19}],19:[function(t,e,r){function n(t){return f(t)&&(t.__ArrayLike||Array.isArray(t))}function o(t){return"number"==typeof t}function a(t){return"string"==typeof t}function s(t){return"boolean"==typeof t}function i(t){return"undefined"!=typeof Buffer&&t instanceof Buffer}function u(t){return f(t)&&"[object Date]"===c(t)}function c(t){return Object.prototype.toString.call(t)}function f(t){return"object"==typeof t&&null!==t}function h(t){return f(t)&&"[object RegExp]"===c(t)}function p(t){return null==t}function l(t){return null===t}function m(t){return"[object Arguments]"===c(t)}function b(t){return f(t)&&"[object Error]"===c(t)||t instanceof Error}function g(t){return void 0===t}r.isWrapperType=function(t){return t instanceof Number||t instanceof String||t instanceof Boolean},r.merge=function(t,e){if(t&&e)for(var r in e)t[r]=e[r];return t},r.isArray=n,r.isNumber=o,r.isBoolean=s,r.isString=a,r.isBuffer=i,r.isDate=u,r.isObject=f,r.isRegExp=h,r.isNullOrUndefined=p,r.isNull=l,r.isArguments=m,r.isFunction=function(t){return"function"==typeof t||t instanceof Function},r.isError=b,r.isUndefined=g;var d=Object.prototype.hasOwnProperty;r.forOwn=function(t,e,r){for(var n in t)d.call(t,n)&&e.call(r,t[n],n)};var y=/^\s*function\s*(\S*)\s*\(/;r.functionName=function(t){if(t.name)return t.name;var e=t.toString().match(y)[1];return e};var j=t("should-format").formatPropertyName;r.formatProp=function(t){return j(String(t))},r.formatEqlResult=function(t,e,n,o){return((t.path.length>0?"at "+t.path.map(r.formatProp).join(" -> "):"")+(t.a===e?"":", A has "+o(t.a))+(t.b===n?"":" and B has "+o(t.b))+(t.showReason?" because "+t.reason:"")).trim()}},{"should-format":22}],20:[function(t,e){function r(t,e,r,n,o,a){var s={result:t};return t||(s.path=e,s.reason=r,s.a=n,s.b=o,s.showReason=a),s}function n(t){for(var e=arguments,r=1,n=e.length;n>r;r++)t=t.replace(/%s/,e[r]);return t}function o(t,e,m,b,g,d){if(d=d||[],m=m||{checkProtoEql:!0},t===e)return r(0!==t||1/t==1/e,d,u.PLUS_0_AND_MINUS_0,t,e);var y,j,E=a(t),v=a(e);if(E!==v)return r(!1,d,n(u.DIFFERENT_TYPES,E,v),t,e);switch(E){case"number":return t!==t?r(e!==e,d,u.NAN_NUMBER,t,e):0===t?r(1/t===1/e,d,u.PLUS_0_AND_MINUS_0,t,e):r(t===e,d,u.EQUALITY,t,e);case"regexp":if(j=t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase)break;return r(!1,d,u.EQUALITY,t,e);case"boolean":case"string":return r(t===e,d,u.EQUALITY,t,e);case"date":if(j=+t===+e)break;return r(!1,d,u.EQUALITY,t,e);case"object-number":case"object-boolean":case"object-string":if(j=t.valueOf()===e.valueOf())break;return r(!1,d,u.WRAPPED_VALUE,t.valueOf(),e.valueOf());case"buffer":if(t.length!==e.length)return r(!1,d.concat(c),u.EQUALITY,t.length,e.length);for(y=t.length;y--;)if(t[y]!==e[y])return r(!1,d.concat([y]),u.EQUALITY,t[y],e[y]);return i;case"error":if(t.name!==e.name)return r(!1,d.concat(f),u.EQUALITY,t.name,e.name);if(t.message!==e.message)return r(!1,d.concat(h),u.EQUALITY,t.message,e.message);break;case"array-buffer":if(t.byteLength!==e.byteLength)return r(!1,d.concat(p),u.EQUALITY,t.byteLength,e.byteLength);for(y=t.byteLength;y--;)if(t[y]!==e[y])return r(!1,d.concat([y]),u.EQUALITY,t[y],e[y]);return i}for(b||(b=[]),g||(g=[]),y=b.length;y--;)if(b[y]==t)return r(g[y]==e,d,u.CIRCULAR_VALUES,t,e);b.push(t),g.push(e);var O,A,x;if(("array"===E||"arguments"===E)&&t.length!==e.length)return r(!1,d.concat(c),u.EQUALITY,t.length,e.length);if("function"===v){var S=t.toString(),N=e.toString();if(S!==N)return r(!1,d,u.FUNCTION_SOURCES,S,N)}for(x in e)if(s.call(e,x)){if(O=s.call(t,x),!O)return r(!1,d,n(u.MISSING_KEY,"A",x),t,e);if(A=o(t[x],e[x],m,b,g,d.concat([x])),!A.result)return A}for(x in t)if(s.call(t,x)&&(O=s.call(e,x),!O))return r(!1,d,n(u.MISSING_KEY,"B",x),t,e);var R=!1,P=!1;return m.checkProtoEql&&(Object.getPrototypeOf?(R=Object.getPrototypeOf(t)===Object.getPrototypeOf(e),P=!0):t.__proto__&&e.__proto__&&(R=t.__proto__===e.__proto__,P=!0),P&&!R)?r(!1,d,u.EQUALITY_PROTOTYPE,t,e,!0):(b.pop(),g.pop(),"function"!==v||(A=o(t.prototype,e.prototype,m,b,g,d.concat(l)),A.result)?i:A)}var a=t("should-type"),s=Object.prototype.hasOwnProperty,i=r(!0),u={PLUS_0_AND_MINUS_0:"+0 is not equal to -0",DIFFERENT_TYPES:"A has type %s and B has type %s",NAN_NUMBER:"NaN is not equal to any number",EQUALITY:"A is not equal to B",EQUALITY_PROTOTYPE:"A and B have different prototypes",WRAPPED_VALUE:"A wrapped value is not equal to B wrapped value",FUNCTION_SOURCES:"function A is not equal to B by source code value (via .toString call)",MISSING_KEY:"%s does not have key %s",CIRCULAR_VALUES:"A has circular reference that was visited not in the same time as B"},c=["length"],f=["name"],h=["message"],p=["byteLength"],l=["prototype"];e.exports=o},{"should-type":21}],21:[function(t,e){var r=Object.prototype.toString,n={NUMBER:"number",UNDEFINED:"undefined",STRING:"string",BOOLEAN:"boolean",OBJECT:"object",FUNCTION:"function",NULL:"null",ARRAY:"array",REGEXP:"regexp",DATE:"date",ERROR:"error",ARGUMENTS:"arguments",SYMBOL:"symbol",ARRAY_BUFFER:"array-buffer",TYPED_ARRAY:"typed-array",DATA_VIEW:"data-view",MAP:"map",SET:"set",WEAK_SET:"weak-set",WEAK_MAP:"weak-map",PROMISE:"promise",WRAPPER_NUMBER:"object-number",WRAPPER_BOOLEAN:"object-boolean",WRAPPER_STRING:"object-string",BUFFER:"buffer",HTML_ELEMENT:"html-element",HTML_ELEMENT_TEXT:"html-element-text",DOCUMENT:"document",WINDOW:"window",FILE:"file",FILE_LIST:"file-list",BLOB:"blob",XHR:"xhr"};e.exports=function o(t){var e=typeof t;switch(e){case n.NUMBER:return n.NUMBER;case n.UNDEFINED:return n.UNDEFINED;case n.STRING:return n.STRING;case n.BOOLEAN:return n.BOOLEAN;case n.FUNCTION:return n.FUNCTION;case n.SYMBOL:return n.SYMBOL;case n.OBJECT:if(null===t)return n.NULL;var a=r.call(t);switch(a){case"[object String]":return n.WRAPPER_STRING;case"[object Boolean]":return n.WRAPPER_BOOLEAN;case"[object Number]":return n.WRAPPER_NUMBER;case"[object Array]":return n.ARRAY;case"[object RegExp]":return n.REGEXP;case"[object Error]":return n.ERROR;case"[object Date]":return n.DATE;case"[object Arguments]":return n.ARGUMENTS;case"[object Math]":return n.OBJECT;case"[object JSON]":return n.OBJECT;case"[object ArrayBuffer]":return n.ARRAY_BUFFER;case"[object Int8Array]":return n.TYPED_ARRAY;case"[object Uint8Array]":return n.TYPED_ARRAY;case"[object Uint8ClampedArray]":return n.TYPED_ARRAY;case"[object Int16Array]":return n.TYPED_ARRAY;case"[object Uint16Array]":return n.TYPED_ARRAY;case"[object Int32Array]":return n.TYPED_ARRAY;case"[object Uint32Array]":return n.TYPED_ARRAY;case"[object Float32Array]":return n.TYPED_ARRAY;case"[object Float64Array]":return n.TYPED_ARRAY;case"[object DataView]":return n.DATA_VIEW;case"[object Map]":return n.MAP;case"[object WeakMap]":return n.WEAK_MAP;case"[object Set]":return n.SET;case"[object WeakSet]":return n.WEAK_SET;case"[object Promise]":return n.PROMISE;case"[object Window]":return n.WINDOW;case"[object HTMLDocument]":return n.DOCUMENT;case"[object Blob]":return n.BLOB;case"[object File]":return n.FILE;case"[object FileList]":return n.FILE_LIST;case"[object XMLHttpRequest]":return n.XHR;case"[object Text]":return n.HTML_ELEMENT_TEXT;default:if(typeof Promise===n.FUNCTION&&t instanceof Promise||o(t.then)===n.FUNCTION&&t.then.length>=2)return n.PROMISE;if("undefined"!=typeof Buffer&&t instanceof Buffer)return n.BUFFER;if(/^\[object HTML\w+Element\]$/.test(a))return n.HTML_ELEMENT;if("[object Object]"===a)return n.OBJECT}}},Object.keys(n).forEach(function(t){e.exports[t]=n[t]})},{}],22:[function(t,e){function r(t){return function(e){var r=t(e);return r.sort(),r}}function n(t,e){m.formats[t]=e}function o(t){return" "+t}function a(t,e,r,n){n=n||e.keys(t);var a=0;return e.seen.push(t),n=n.map(function(r){var n=s(t,e,r);return a+=n.length,n}),e.seen.pop(),0===n.length?"{}":a<=e.maxLineLength?"{ "+(r?r+" ":"")+n.join(e.propSep+" ")+" }":"{\n"+(r?r+"\n":"")+n.map(o).join(e.propSep+"\n")+"\n}"}function s(t,e,r){var n;try{n=Object.getOwnPropertyDescriptor(t,r)||{value:t[r]}}catch(o){n={value:o}}var a=m.formatPropertyName(r,e),s=n.get&&n.set?"[Getter/Setter]":n.get?"[Getter]":n.set?"[Setter]":e.seen.indexOf(n.value)>=0?"[Circular]":m(n.value,e);return a+": "+s}function i(t){return 10>t?"0"+t:""+t}function u(t){return 100>t?"0"+i(t):""+t}function c(t){var e=t.getTimezoneOffset(),r=Math.abs(e),n=Math.floor(r/60),o=r-60*n,a="GMT"+(0>e?"+":"-")+i(n)+i(o);return t.toLocaleDateString()+" "+t.toLocaleTimeString()+"."+u(t.getMilliseconds())+" "+a}function f(t){return function(e,r){var n=t(e),o=r.keys(e);return 0==o.length?n:a(e,r,n,o)}}function h(t){if(t.name)return t.name;var e=t.toString().match(b)[1];return e}function p(t,e){return function(r){var n="",o=50,a=r[t];if(a>0){for(var s=0;o>s&&a>s;s++){var u=r[s]||0;n+=" "+i(u.toString(16))}a>o&&(n+=" ... ")}return"["+(r.constructor.name||e)+(n?":"+n:"")+"]"}}var l=t("should-type"),m=function(t,e){e=e||{},"seen"in e||(e.seen=[]),e.keys=r("keys"in e&&e.keys===!1?Object.getOwnPropertyNames:Object.keys),"maxLineLength"in e||(e.maxLineLength=60),"propSep"in e||(e.propSep=",");var n=l(t);return(m.formats[n]||m.formats.object)(t,e)};e.exports=m,m.formats={},["undefined","boolean","null"].forEach(function(t){n(t,String)}),["number","boolean"].forEach(function(t){var e=t.substring(0,1).toUpperCase()+t.substring(1);n("object-"+t,f(function(t){return"["+e+": "+m(t.valueOf())+"]"}))}),n("object-string",function(t,e){var r=t.valueOf(),n="[String: "+m(r)+"]",o=e.keys(t);return o=o.filter(function(t){return!(t.match(/\d+/)&&parseInt(t,10)<r.length)}),0==o.length?n:a(t,e,n,o)}),n("regexp",f(String)),n("number",function(t){return 0===t&&0>1/t?"-0":String(t)}),n("string",function(t){return"'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'"}),n("object",a),n("array",function(t,e){var r=e.keys(t),n=0;e.seen.push(t);var a=r.map(function(r){var o;try{o=Object.getOwnPropertyDescriptor(t,r)||{value:t[r]}}catch(a){o={value:a}}var i;return i=r.match(/\d+/)?m(o.value,e):s(o.value,e,r),n+=i.length,i});return e.seen.pop(),0===a.length?"[]":n<=e.maxLineLength?"[ "+a.join(e.propSep+" ")+" ]":"[\n"+a.map(o).join(e.propSep+"\n")+"\n]"}),m.formatPropertyName=function(t,e){return t.match(/^[a-zA-Z_$][a-zA-Z_$0-9]*$/)?t:m(t,e)},n("date",f(c));var b=/^\s*function\s*(\S*)\s*\(/;n("function",f(function(t){var e=h(t);return"[Function"+(e?": "+e:"")+"]"})),n("error",f(function(t){var e=t.name,r=t.message;return"["+e+(r?": "+r:"")+"]"})),n("buffer",p("length","Buffer")),n("array-buffer",p("byteLength")),n("typed-array",p("byteLength")),n("promise",function(){return"[Promise]"}),n("xhr",function(){return"[XMLHttpRequest]"}),n("html-element",function(t){return t.outerHTML}),n("html-element-text",function(t){return t.nodeValue}),n("document",function(t){return t.documentElement.outerHTML}),n("window",function(){return"[Window]"})},{"should-type":23}],23:[function(t,e,r){arguments[4][21][0].apply(r,arguments)},{dup:21}]},{},[1])(1)});

Sorry, the diff of this file is too big to display

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