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 6.0.3 to 7.0.0

as-function.js

0

bower.json

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ Before contribute something:

@@ -0,0 +0,0 @@ var gulp = require('gulp');

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

7.0.0 / 2015-06-18
==================
* Added support to `.eql` es6 set, map and symbol (`should-type`, `should-format`, `should-equal`)
* **Breaking Change** More accurate work with types (dom nodes, typed-arrays).
* **Breaking Change** Change result of should-type to be more accurate and consistent.
* Fixed should-equal options checks
* Fixed should-format typed arrays (more then 8 bits)
* Added aliases: .matchEach => .matchSome, .matchAny => .matchEvery (to be similar to array methods). See #65.
* **Breaking Change (possibly)** .matchEach and .matchAny now uses internally .match. See #65.
* **Breaking Change** No more getter assertions. No all assertions are functions.
* **Breaking Change** No more proxy returning, to check property names.
* **Breaking Change** `should-format` now looks more like chrome developer tools inpections.
6.0.3 / 2015-05-18

@@ -88,3 +102,3 @@ ==================

* Fixed leaked _eql
* Fixed leaked \_eql

@@ -91,0 +105,0 @@ 4.5.0 / 2015-01-11

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

module.exports = require('./lib/should.js');
var should = require('./lib/should');
var defaultProto = Object.prototype;
var defaultProperty = 'should';
//Expose api via `Object#should`.
try {
var prevShould = should.extend(defaultProperty, defaultProto);
should._prevShould = prevShould;
} catch(e) {
//ignore errors
}
module.exports = should;

5

lib/assertion-error.js
var util = require('./util');
var format = require('should-format');

@@ -76,4 +75,4 @@ /**

}
var actual = format(this.actual);
var expected = 'expected' in this ? ' ' + format(this.expected) : '';
var actual = util.format(this.actual);
var expected = 'expected' in this ? ' ' + util.format(this.expected) : '';
var details = 'details' in this && this.details ? ' (' + this.details + ')' : '';

@@ -80,0 +79,0 @@

@@ -37,12 +37,10 @@ var AssertionError = require('./assertion-error');

*
* this.obj.should.have.property('id').which.is.a.Number;
* this.obj.should.have.property('id').which.is.a.Number();
* this.obj.should.have.property('path');
* });
*/
Assertion.add = function(name, func, isGetter) {
Assertion.add = function(name, func) {
var prop = {enumerable: true, configurable: true};
isGetter = !!isGetter;
prop[isGetter ? 'get' : 'value'] = function() {
prop.value = function() {
var context = new Assertion(this.obj, this, name);

@@ -60,3 +58,3 @@ context.anyOne = this.anyOne;

this.negate = false;
return this.proxied();
return this;
}

@@ -87,3 +85,3 @@

this.negate = false;
return this.proxied();
return this;
};

@@ -100,3 +98,3 @@

onCall();
return this.proxied();
return this;
},

@@ -152,3 +150,3 @@ enumerable: true

assert: function(expr) {
if(expr) return this.proxied();
if(expr) return this;

@@ -199,3 +197,3 @@ var params = this.params;

this.negate = !this.negate;
return this.proxied();
return this;
},

@@ -211,17 +209,2 @@

this.anyOne = true;
return this.proxied();
},
proxied: function() {
if(typeof Proxy == 'function') {
return new Proxy(this, {
get: function(target, name) {
if(name in target) {
return target[name];
} else {
throw new Error('Assertion has no property ' + util.formatProp(name));
}
}
});
}
return this;

@@ -228,0 +211,0 @@ }

@@ -0,5 +1,11 @@

var Formatter = require('should-format').Formatter;
var config = {
checkProtoEql: false
checkProtoEql: false,
getFormatter: function(opts) {
return new Formatter(opts || config);
}
};
module.exports = config;
module.exports = config;

@@ -30,3 +30,2 @@ // implement assert interface using already written peaces of should.js

// this is a bug in node module loading as far as I am concerned
var util = require('./../util');
var Assertion = require('./../assertion');

@@ -33,0 +32,0 @@

@@ -0,0 +0,0 @@ /*!

@@ -17,10 +17,10 @@ /*!

*
* (true).should.be.true;
* false.should.not.be.True;
* (true).should.be.true();
* false.should.not.be.true();
*
* ({ a: 10}).should.not.be.true;
* ({ a: 10}).should.not.be.true();
*/
Assertion.add('true', function() {
this.is.exactly(true);
}, true);
});

@@ -38,8 +38,8 @@ Assertion.alias('true', 'True');

*
* (true).should.not.be.false;
* false.should.be.False;
* (true).should.not.be.false();
* false.should.be.false();
*/
Assertion.add('false', function() {
this.is.exactly(false);
}, true);
});

@@ -56,9 +56,9 @@ Assertion.alias('false', 'False');

*
* (true).should.be.ok;
* ''.should.not.be.ok;
* should(null).not.be.ok;
* should(void 0).not.be.ok;
* (true).should.be.ok();
* ''.should.not.be.ok();
* should(null).not.be.ok();
* should(void 0).not.be.ok();
*
* (10).should.be.ok;
* (0).should.not.be.ok;
* (10).should.be.ok();
* (0).should.not.be.ok();
*/

@@ -69,3 +69,3 @@ Assertion.add('ok', function() {

this.assert(this.obj);
}, true);
};
});
};

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

* @name be
* @property {should.Assertion} be
* @alias Assertion#an

@@ -9,0 +10,0 @@ * @alias Assertion#of

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

this.is.not.null.and.not.undefined;
this.is.not.null().and.not.undefined();

@@ -43,0 +43,0 @@ var obj = this.obj;

@@ -11,6 +11,6 @@ /*!

function formatEqlResult(r, a, b, format) {
function formatEqlResult(r, a, b) {
return ((r.path.length > 0 ? 'at ' + r.path.map(util.formatProp).join(' -> ') : '') +
(r.a === a ? '' : ', A has ' + format(r.a)) +
(r.b === b ? '' : ' and B has ' + format(r.b)) +
(r.a === a ? '' : ', A has ' + util.format(r.a)) +
(r.b === b ? '' : ' and B has ' + util.format(r.b)) +
(r.showReason ? ' because ' + r.reason : '')).trim();

@@ -43,8 +43,8 @@ }

var strictResult = eql(this.obj, val, should.config);
this.params.details = strictResult.result ? '' : formatEqlResult(strictResult, this.obj, val, should.format);
var result = eql(this.obj, val, should.config);
this.params.details = result.result ? '' : formatEqlResult(result, this.obj, val);
this.params.showDiff = type(this.obj) === type(val);
this.params.showDiff = eql(type(this.obj), type(val)).result;
this.assert(strictResult.result);
this.assert(result.result);
});

@@ -71,3 +71,3 @@

this.params.showDiff = type(this.obj) == type(val);
this.params.showDiff = eql(type(this.obj), type(val)).result;

@@ -74,0 +74,0 @@ this.assert(val === this.obj);

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

this.is.a.Function;
this.is.a.Function();

@@ -50,0 +50,0 @@ var errorMatched = true;

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

* (5).should.not.match(function(it) {
* it.should.be.an.Array;
* it.should.be.an.Array();
* });

@@ -146,20 +146,4 @@ * ({ a: 10, b: 'abc', c: { d: 10 }, d: 0 }).should

var f = other;
if(other instanceof RegExp)
f = function(it) {
return !!other.exec(it);
};
else if(typeof other != 'function')
f = function(it) {
return eql(it, other).result;
};
util.forEach(this.obj, function(value, key) {
var res = f(value, key);
//if we throw exception ok - it is used .should inside
if(typeof res == 'boolean') {
this.assert(res); // if it is just boolean function assert on it
}
util.forEach(this.obj, function(value) {
should(value).match(other);
}, this);

@@ -189,36 +173,20 @@ });

Assertion.add('matchAny', function(other, description) {
this.params = {operator: 'to match any ' + i(other), message: description};
this.params = {operator: 'to match any ' + i(other), message: description};
var f = other;
if(other instanceof RegExp) {
f = function(it) {
return !!other.exec(it);
};
} else if(typeof other != 'function') {
f = function(it) {
return eql(it, other).result;
};
this.assert(util.some(this.obj, function(value) {
try {
should(value).match(other);
return true;
} catch(e) {
if(e instanceof should.AssertionError) {
// Caught an AssertionError, return false to the iterator
return false;
}
throw e;
}
}));
});
this.assert(util.some(this.obj, function(value, key) {
try {
var result = f(value, key);
if(typeof result == 'boolean') {
return result; // if it is just boolean, return it
}
// Else return true - no exception was thrown, so assume it succeeded
return true;
} catch(e) {
if(e instanceof should.AssertionError) {
// Caught an AssertionError, return false to the iterator
return false;
} else {
throw e;
}
}
}, this));
});
Assertion.alias('matchAny', 'matchSome');
Assertion.alias('matchEach', 'matchEvery');
};

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

*
* (10).should.not.be.NaN;
* NaN.should.be.NaN;
* (10).should.not.be.NaN();
* NaN.should.be.NaN();
*/

@@ -24,3 +24,3 @@ Assertion.add('NaN', function() {

this.assert(this.obj !== this.obj);
}, true);
});

@@ -35,4 +35,4 @@ /**

*
* (10).should.not.be.Infinity;
* NaN.should.not.be.Infinity;
* (10).should.not.be.Infinity();
* NaN.should.not.be.Infinity();
*/

@@ -42,6 +42,6 @@ Assertion.add('Infinity', function() {

this.is.a.Number
.and.not.a.NaN
this.is.a.Number()
.and.not.a.NaN()
.and.assert(!isFinite(this.obj));
}, true);
});

@@ -48,0 +48,0 @@ /**

@@ -39,4 +39,3 @@ /*!

var arg = arguments[0];
var t = should.type(arg);
if(t == should.type.STRING) {
if(typeof arg === 'string') {
args.names = [arg];

@@ -265,5 +264,5 @@ } else if(util.isIndexable(arg)) {

*
* ''.should.be.empty;
* [].should.be.empty;
* ({}).should.be.empty;
* ''.should.be.empty();
* [].should.be.empty();
* ({}).should.be.empty();
*/

@@ -300,3 +299,3 @@ Assertion.add('empty', function() {

if(arguments.length > 1) keys = aSlice.call(arguments);
else if(arguments.length === 1 && should.type(keys) == should.type.STRING) keys = [keys];
else if(arguments.length === 1 && typeof keys === 'string') keys = [keys];
else if(arguments.length === 0) keys = [];

@@ -303,0 +302,0 @@

@@ -41,2 +41,2 @@ /*!

});
};
};

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

this.have.type('number');
}, true);
});

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

this.have.class('Arguments');
}, true);
});

@@ -80,3 +80,3 @@ Assertion.alias('arguments', 'Arguments');

this.have.type('function');
}, true);
});

@@ -92,4 +92,4 @@ /**

this.is.not.null.and.have.type('object');
}, true);
this.is.not.null().and.have.type('object');
});

@@ -106,3 +106,3 @@ /**

this.have.type('string');
}, true);
});

@@ -119,3 +119,3 @@ /**

this.have.class('Array');
}, true);
});

@@ -132,3 +132,3 @@ /**

this.have.type('boolean');
}, true);
});

@@ -145,3 +145,3 @@ /**

this.have.instanceOf(Error);
}, true);
});

@@ -159,3 +159,3 @@ /**

this.assert(this.obj === null);
}, true);
});

@@ -190,3 +190,3 @@ Assertion.alias('null', 'Null');

this.assert(this.obj === void 0);
}, true);
});

@@ -205,4 +205,4 @@ Assertion.alias('undefined', 'Undefined');

should(this.obj).have.property(Symbol.iterator).which.is.a.Function;
}, true);
should(this.obj).have.property(Symbol.iterator).which.is.a.Function();
});

@@ -219,4 +219,4 @@ /**

should(this.obj).have.property('next').which.is.a.Function;
}, true);
should(this.obj).have.property('next').which.is.a.Function();
});

@@ -235,3 +235,3 @@ /**

.and.it.is.equal(this.obj[Symbol.iterator]());
}, true);
});
};

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

var should = function should(obj) {
return (new should.Assertion(obj)).proxied();
return (new should.Assertion(obj));
};

@@ -28,3 +28,3 @@

should.format = require('should-format');
should.format = util.format;
should.type = require('should-type');

@@ -115,3 +115,3 @@ should.util = util;

should.noConflict = function(desc) {
desc = desc || prevShould;
desc = desc || should._prevShould;

@@ -140,3 +140,3 @@ if(desc) {

*
* this.obj.should.have.property('id').which.is.a.Number;
* this.obj.should.have.property('id').which.is.a.Number();
* this.obj.should.have.property('path');

@@ -163,8 +163,1 @@ * })

.use(require('./ext/contain'));
var defaultProto = Object.prototype;
var defaultProperty = 'should';
//Expose api via `Object#should`.
var prevShould = should.extend(defaultProperty, defaultProto);

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

var type = require('should-type');
var config = require('./config');

@@ -62,19 +63,2 @@ /**

var functionNameRE = /^\s*function\s*(\S*)\s*\(/;
exports.functionName = function(f) {
if(f.name) {
return f.name;
}
var name = f.toString().match(functionNameRE)[1];
return name;
};
var formatPropertyName = require('should-format').formatPropertyName;
exports.formatProp = function(value) {
return formatPropertyName(String(value));
};
exports.isEmptyObject = function(obj) {

@@ -91,24 +75,30 @@ for(var prop in obj) {

var t = type(obj);
return t == type.ARRAY ||
t == type.BUFFER ||
t == type.ARGUMENTS ||
t == type.ARRAY_BUFFER ||
t == type.TYPED_ARRAY ||
t == type.DATA_VIEW ||
t == type.STRING;
return (t.type === type.OBJECT && t.cls === type.ARRAY) ||
(t.type === type.OBJECT && t.cls === type.BUFFER) ||
(t.type === type.OBJECT && t.cls === type.ARGUMENTS) ||
(t.type === type.OBJECT && t.cls === type.ARRAY_BUFFER) ||
(t.type === type.OBJECT && t.cls === type.TYPED_ARRAY) ||
(t.type === type.OBJECT && t.cls === type.DATA_VIEW) ||
(t.type === type.OBJECT && t.cls === type.STRING) ||
(t.type === type.STRING);
};
exports.length = function(obj) {
switch(type(obj)) {
case type.ARRAY_BUFFER:
case type.TYPED_ARRAY:
case type.DATA_VIEW:
return obj.byteLength;
case type.ARRAY:
case type.BUFFER:
case type.ARGUMENTS:
case type.FUNCTION:
var t = type(obj);
switch(t.type) {
case type.STRING:
return obj.length;
case type.OBJECT:
switch(t.cls) {
case type.ARRAY_BUFFER:
case type.TYPED_ARRAY:
case type.DATA_VIEW:
return obj.byteLength;
case type.ARRAY:
case type.BUFFER:
case type.ARGUMENTS:
case type.FUNCTION:
return obj.length;
}
}

@@ -138,2 +128,12 @@ };

return /^function\s*\*\s*/.test(f.toString());
}
};
exports.format = function(value, opts) {
return config.getFormatter(opts).format(value);
};
exports.functionName = require('should-format').Formatter.functionName;
exports.formatProp = function(value) {
return config.getFormatter().formatPropertyName(String(value));
};
{
"name": "should",
"description": "test framework agnostic BDD-style assertions",
"version": "6.0.3",
"version": "7.0.0",
"author": "TJ Holowaychuk <tj@vision-media.ca> and contributors",

@@ -18,3 +18,2 @@ "repository": {

"browserify": "latest",
"generator-supported": "0.0.1",
"gulp": "^3.8.10",

@@ -37,9 +36,9 @@ "gulp-header": "^1.2.2",

],
"main": "./lib/should.js",
"main": "./index.js",
"license": "MIT",
"dependencies": {
"should-equal": "0.3.1",
"should-format": "0.0.7",
"should-type": "0.0.4"
"should-equal": "0.4.3",
"should-format": "0.2.0",
"should-type": "0.1.1"
}
}
# should.js
[![Join the chat at https://gitter.im/shouldjs/should.js](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/shouldjs/should.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Join the chat at https://gitter.im/shouldjs/should.js](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/shouldjs/should.js)

@@ -11,4 +11,8 @@ [![Build Status](https://travis-ci.org/shouldjs/should.js.svg?branch=master)](https://travis-ci.org/shouldjs/should.js)

_should_ extends the `Object.prototype` with a single non-enumerable getter that allows you to express how that object should behave. It also returns itself when required with `require`. It does not mean that you should use it like getter - it is possible to use it as function call. For this use `.noConflict` function.
By default (when you `require('should')`) _should_ extends the `Object.prototype` with a single non-enumerable getter that allows you to express how that object should behave. It also returns itself when required with `require`.
It is also possible to use should.js without getter (it will not even try to exetend Object.prototype), just `require('should/as-function')`. Or if you already use version that auto add getter, you can call `.noConflict` function.
**Results of `(something).should` getter and `should(something)` in most situations the same**
### Upgrading instructions

@@ -18,2 +22,6 @@

### FAQ
You can take look in [FAQ](https://github.com/shouldjs/should.js/wiki/FAQ).
## Example

@@ -37,3 +45,3 @@ ```javascript

// also you can test in that way for null's
should(null).not.be.ok;
should(null).not.be.ok();

@@ -59,8 +67,14 @@ someAsyncTask(foo, function(err, result){

(5).should.be.exactly(5).and.be.a.Number;
(5).should.be.exactly(5).and.be.a.Number();
```
```js
var should = require('should/as-function');
should(10).be.exactly(5).and.be.a.Number();
```
## In browser
Well, even when browsers by complains of authors has 100% es5 support, it does not mean it has not bugs. Please see [wiki](https://github.com/shouldjs/should.js/wiki/Known-Bugs) for known bugs.
Well, even when browsers by complains of authors has 100% es5 support, it does not mean it has no bugs. Please see [wiki](https://github.com/shouldjs/should.js/wiki/Known-Bugs) for known bugs.

@@ -128,7 +142,6 @@ If you want to use _should_ in browser, use the `should.js` file in the root of this repository, or build it yourself. To build a fresh version:

To add own assertion you need to call `should.Assertion.add` function. It accept 3 arguments:
Adding own assertion is pretty easy. You need to call `should.Assertion.add` function. It accept 2 arguments:
1. name of assertion method (string)
2. assertion function (function)
3. optional boolean value to mark if this assertion should be getter

@@ -149,3 +162,3 @@ What assertion function should do. It should check only positive case. `should` will handle `.not` itself.

First not preferred and used **only** for shortcuts to other assertions, e.g how `.should.be.true` defined:
First not preferred and used **only** for shortcuts to other assertions, e.g how `.should.be.true()` defined:

@@ -155,3 +168,3 @@ ```javascript

this.is.exactly(true);
}, true);
});
```

@@ -167,4 +180,4 @@ There you can see that assertion function do not define own `this.params` and instead call within the same assertion `.exactly`

this.obj.should.be.exactly(true);
}, true);
should(this.obj).be.exactly(true);
});
```

@@ -178,3 +191,3 @@ in this case this.params defined and then used new assertion context (because called `.should`). Internally this way does not

this.obj.should.have.property('id').which.is.a.Number;
this.obj.should.have.property('id').which.is.a.Number();
this.obj.should.have.property('path');

@@ -200,3 +213,3 @@ })

$ make test
$ npm test

@@ -203,0 +216,0 @@ See also [CONTRIBUTING](./CONTRIBUTING.md).

/*
* should - test framework agnostic BDD-style assertions
* @version v6.0.3
* @version v7.0.0
* @author TJ Holowaychuk <tj@vision-media.ca> and contributors

@@ -8,2 +8,3 @@ * @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;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,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 l=r[s]={exports:{}};e[s][0].call(l.exports,function(t){var r=e[s][1][t];return o(r?r:t)},l,l.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=function u(t){return new u.Assertion(t).proxied()};o.AssertionError=t("./assertion-error"),o.Assertion=t("./assertion"),o.format=t("should-format"),o.type=t("should-type"),o.util=n,o.config=t("./config"),r=e.exports=o,o.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 o(n.isWrapperType(this)?this.valueOf():this)},configurable:!0}),{name:t,descriptor:r,proto:e}},o.noConflict=function(t){return t=t||i,t&&(delete t.proto[t.name],t.descriptor&&Object.defineProperty(t.proto,t.name,t.descriptor)),o},o.use=function(t){return t(o,o.Assertion),this},o.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"));var a=Object.prototype,s="should",i=o.extend(s,a)},{"./assertion":3,"./assertion-error":2,"./config":4,"./ext/assert":6,"./ext/bool":7,"./ext/chain":8,"./ext/contain":9,"./ext/eql":10,"./ext/error":11,"./ext/match":12,"./ext/number":13,"./ext/property":14,"./ext/string":15,"./ext/type":16,"./util":17,"should-format":19,"should-type":20}],2:[function(t,e){function r(t){return i+t}function n(t){return t.split("\n").map(r).join("\n")}var o=t("./util"),a=t("should-format"),s=function(t){if(o.merge(this,t),t.message||Object.defineProperty(this,"message",{get:function(){return this._message||(this._message=this.generateMessage(),this.generatedMessage=!0),this._message},configurable:!0,enumerable:!1}),Error.captureStackTrace)Error.captureStackTrace(this,this.stackStartFunction);else{var e=new Error;if(e.stack){var r=e.stack;if(this.stackStartFunction){var n=o.functionName(this.stackStartFunction),a=r.indexOf("\n"+n);if(a>=0){var s=r.indexOf("\n",a+1);r=r.substring(s+1)}}this.stack=r}}},i=" ";s.prototype=Object.create(Error.prototype,{name:{value:"AssertionError"},generateMessage:{value:function(){if(!this.operator&&this.previous)return this.previous.message;var t=a(this.actual),e="expected"in this?" "+a(this.expected):"",r="details"in this&&this.details?" ("+this.details+")":"",o=this.previous?"\n"+n(this.previous.message):"";return"expected "+t+(this.negate?" not ":" ")+this.operator+e+r+o}}}),e.exports=s},{"./util":17,"should-format":19}],3:[function(t,e){function r(t){this.obj=t,this.anyOne=!1,this.negate=!1,this.params={actual:t}}var n=t("./assertion-error"),o=t("./util");r.add=function(t,e,o){var a={enumerable:!0,configurable:!0};o=!!o,a[o?"get":"value"]=function(){var o=new r(this.obj,this,t);o.anyOne=this.anyOne;try{e.apply(o,arguments)}catch(a){if(a instanceof n){if(this.negate)return this.obj=o.obj,this.negate=!1,this.proxied();o!==a.assertion&&(o.params.previous=a),o.negate=!1,o.fail()}throw a}return this.negate&&(o.negate=!0,o.params.details="false negative fail",o.fail()),this.params.operator||(this.params=o.params),this.obj=o.obj,this.negate=!1,this.proxied()},Object.defineProperty(r.prototype,t,a)},r.addChain=function(t,e){e=e||function(){},Object.defineProperty(r.prototype,t,{get:function(){return e(),this.proxied()},enumerable:!0})},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)},r.prototype={constructor:r,assert:function(t){if(t)return this.proxied();var e=this.params;throw"obj"in e&&!("actual"in e)?e.actual=e.obj:"obj"in e||"actual"in e||(e.actual=this.obj),e.stackStartFunction=e.stackStartFunction||this.assert,e.negate=this.negate,e.assertion=this,new n(e)},fail:function(){return this.assert(!1)},get not(){return this.negate=!this.negate,this.proxied()},get any(){return this.anyOne=!0,this.proxied()},proxied:function(){return"function"==typeof Proxy?new Proxy(this,{get:function(t,e){if(e in t)return t[e];throw new Error("Assertion has no property "+o.formatProp(e))}}):this}},e.exports=r},{"./assertion-error":2,"./util":17}],4:[function(t,e){var r={checkProtoEql:!1};e.exports=r},{}],5:[function(t,e){function r(t,e,n,o,a){var i=new s(t);i.params={operator:o,expected:e,message:n,stackStartFunction:a||r},i.fail()}function n(t,e){t||r(t,!0,e,"==",c.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 s;"string"==typeof n&&(a=n,n=null);try{e()}catch(i){s=i}if(a=(n&&n.name?" ("+n.name+")":".")+(a?" "+a:"."),t&&!s&&r(s,n,"Missing expected exception"+a),!t&&o(s,n)&&r(s,n,"Got unwanted exception"+a),t&&s&&n&&!o(s,n)||!t&&s)throw s}var s=(t("./../util"),t("./../assertion")),i=t("should-equal"),u=Array.prototype.slice,c=e.exports=n;c.fail=r,c.ok=n,c.equal=function(t,e,n){t!=e&&r(t,e,n,"==",c.equal)},c.notEqual=function(t,e,n){t==e&&r(t,e,n,"!=",c.notEqual)},c.deepEqual=function(t,e,n){i(t,e).result||r(t,e,n,"deepEqual",c.deepEqual)},c.notDeepEqual=function(t,e,n){i(t,e).result&&r(t,e,n,"notDeepEqual",c.notDeepEqual)},c.strictEqual=function(t,e,n){t!==e&&r(t,e,n,"===",c.strictEqual)},c.notStrictEqual=function(t,e,n){t===e&&r(t,e,n,"!==",c.notStrictEqual)},c["throws"]=function(){a.apply(this,[!0].concat(u.call(arguments)))},c.doesNotThrow=function(){a.apply(this,[!1].concat(u.call(arguments)))},c.ifError=function(t){if(t)throw t}},{"./../assertion":3,"./../util":17,"should-equal":18}],6:[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":17,"./_assert":5}],7:[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)}},{}],8:[function(t,e){e.exports=function(t,e){["an","of","a","and","be","has","have","with","is","which","the","it"].forEach(function(t){e.addChain(t)})}},{}],9:[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)},this.is.not["null"].and.not.undefined;var e=this.obj;"string"==typeof e?this.assert(e.indexOf(String(t))>=0):r.isIndexable(e)?this.assert(r.some(e,function(e){return n(e,t).result})):this.have.properties(t)}),e.add("containDeepOrdered",function(e){this.params={operator:"to contain "+o(e)};var n=this.obj;if("string"==typeof n)this.is.equal(String(e));else if(r.isIndexable(n)&&r.isIndexable(e)){for(var a=0,s=0,i=r.length(n),u=r.length(e);i>a&&u>s;a++)try{t(n[a]).containDeepOrdered(e[s]),s++}catch(c){if(c instanceof t.AssertionError)continue;throw c}this.assert(s===u)}else null!=n&&null!=e&&"object"==typeof n&&"object"==typeof e?(r.forEach(e,function(e,r){t(n[r]).containDeepOrdered(e)}),r.isEmptyObject(e)&&this.eql(e)):this.eql(e)}),e.add("containDeep",function(e){this.params={operator:"to contain "+o(e)};var n=this.obj;if("string"==typeof n)this.is.equal(String(e));else if(r.isIndexable(n)&&r.isIndexable(e)){var a={};r.forEach(e,function(e){this.assert(r.some(n,function(r,n){if(n in a)return!1;try{return t(r).containDeep(e),a[n]=!0,!0}catch(o){if(o instanceof t.AssertionError)return!1;throw o}}))},this)}else null!=n&&null!=e&&"object"==typeof n&&"object"==typeof e?(r.forEach(e,function(e,r){t(n[r]).containDeep(e)}),r.isEmptyObject(e)&&this.eql(e)):this.eql(e)})}},{"../util":17,"should-equal":18}],10:[function(t,e){function r(t,e,r,n){return((t.path.length>0?"at "+t.path.map(a.formatProp).join(" -> "):"")+(t.a===e?"":", A has "+n(t.a))+(t.b===r?"":" and B has "+n(t.b))+(t.showReason?" because "+t.reason:"")).trim()}var n=t("should-equal"),o=t("should-type"),a=t("../util");e.exports=function(t,e){e.add("eql",function(e,a){this.params={operator:"to equal",expected:e,message:a};var s=n(this.obj,e,t.config);this.params.details=s.result?"":r(s,this.obj,e,t.format),this.params.showDiff=o(this.obj)===o(e),this.assert(s.result)}),e.add("equal",function(t,e){this.params={operator:"to be",expected:t,message:e},this.params.showDiff=o(this.obj)==o(t),this.assert(t===this.obj)}),e.alias("equal","exactly")}},{"../util":17,"should-equal":18,"should-type":20}],11:[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;if(r.isGeneratorFunction(a))return t(a())["throw"](e,o);if(r.isGeneratorObject(a))return t(a.next.bind(a))["throw"](e,o);this.is.a.Function;var c=!0;try{a()}catch(l){u=!0,s=l}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(null!=e)try{t(s).match(e)}catch(l){if(!(l instanceof t.AssertionError))throw l;i=": "+l.message,c=!1}if(c){if("function"==typeof e&&o)try{t(s).match(o)}catch(l){if(!(l instanceof t.AssertionError))throw l;i=": "+l.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":17}],12:[function(t,e){var r=t("../util"),n=t("should-equal");e.exports=function(t,e){var o=t.format;e.add("match",function(e,a){if(this.params={operator:"to match "+o(e),message:a},!n(this.obj,e).result)if(e instanceof RegExp){if("string"==typeof this.obj)this.assert(e.exec(this.obj));else if(r.isIndexable(this.obj))r.forEach(this.obj,function(t){this.assert(e.exec(t))},this);else if(null!=this.obj&&"object"==typeof this.obj){var s=[],i=[];r.forEach(this.obj,function(t,n){e.exec(t)?i.push(r.formatProp(n)):s.push(r.formatProp(n)+" ("+o(t)+")")},this),s.length&&(this.params.operator+="\n not matched properties: "+s.join(", ")),i.length&&(this.params.operator+="\n matched properties: "+i.join(", ")),this.assert(0==s.length)}}else if("function"==typeof e){var u;u=e(this.obj),"boolean"==typeof u&&this.assert(u)}else null!=e&&"object"==typeof e?(s=[],i=[],r.forEach(e,function(e,n){try{t(this.obj[n]).match(e),i.push(r.formatProp(n))}catch(a){if(!(a instanceof t.AssertionError))throw a;s.push(r.formatProp(n)+" ("+o(this.obj[n])+")")}},this),s.length&&(this.params.operator+="\n not matched properties: "+s.join(", ")),i.length&&(this.params.operator+="\n matched properties: "+i.join(", ")),this.assert(0==s.length)):this.assert(!1)}),e.add("matchEach",function(t,e){this.params={operator:"to match each "+o(t),message:e};var a=t;t instanceof RegExp?a=function(e){return!!t.exec(e)}:"function"!=typeof t&&(a=function(e){return n(e,t).result}),r.forEach(this.obj,function(t,e){var r=a(t,e);"boolean"==typeof r&&this.assert(r)},this)}),e.add("matchAny",function(e,a){this.params={operator:"to match any "+o(e),message:a};var s=e;e instanceof RegExp?s=function(t){return!!e.exec(t)}:"function"!=typeof e&&(s=function(t){return n(t,e).result}),this.assert(r.some(this.obj,function(e,r){try{var n=s(e,r);return"boolean"==typeof n?n:!0}catch(o){if(o instanceof t.AssertionError)return!1;throw o}},this))})}},{"../util":17,"should-equal":18}],13:[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.is.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")}},{}],14:[function(t,e){var r=t("../util"),n=t("should-equal"),o=Array.prototype.slice;e.exports=function(t,e){function a(){var e={};if(arguments.length>1)e.names=o.call(arguments);else{var n=arguments[0],a=t.type(n);a==t.type.STRING?e.names=[n]:r.isIndexable(n)?e.names=n:(e.names=Object.keys(n),e.values=n)}return e}var s=t.format;e.add("propertyWithDescriptor",function(e,r){this.params={actual:this.obj,operator:"to have own property with descriptor "+s(r)};var n=this.obj;this.have.ownProperty(e),t(Object.getOwnPropertyDescriptor(Object(n),e)).have.properties(r)}),e.add("enumerable",function(t,e){t=r.convertPropertyName(t),this.params={operator:"to have enumerable property "+r.formatProp(t)+(arguments.length>1?" equal to "+s(e):"")};var n={enumerable:!0};arguments.length>1&&(n.value=e),this.have.propertyWithDescriptor(t,n)}),e.add("enumerables",function(){var e=a.apply(null,arguments);this.params={operator:"to have enumerables "+e.names.map(r.formatProp)};var n=this.obj;e.names.forEach(function(e){t(n).have.enumerable(e)})}),e.add("property",function(t,e){if(t=r.convertPropertyName(t),arguments.length>1){var n={};n[t]=e,this.have.properties(n)}else this.have.properties(t);this.obj=this.obj[t]}),e.add("properties",function(t){var e={};arguments.length>1?t=o.call(arguments):Array.isArray(t)||("string"==typeof t||"symbol"==typeof t?t=[t]:(e=t,t=Object.keys(t)));var a=Object(this.obj),i=[];t.forEach(function(t){t in a||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 l=Object.keys(e);if(l.length){var f=[];u=[],l.forEach(function(t){var o=e[t];n(a[t],o).result?u.push(r.formatProp(t)+" of "+s(o)):f.push(r.formatProp(t)+" of "+s(o)+" (got "+s(a[t])+")")}),(0!==f.length&&!this.anyOne||this.anyOne&&0===u.length)&&(u=f),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===f.length||this.anyOne&&f.length!=l.length)}}),e.add("length",function(t,e){this.have.property("length",t,e)}),e.alias("length","lengthOf");var i=Object.prototype.hasOwnProperty;e.add("ownProperty",function(t,e){t=r.convertPropertyName(t),this.params={actual:this.obj,operator:"to have own property "+r.formatProp(t),message:e},this.assert(i.call(this.obj,t)),this.obj=this.obj[t]}),e.alias("ownProperty","hasOwnProperty"),e.add("empty",function(){if(this.params={operator:"to be empty"},void 0!==r.length(this.obj))t(this.obj).have.property("length",0);else{var e=Object(this.obj);for(var n in e)t(this.obj).not.have.ownProperty(n)}},!0),e.add("keys",function(e){arguments.length>1?e=o.call(arguments):1===arguments.length&&t.type(e)==t.type.STRING?e=[e]:0===arguments.length&&(e=[]),e=e.map(String);var n=Object(this.obj),a=[];e.forEach(function(t){i.call(this.obj,t)||a.push(r.formatProp(t))},this);var s=[];Object.keys(n).forEach(function(t){e.indexOf(t)<0&&s.push(r.formatProp(t))});var u=0===e.length?"to be empty":"to have "+(1===e.length?"key ":"keys ");this.params={operator:u+e.map(r.formatProp).join(", ")},a.length>0&&(this.params.operator+="\n missing keys: "+a.join(", ")),s.length>0&&(this.params.operator+="\n extra keys: "+s.join(", ")),this.assert(0===a.length&&0===s.length)}),e.alias("keys","key"),e.add("propertyByPath",function(e){arguments.length>1?e=o.call(arguments):1===arguments.length&&"string"==typeof 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":17,"should-equal":18}],15:[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)})}},{}],16:[function(t,e){var r=t("../util");e.exports=function(t,e){e.add("Number",function(){this.params={operator:"to be a number"},this.have.type("number")},!0),e.add("arguments",function(){this.params={operator:"to be arguments"},this.have["class"]("Arguments")},!0),e.alias("arguments","Arguments"),e.add("type",function(e,r){this.params={operator:"to have type "+e,message:r},t(typeof this.obj).be.exactly(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.have.type("function")},!0),e.add("Object",function(){this.params={operator:"to be an object"},this.is.not["null"].and.have.type("object")},!0),e.add("String",function(){this.params={operator:"to be a string"},this.have.type("string")},!0),e.add("Array",function(){this.params={operator:"to be an array"},this.have["class"]("Array")},!0),e.add("Boolean",function(){this.params={operator:"to be a boolean"},this.have.type("boolean")},!0),e.add("Error",function(){this.params={operator:"to be an error"},this.have.instanceOf(Error)},!0),e.add("null",function(){this.params={operator:"to be null"},this.assert(null===this.obj)},!0),e.alias("null","Null"),e.add("class",function(t){this.params={operator:"to have [[Class]] "+t},this.assert(Object.prototype.toString.call(this.obj)==="[object "+t+"]")}),e.alias("class","Class"),e.add("undefined",function(){this.params={operator:"to be undefined"},this.assert(void 0===this.obj)},!0),e.alias("undefined","Undefined"),e.add("iterable",function(){this.params={operator:"to be iterable"},t(this.obj).have.property(Symbol.iterator).which.is.a.Function},!0),e.add("iterator",function(){this.params={operator:"to be iterator"},t(this.obj).have.property("next").which.is.a.Function},!0),e.add("generator",function(){this.params={operator:"to be generator"},t(this.obj).be.iterable.and.iterator.and.it.is.equal(this.obj[Symbol.iterator]())},!0)}},{"../util":17}],17:[function(t,e,r){var n=t("should-type");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};var o=Object.prototype.hasOwnProperty;r.forEach=function i(t,e,n){if(r.isGeneratorFunction(t))return i(t(),e,n);if(r.isGeneratorObject(t))for(var a=t.next();!a.done;){if(e.call(n,a.value,"value",t)===!1)return;a=t.next()}else for(var s in t)if(o.call(t,s)&&e.call(n,t[s],s,t)===!1)return},r.some=function(t,e,n){var o=!1;return r.forEach(t,function(r,a){return e.call(n,r,a,t)?(o=!0,!1):void 0},n),o};var a=/^\s*function\s*(\S*)\s*\(/;r.functionName=function(t){if(t.name)return t.name;var e=t.toString().match(a)[1];return e};var s=t("should-format").formatPropertyName;r.formatProp=function(t){return s(String(t))},r.isEmptyObject=function(t){for(var e in t)if(o.call(t,e))return!1;return!0},r.isIndexable=function(t){var e=n(t);return e==n.ARRAY||e==n.BUFFER||e==n.ARGUMENTS||e==n.ARRAY_BUFFER||e==n.TYPED_ARRAY||e==n.DATA_VIEW||e==n.STRING},r.length=function(t){switch(n(t)){case n.ARRAY_BUFFER:case n.TYPED_ARRAY:case n.DATA_VIEW:return t.byteLength;case n.ARRAY:case n.BUFFER:case n.ARGUMENTS:case n.FUNCTION:case n.STRING:return t.length}},r.convertPropertyName=function(t){return"symbol"==typeof t?t:String(t)},r.isGeneratorObject=function(t){return t?"function"==typeof t.next&&"function"==typeof t[Symbol.iterator]&&t[Symbol.iterator]()===t:!1},r.isGeneratorFunction=function(t){return"function"!=typeof t?!1:/^function\s*\*\s*/.test(t.toString())}},{"should-format":19,"should-type":20}],18:[function(t,e){function r(t,e,r,n,o){var a={result:t};return t||(a.path=e,a.reason=r,a.a=n,a.b=o),a}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,a,l,f,h,p){function m(n,o){var s=r(n,h,o,t,e);return!n&&a.collectAllFails&&p.push(s),s}function b(r){return o(t[r],e[r],a,l,f,h.concat([r]),p)}var d=u;if(t===e)return m(0!==t||1/t==1/e,c.PLUS_0_AND_MINUS_0);var g,y,j=s(t),v=s(e);if(j!==v)return m(!1,n(c.DIFFERENT_TYPES,j,v));switch(j){case"number":return t!==t?m(e!==e,c.NAN_NUMBER):0===t?m(1/t===1/e,c.PLUS_0_AND_MINUS_0):m(t===e,c.EQUALITY);case"regexp":for(y=["source","global","multiline","lastIndex","ignoreCase"];y.length;)if(d=b(y.shift()),!a.collectAllFails&&!d.result)return d;break;case"boolean":case"string":return m(t===e,c.EQUALITY);case"date":if(+t!==+e&&!a.collectAllFails)return m(!1,c.EQUALITY);break;case"object-number":case"object-boolean":case"object-string":if(d=o(t.valueOf(),e.valueOf(),a,l,f,h,p),!d.result&&!a.collectAllFails)return d.reason=c.WRAPPED_VALUE,d;break;case"buffer":if(d=b("length"),!a.collectAllFails&&!d.result)return d;for(g=t.length;g--;)if(d=b(g),!a.collectAllFails&&!d.result)return d;return u;case"error":for(y=["name","message"];y.length;)if(d=b(y.shift()),!a.collectAllFails&&!d.result)return d}for(l||(l=[]),f||(f=[]),g=l.length;g--;)if(l[g]==t)return m(f[g]==e,c.CIRCULAR_VALUES);l.push(t),f.push(e);var E;if(!("array"!==j&&"arguments"!==j&&"typed-array"!==j||(d=b("length"),a.collectAllFails||d.result)))return d;if(!("array-buffer"!==j&&"typed-array"!==j||(d=b("byteLength"),a.collectAllFails||d.result)))return d;if("function"===v){var A=t.toString(),O=e.toString();if(d=o(A,O,a,l,f,h,p),d.reason=c.FUNCTION_SOURCES,!a.collectAllFails&&!d.result)return d}for(E in e)if(i.call(e,E)){if(d=m(i.call(t,E),n(c.MISSING_KEY,"A",E)),!d.result&&!a.collectAllFails)return d;if(d.result&&(d=b(E),!d.result&&!a.collectAllFails))return d}for(E in t)if(i.call(t,E)&&(d=m(i.call(e,E),n(c.MISSING_KEY,"B",E)),!d.result&&!a.collectAllFails))return d;l.pop(),f.pop();var x=!1,R=!1;return(!a.checkProtoEql||(Object.getPrototypeOf?(x=Object.getPrototypeOf(t)===Object.getPrototypeOf(e),R=!0):t.__proto__&&e.__proto__&&(x=t.__proto__===e.__proto__,R=!0),!R||x||a.collectAllFails||(d=m(x,c.EQUALITY_PROTOTYPE),d.showReason=!0,d.result||a.collectAllFails)))&&("function"!==v||(d=b("prototype"),d.result||a.collectAllFails))?u:d}function a(t,e,r){r=r||l;var n=[],a=o(t,e,r||l,[],[],[],n);return r.collectAllFails?n:a}var s=t("should-type"),i=Object.prototype.hasOwnProperty,u=r(!0),c={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 has no key %s",CIRCULAR_VALUES:"A has circular reference that was visited not in the same time as B"},l={checkProtoEql:!0,collectAllFails:!1};e.exports=a,a.r=c},{"should-type":20}],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.split("\n").map(function(t){return" "+t}).join("\n")}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 l(t){return function(e,r){var n=t(e),o=r.keys(e);return 0==o.length?n:a(e,r,n,o)}}function f(t){if(t.name)return t.name;var e=t.toString().match(b)[1];return e}function h(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 p=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=p(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,l(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",l(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",l(c));var b=/^\s*function\s*(\S*)\s*\(/;n("function",l(function(t){var e=f(t);return"[Function"+(e?": "+e:"")+"]"})),n("error",l(function(t){var e=t.name,r=t.message;return"["+e+(r?": "+r:"")+"]"})),n("buffer",h("length","Buffer")),n("array-buffer",h("byteLength")),n("typed-array",h("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){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]})},{}]},{},[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;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Should=t()}}(function(){return function t(e,r,n){function a(s,i){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!i&&u)return u(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var h=r[s]={exports:{}};e[s][0].call(h.exports,function(t){var r=e[s][1][t];return a(r?r:t)},h,h.exports,t,e,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s<n.length;s++)a(n[s]);return a}({1:[function(t,e){function r(t){return s+t}function n(t){return t.split("\n").map(r).join("\n")}var a=t("./util"),o=function(t){if(a.merge(this,t),t.message||Object.defineProperty(this,"message",{get:function(){return this._message||(this._message=this.generateMessage(),this.generatedMessage=!0),this._message},configurable:!0,enumerable:!1}),Error.captureStackTrace)Error.captureStackTrace(this,this.stackStartFunction);else{var e=new Error;if(e.stack){var r=e.stack;if(this.stackStartFunction){var n=a.functionName(this.stackStartFunction),o=r.indexOf("\n"+n);if(o>=0){var s=r.indexOf("\n",o+1);r=r.substring(s+1)}}this.stack=r}}},s=" ";o.prototype=Object.create(Error.prototype,{name:{value:"AssertionError"},generateMessage:{value:function(){if(!this.operator&&this.previous)return this.previous.message;var t=a.format(this.actual),e="expected"in this?" "+a.format(this.expected):"",r="details"in this&&this.details?" ("+this.details+")":"",o=this.previous?"\n"+n(this.previous.message):"";return"expected "+t+(this.negate?" not ":" ")+this.operator+e+r+o}}}),e.exports=o},{"./util":17}],2:[function(t,e){function r(t){this.obj=t,this.anyOne=!1,this.negate=!1,this.params={actual:t}}var n=t("./assertion-error"),a=t("./util");r.add=function(t,e,a){var o={enumerable:!0,configurable:!0};a=!1,o[a?"get":"value"]=function(){var a=new r(this.obj,this,t);a.anyOne=this.anyOne;try{e.apply(a,arguments)}catch(o){if(o instanceof n){if(this.negate)return this.obj=a.obj,this.negate=!1,this.proxied();a!==o.assertion&&(a.params.previous=o),a.negate=!1,a.fail()}throw o}return this.negate&&(a.negate=!0,a.params.details="false negative fail",a.fail()),this.params.operator||(this.params=a.params),this.obj=a.obj,this.negate=!1,this.proxied()},Object.defineProperty(r.prototype,t,o)},r.addChain=function(t,e){e=e||function(){},Object.defineProperty(r.prototype,t,{get:function(){return e(),this.proxied()},enumerable:!0})},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)},r.prototype={constructor:r,assert:function(t){if(t)return this.proxied();var e=this.params;throw"obj"in e&&!("actual"in e)?e.actual=e.obj:"obj"in e||"actual"in e||(e.actual=this.obj),e.stackStartFunction=e.stackStartFunction||this.assert,e.negate=this.negate,e.assertion=this,new n(e)},fail:function(){return this.assert(!1)},get not(){return this.negate=!this.negate,this.proxied()},get any(){return this.anyOne=!0,this.proxied()},proxied:function(){return"function"==typeof Proxy?new Proxy(this,{get:function(t,e){if(e in t)return t[e];throw new Error("Assertion has no property "+a.formatProp(e))}}):this}},e.exports=r},{"./assertion-error":1,"./util":17}],3:[function(t,e){var r=t("should-format").Formatter,n={checkProtoEql:!1,getFormatter:function(t){return new r(t||n)}};e.exports=n},{"should-format":20}],4:[function(t,e){function r(t,e,n,a,o){var i=new s(t);i.params={operator:a,expected:e,message:n,stackStartFunction:o||r},i.fail()}function n(t,e){t||r(t,!0,e,"==",c.ok)}function a(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 o(t,e,n,o){var s;"string"==typeof n&&(o=n,n=null);try{e()}catch(i){s=i}if(o=(n&&n.name?" ("+n.name+")":".")+(o?" "+o:"."),t&&!s&&r(s,n,"Missing expected exception"+o),!t&&a(s,n)&&r(s,n,"Got unwanted exception"+o),t&&s&&n&&!a(s,n)||!t&&s)throw s}var s=t("./../assertion"),i=t("should-equal"),u=Array.prototype.slice,c=e.exports=n;c.fail=r,c.ok=n,c.equal=function(t,e,n){t!=e&&r(t,e,n,"==",c.equal)},c.notEqual=function(t,e,n){t==e&&r(t,e,n,"!=",c.notEqual)},c.deepEqual=function(t,e,n){i(t,e).result||r(t,e,n,"deepEqual",c.deepEqual)},c.notDeepEqual=function(t,e,n){i(t,e).result&&r(t,e,n,"notDeepEqual",c.notDeepEqual)},c.strictEqual=function(t,e,n){t!==e&&r(t,e,n,"===",c.strictEqual)},c.notStrictEqual=function(t,e,n){t===e&&r(t,e,n,"!==",c.notStrictEqual)},c.throws=function(){o.apply(this,[!0].concat(u.call(arguments)))},c.doesNotThrow=function(){o.apply(this,[!1].concat(u.call(arguments)))},c.ifError=function(t){if(t)throw t}},{"./../assertion":2,"should-equal":19}],5:[function(t,e){var r=t("../util"),n=t("./_assert"),a=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 a({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 a({message:n||"expected "+e(r)+" to not exist",stackStartFunction:t.not.exist})}}},{"../assertion-error":1,"../util":17,"./_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){["an","of","a","and","be","has","have","with","is","which","the","it"].forEach(function(t){e.addChain(t)})}},{}],8:[function(t,e){var r=t("../util"),n=t("should-equal");e.exports=function(t,e){var a=t.format;e.add("containEql",function(t){this.params={operator:"to contain "+a(t)},this.is.not.null().and.not.undefined();var e=this.obj;"string"==typeof e?this.assert(e.indexOf(String(t))>=0):r.isIndexable(e)?this.assert(r.some(e,function(e){return n(e,t).result})):this.have.properties(t)}),e.add("containDeepOrdered",function(e){this.params={operator:"to contain "+a(e)};var n=this.obj;if("string"==typeof n)this.is.equal(String(e));else if(r.isIndexable(n)&&r.isIndexable(e)){for(var o=0,s=0,i=r.length(n),u=r.length(e);i>o&&u>s;o++)try{t(n[o]).containDeepOrdered(e[s]),s++}catch(c){if(c instanceof t.AssertionError)continue;throw c}this.assert(s===u)}else null!=n&&null!=e&&"object"==typeof n&&"object"==typeof e?(r.forEach(e,function(e,r){t(n[r]).containDeepOrdered(e)}),r.isEmptyObject(e)&&this.eql(e)):this.eql(e)}),e.add("containDeep",function(e){this.params={operator:"to contain "+a(e)};var n=this.obj;if("string"==typeof n)this.is.equal(String(e));else if(r.isIndexable(n)&&r.isIndexable(e)){var o={};r.forEach(e,function(e){this.assert(r.some(n,function(r,n){if(n in o)return!1;try{return t(r).containDeep(e),o[n]=!0,!0}catch(a){if(a instanceof t.AssertionError)return!1;throw a}}))},this)}else null!=n&&null!=e&&"object"==typeof n&&"object"==typeof e?(r.forEach(e,function(e,r){t(n[r]).containDeep(e)}),r.isEmptyObject(e)&&this.eql(e)):this.eql(e)})}},{"../util":17,"should-equal":19}],9:[function(t,e){function r(t,e,r){return((t.path.length>0?"at "+t.path.map(o.formatProp).join(" -> "):"")+(t.a===e?"":", A has "+o.format(t.a))+(t.b===r?"":" and B has "+o.format(t.b))+(t.showReason?" because "+t.reason:"")).trim()}var n=t("should-equal"),a=t("should-type"),o=t("../util");e.exports=function(t,e){e.add("eql",function(e,o){this.params={operator:"to equal",expected:e,message:o};var s=n(this.obj,e,t.config);this.params.details=s.result?"":r(s,this.obj,e),this.params.showDiff=n(a(this.obj),a(e)).result,this.assert(s.result)}),e.add("equal",function(t,e){this.params={operator:"to be",expected:t,message:e},this.params.showDiff=n(a(this.obj),a(t)).result,this.assert(t===this.obj)}),e.alias("equal","exactly")}},{"../util":17,"should-equal":19,"should-type":22}],10:[function(t,e){var r=t("../util");e.exports=function(t,e){var n=t.format;e.add("throw",function(e,a){var o=this.obj,s={},i="",u=!1;if(r.isGeneratorFunction(o))return t(o()).throw(e,a);if(r.isGeneratorObject(o))return t(o.next.bind(o)).throw(e,a);this.is.a.Function();var c=!0;try{o()}catch(h){u=!0,s=h}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(null!=e)try{t(s).match(e)}catch(h){if(!(h instanceof t.AssertionError))throw h;i=": "+h.message,c=!1}if(c){if("function"==typeof e&&a)try{t(s).match(a)}catch(h){if(!(h instanceof t.AssertionError))throw h;i=": "+h.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":17}],11:[function(t,e){var r=t("../util"),n=t("should-equal");e.exports=function(t,e){var a=t.format;e.add("match",function(e,o){if(this.params={operator:"to match "+a(e),message:o},!n(this.obj,e).result)if(e instanceof RegExp){if("string"==typeof this.obj)this.assert(e.exec(this.obj));else if(r.isIndexable(this.obj))r.forEach(this.obj,function(t){this.assert(e.exec(t))},this);else if(null!=this.obj&&"object"==typeof this.obj){var s=[],i=[];r.forEach(this.obj,function(t,n){e.exec(t)?i.push(r.formatProp(n)):s.push(r.formatProp(n)+" ("+a(t)+")")},this),s.length&&(this.params.operator+="\n not matched properties: "+s.join(", ")),i.length&&(this.params.operator+="\n matched properties: "+i.join(", ")),this.assert(0==s.length)}}else if("function"==typeof e){var u;u=e(this.obj),"boolean"==typeof u&&this.assert(u)}else null!=e&&"object"==typeof e?(s=[],i=[],r.forEach(e,function(e,n){try{t(this.obj[n]).match(e),i.push(r.formatProp(n))}catch(o){if(!(o instanceof t.AssertionError))throw o;s.push(r.formatProp(n)+" ("+a(this.obj[n])+")")}},this),s.length&&(this.params.operator+="\n not matched properties: "+s.join(", ")),i.length&&(this.params.operator+="\n matched properties: "+i.join(", ")),this.assert(0==s.length)):this.assert(!1)}),e.add("matchEach",function(e,n){this.params={operator:"to match each "+a(e),message:n},r.forEach(this.obj,function(r){t(r).match(e)},this)}),e.add("matchAny",function(e,n){this.params={operator:"to match any "+a(e),message:n},this.assert(r.some(this.obj,function(r){try{return t(r).match(e),!0}catch(n){if(n instanceof t.AssertionError)return!1;throw n}}))}),e.alias("matchAny","matchSome"),e.alias("matchEach","matchEvery")}},{"../util":17,"should-equal":19}],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.is.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"),a=Array.prototype.slice;e.exports=function(t,e){function o(){var t={};if(arguments.length>1)t.names=a.call(arguments);else{var e=arguments[0];"string"==typeof e?t.names=[e]:r.isIndexable(e)?t.names=e:(t.names=Object.keys(e),t.values=e)}return t}var s=t.format;e.add("propertyWithDescriptor",function(e,r){this.params={actual:this.obj,operator:"to have own property with descriptor "+s(r)};var n=this.obj;this.have.ownProperty(e),t(Object.getOwnPropertyDescriptor(Object(n),e)).have.properties(r)}),e.add("enumerable",function(t,e){t=r.convertPropertyName(t),this.params={operator:"to have enumerable property "+r.formatProp(t)+(arguments.length>1?" equal to "+s(e):"")};var n={enumerable:!0};arguments.length>1&&(n.value=e),this.have.propertyWithDescriptor(t,n)}),e.add("enumerables",function(){var e=o.apply(null,arguments);this.params={operator:"to have enumerables "+e.names.map(r.formatProp)};var n=this.obj;e.names.forEach(function(e){t(n).have.enumerable(e)})}),e.add("property",function(t,e){if(t=r.convertPropertyName(t),arguments.length>1){var n={};n[t]=e,this.have.properties(n)}else this.have.properties(t);this.obj=this.obj[t]}),e.add("properties",function(t){var e={};arguments.length>1?t=a.call(arguments):Array.isArray(t)||("string"==typeof t||"symbol"==typeof t?t=[t]:(e=t,t=Object.keys(t)));var o=Object(this.obj),i=[];t.forEach(function(t){t in o||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 h=Object.keys(e);if(h.length){var p=[];u=[],h.forEach(function(t){var a=e[t];n(o[t],a).result?u.push(r.formatProp(t)+" of "+s(a)):p.push(r.formatProp(t)+" of "+s(a)+" (got "+s(o[t])+")")}),(0!==p.length&&!this.anyOne||this.anyOne&&0===u.length)&&(u=p),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===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 i=Object.prototype.hasOwnProperty;e.add("ownProperty",function(t,e){t=r.convertPropertyName(t),this.params={actual:this.obj,operator:"to have own property "+r.formatProp(t),message:e},this.assert(i.call(this.obj,t)),this.obj=this.obj[t]}),e.alias("ownProperty","hasOwnProperty"),e.add("empty",function(){if(this.params={operator:"to be empty"},void 0!==r.length(this.obj))t(this.obj).have.property("length",0);else{var e=Object(this.obj);for(var n in e)t(this.obj).not.have.ownProperty(n)}},!0),e.add("keys",function(t){arguments.length>1?t=a.call(arguments):1===arguments.length&&"string"==typeof t?t=[t]:0===arguments.length&&(t=[]),t=t.map(String);var e=Object(this.obj),n=[];t.forEach(function(t){i.call(this.obj,t)||n.push(r.formatProp(t))},this);var o=[];Object.keys(e).forEach(function(e){t.indexOf(e)<0&&o.push(r.formatProp(e))});var s=0===t.length?"to be empty":"to have "+(1===t.length?"key ":"keys ");this.params={operator:s+t.map(r.formatProp).join(", ")},n.length>0&&(this.params.operator+="\n missing keys: "+n.join(", ")),o.length>0&&(this.params.operator+="\n extra keys: "+o.join(", ")),this.assert(0===n.length&&0===o.length)}),e.alias("keys","key"),e.add("propertyByPath",function(e){arguments.length>1?e=a.call(arguments):1===arguments.length&&"string"==typeof e?e=[e]:0===arguments.length&&(e=[]);var n=e.map(r.formatProp);e=e.map(String);for(var o,s=t(Object(this.obj)),i=[];o=e.shift();)this.params={operator:"to have property by path "+n.join(", ")+" - failed on "+r.formatProp(o)},s=s.have.property(o),i.push(o);this.params={obj:this.obj,operator:"to have property by path "+n.join(", ")},this.obj=s.obj})}},{"../util":17,"should-equal":19}],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.have.type("number")},!0),e.add("arguments",function(){this.params={operator:"to be arguments"},this.have.class("Arguments")},!0),e.alias("arguments","Arguments"),e.add("type",function(e,r){this.params={operator:"to have type "+e,message:r},t(typeof this.obj).be.exactly(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.have.type("function")},!0),e.add("Object",function(){this.params={operator:"to be an object"},this.is.not.null().and.have.type("object")},!0),e.add("String",function(){this.params={operator:"to be a string"},this.have.type("string")},!0),e.add("Array",function(){this.params={operator:"to be an array"},this.have.class("Array")},!0),e.add("Boolean",function(){this.params={operator:"to be a boolean"},this.have.type("boolean")},!0),e.add("Error",function(){this.params={operator:"to be an error"},this.have.instanceOf(Error)},!0),e.add("null",function(){this.params={operator:"to be null"},this.assert(null===this.obj)},!0),e.alias("null","Null"),e.add("class",function(t){this.params={operator:"to have [[Class]] "+t},this.assert(Object.prototype.toString.call(this.obj)==="[object "+t+"]")}),e.alias("class","Class"),e.add("undefined",function(){this.params={operator:"to be undefined"},this.assert(void 0===this.obj)},!0),e.alias("undefined","Undefined"),e.add("iterable",function(){this.params={operator:"to be iterable"},t(this.obj).have.property(Symbol.iterator).which.is.a.Function()},!0),e.add("iterator",function(){this.params={operator:"to be iterator"},t(this.obj).have.property("next").which.is.a.Function()},!0),e.add("generator",function(){this.params={operator:"to be generator"},t(this.obj).be.iterable.and.iterator.and.it.is.equal(this.obj[Symbol.iterator]())},!0)}},{"../util":17}],16:[function(t,e,r){var n=t("./util"),a=function u(t){return new u.Assertion(t).proxied()};a.AssertionError=t("./assertion-error"),a.Assertion=t("./assertion"),a.format=n.format,a.type=t("should-type"),a.util=n,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}},a.noConflict=function(t){return t=t||i,t&&(delete t.proto[t.name],t.descriptor&&Object.defineProperty(t.proto,t.name,t.descriptor)),a},a.use=function(t){return t(a,a.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"));var o=Object.prototype,s="should",i=a.extend(s,o)},{"./assertion":2,"./assertion-error":1,"./config":3,"./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":17,"should-type":22}],17:[function(t,e,r){var n=t("should-type"),a=t("./config");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};var o=Object.prototype.hasOwnProperty;r.forEach=function s(t,e,n){if(r.isGeneratorFunction(t))return s(t(),e,n);if(r.isGeneratorObject(t))for(var a=t.next();!a.done;){if(e.call(n,a.value,"value",t)===!1)return;a=t.next()}else for(var i in t)if(o.call(t,i)&&e.call(n,t[i],i,t)===!1)return},r.some=function(t,e,n){var a=!1;return r.forEach(t,function(r,o){return e.call(n,r,o,t)?(a=!0,!1):void 0},n),a},r.isEmptyObject=function(t){for(var e in t)if(o.call(t,e))return!1;return!0},r.isIndexable=function(t){var e=n(t);return e.type===n.OBJECT&&e.cls===n.ARRAY||e.type===n.OBJECT&&e.cls===n.BUFFER||e.type===n.OBJECT&&e.cls===n.ARGUMENTS||e.type===n.OBJECT&&e.cls===n.ARRAY_BUFFER||e.type===n.OBJECT&&e.cls===n.TYPED_ARRAY||e.type===n.OBJECT&&e.cls===n.DATA_VIEW||e.type===n.OBJECT&&e.cls===n.STRING||e.type===n.STRING},r.length=function(t){var e=n(t);switch(e.type){case n.STRING:return t.length;case n.OBJECT:switch(e.cls){case n.ARRAY_BUFFER:case n.TYPED_ARRAY:case n.DATA_VIEW:return t.byteLength;case n.ARRAY:case n.BUFFER:case n.ARGUMENTS:case n.FUNCTION:return t.length}}},r.convertPropertyName=function(t){return"symbol"==typeof t?t:String(t)},r.isGeneratorObject=function(t){return t?"function"==typeof t.next&&"function"==typeof t[Symbol.iterator]&&t[Symbol.iterator]()===t:!1},r.isGeneratorFunction=function(t){return"function"!=typeof t?!1:/^function\s*\*\s*/.test(t.toString())},r.format=function(t,e){return a.getFormatter(e).format(t)},r.functionName=t("should-format").Formatter.functionName,r.formatProp=function(t){return a.getFormatter().formatPropertyName(String(t))}},{"./config":3,"should-format":20,"should-type":22}],18:[function(t,e){e.exports=function(t){for(var e=arguments,r=1,n=e.length;n>r;r++)t=t.replace(/%s/,e[r]);return t}},{}],19:[function(t,e){function r(t,e,r,n,a){var o={result:t};return t||(o.path=e,o.reason=r,o.a=n,o.b=a),o}function n(t){return t.type+(t.cls?"("+t.cls+(t.sub?" "+t.sub:"")+")":"")}function a(t,e,o,p,f,l){function d(n,a){return r(n,l,a,t,e)}function m(r){return a(t[r],e[r],o,p,f,l.concat([r]))}var b=c;if(t===e)return d(0!==t||1/t==1/e,h.PLUS_0_AND_MINUS_0);var y,g,j=s(t),v=s(e),E=j.type!==v.type||j.cls!==v.cls;if(E||o.checkSubType&&j.sub!==v.sub||!o.checkSubType)return d(!1,i(h.DIFFERENT_TYPES,n(j),n(v)));switch(j.type){case"number":return t!==t?d(e!==e,h.NAN_NUMBER):0===t?d(1/t===1/e,h.PLUS_0_AND_MINUS_0):d(t===e,h.EQUALITY);case"boolean":case"string":return d(t===e,h.EQUALITY);case"function":var O=t.toString(),A=e.toString();if(b=a(O,A,o,p,f,l),!b.result)return b.reason=h.FUNCTION_SOURCES,b;break;case"object":switch(j.cls){case"regexp":for(g=["source","global","multiline","lastIndex","ignoreCase"];g.length;)if(b=m(g.shift()),!b.result)return b;break;case"date":if(+t!==+e)return d(!1,h.EQUALITY);break;case"number":case"boolean":case"string":if(b=a(t.valueOf(),e.valueOf(),o,p,f,l),!b.result)return b.reason=h.WRAPPED_VALUE,b;break;case"buffer":if(b=m("length"),!b.result)return b;for(y=t.length;y--;)if(b=m(y),!b.result)return b;return c;case"error":for(g=["name","message"];g.length;)if(b=m(g.shift()),!b.result)return b;break;case"array":case"arguments":case"typed-array":if(b=m("length"),!b.result)return b;break;case"array-buffer":if(b=m("byteLength"),!b.result)return b;break;case"map":case"set":if(b=m("size"),!b.result)return b;p.push(t),f.push(e);for(var x=t.entries(),S=x.next();!S.done;){var T=S.value[0];if("object"!=s(T).type){if(!e.has(T)){b=d(!1,h.SET_MAP_MISSING_KEY),b.a=T,b.b=T;break}if("map"==j.cls){var P=e.get(T);if(b=a(S.value[1],P,o,p,f,l),!b.result){b.a=S.value,b.b=P,b.reason=h.MAP_VALUE_EQUALITY;break}}}else for(var _=e.entries(),N=_.next();!N.done;){if(b=a(S.value[0],N.value[0],o,p,f,l),b.result){"map"==j.cls&&(b=a(S.value[1],N.value[1],o,p,f,l),b.result||(b.a=S.value,b.b=N.value,b.reason=h.MAP_VALUE_EQUALITY));break}b.reason=h.SET_MAP_MISSING_KEY,b.a=T,b.b=T,N=_.next()}if(!b.result)break;S=x.next()}if(p.pop(),f.pop(),!b.result)return b.reason=h.SET_MAP_MISSING_ENTRY,b}}for(y=p.length;y--;)if(p[y]==t)return d(f[y]==e,h.CIRCULAR_VALUES);p.push(t),f.push(e);var T;for(T in e)if(u.call(e,T)){if(b=d(u.call(t,T),i(h.MISSING_KEY,"A",T)),!b.result)break;if(b.result&&(b=m(T),!b.result))break}if(b.result)for(T in t)if(u.call(t,T)&&(b=d(u.call(e,T),i(h.MISSING_KEY,"B",T)),!b.result))return b;if(p.pop(),f.pop(),!b.result)return b;var w=!1,R=!1;return o.checkProtoEql&&(Object.getPrototypeOf?(w=Object.getPrototypeOf(t)===Object.getPrototypeOf(e),R=!0):t.__proto__&&e.__proto__&&(w=t.__proto__===e.__proto__,R=!0),R&&!w&&(b=d(w,h.EQUALITY_PROTOTYPE),b.showReason=!0,!b.result))?b:c}function o(t,e,r){r=r||{},"boolean"!=typeof r.checkProtoEql&&(r.checkProtoEql=p.checkProtoEql),"boolean"!=typeof r.checkSubType&&(r.checkSubType=p.checkSubType);var n=a(t,e,r,[],[],[]);return n}var s=t("should-type"),i=t("./format"),u=Object.prototype.hasOwnProperty,c=r(!0),h={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 has no key %s",CIRCULAR_VALUES:"A has circular reference that was visited not in the same time as B",SET_MAP_MISSING_KEY:"Set/Map missing key",MAP_VALUE_EQUALITY:"Values of the same key in A and B is not equal"},p={checkProtoEql:!0,checkSubType:!0};e.exports=o,o.r=h},{"./format":18,"should-type":22}],20:[function(t,e){function r(t){return function(e){var r=t(e);return r.sort(),r}}function n(t){t=t||{},this.seen=[],this.keys=r(t.keys===!1?Object.getOwnPropertyNames:Object.keys),this.maxLineLength="number"==typeof t.maxLineLength?t.maxLineLength:60,this.propSep=t.propSep||",",this.isUTCdate=!!t.isUTCdate}function a(t,e){var r=e?"UTC":"",n=t["get"+r+"FullYear"]()+"-"+i.pad0(t["get"+r+"Month"]()+1,2)+"-"+i.pad0(t["get"+r+"Date"](),2),a=i.pad0(t["get"+r+"Hours"](),2)+":"+i.pad0(t["get"+r+"Minutes"](),2)+":"+i.pad0(t["get"+r+"Seconds"](),2)+"."+i.pad0(t["get"+r+"Milliseconds"](),3),o=t.getTimezoneOffset(),s=Math.abs(o),u=Math.floor(s/60),c=s-60*u,h=(0>o?"+":"-")+i.pad0(u,2)+i.pad0(c,2);return n+" "+a+(e?"":" "+h)}function o(t,e){return new n(e).format(t)}var s=t("should-type"),i=t("./util");n.prototype={constructor:n,format:function(t){var e=s(t),r=e.type,n=e.type;e.cls&&(r+="_"+e.cls,n+="_"+e.cls),e.sub&&(n+="_"+e.sub);var a=this["_format_"+n]||this["_format_"+r]||this["_format_"+e.type]||this.defaultFormat;return a.call(this,t).trim()},_formatObject:function(t,e){e=e||{};var r=e.keys||this.keys(t),a=0,o=e.formatPropertyValue||this.formatPropertyValue,s=e.formatPropertyName||this.formatPropertyName,u=e.keyValueSep||": ",c=e.keyFilter||function(){return!0};this.seen.push(t);var h=[];r.forEach(function(e){if(c(e)){var r=s.call(this,e),n=(r?r+u:"")+o.call(this,t,e);a+=n.length,h.push(n)}},this),this.seen.pop(),(e.additionalProperties||[]).forEach(function(t){var e=t[0]+u+this.format(t[1]);a+=e.length,h.push(e)},this);var p=e.prefix||n.constructorName(t)||"";p.length>0&&(p+=" ");var f,l;Array.isArray(e.brackets)?(f=e.brackets&&e.brackets[0],l=e.brackets&&e.brackets[1]):(f="{",l="}");var d=e.value||"";return 0===h.length?d||p+f+l:a<=this.maxLineLength?p+f+" "+(d?d+" ":"")+h.join(this.propSep+" ")+" "+l:p+f+"\n"+(d?" "+d+"\n":"")+h.map(i.addSpaces).join(this.propSep+"\n")+"\n"+l},formatObject:function(t,e,r){r=r||this.keys(t);var n=0;return this.seen.push(t),r=r.map(function(e){var r=this.formatProperty(t,e);return n+=r.length,r},this),this.seen.pop(),0===r.length?"{}":n<=this.maxLineLength?"{ "+(e?e+" ":"")+r.join(this.propSep+" ")+" }":"{\n"+(e?" "+e+"\n":"")+r.map(i.addSpaces).join(this.propSep+"\n")+"\n}"},formatPropertyName:function(t){return t.match(/^[a-zA-Z_$][a-zA-Z_$0-9]*$/)?t:this.format(t)},formatProperty:function(t,e){var r=n.getPropertyDescriptor(t,e),a=this.formatPropertyName(e),o=r.get&&r.set?"[Getter/Setter]":r.get?"[Getter]":r.set?"[Setter]":this.seen.indexOf(r.value)>=0?"[Circular]":this.format(r.value);return a+": "+o},formatPropertyValue:function(t,e){var r=n.getPropertyDescriptor(t,e),a=r.get&&r.set?"[Getter/Setter]":r.get?"[Getter]":r.set?"[Setter]":this.seen.indexOf(r.value)>=0?"[Circular]":this.format(r.value);return a}},n.add=function(t,e,r,a){var o=Array.prototype.slice.call(arguments);a=o.pop(),n.prototype["_format_"+o.join("_")]=a},n.formatObjectWithPrefix=function(t){return function(e){var r=t.call(this,e),n=this.keys(e);return 0==n.length?r:this.formatObject(e,r,n)}};var u=/^\s*function\s*(\S*)\s*\(/;n.functionName=function(t){if(t.name)return t.name;var e=t.toString().match(u)[1];return e},n.constructorName=function(t){for(;t;){var e=Object.getOwnPropertyDescriptor(t,"constructor");if(void 0!==e&&"function"==typeof e.value){var r=n.functionName(e.value);if(""!==r)return r}t=Object.getPrototypeOf(t)}},n.getPropertyDescriptor=function(t,e){var r;try{r=Object.getOwnPropertyDescriptor(t,e)||{value:t[e]}}catch(n){r={value:n}}return r},n.generateFunctionForIndexedArray=function(t,e,r){return function(n){for(var a=this.byteArrayMaxLength||50,o=n[t],s=[],u=0,c=0;a>c&&o>c;c++){var h=n[c]||0,p=i.pad0(h.toString(16),r);u+=p.length,s.push(p)}var f=n.constructor.name||e||"";return f&&(f+=" "),0===s.length?f+"[]":u<=this.maxLineLength?f+"[ "+s.join(this.propSep+" ")+" ]":f+"[\n"+s.map(i.addSpaces).join(this.propSep+"\n")+"\n]"}},["undefined","boolean","null","symbol"].forEach(function(t){n.add(t,String)}),["number","boolean"].forEach(function(t){n.add("object",t,function(t){return this._formatObject(t,{additionalProperties:[["[[PrimitiveValue]]",t.valueOf()]]})})}),n.add("object","string",function(t){var e=t.valueOf();return this._formatObject(t,{keyFilter:function(t){return!(t.match(/\d+/)&&parseInt(t,10)<e.length)},additionalProperties:[["[[PrimitiveValue]]",e]]})}),n.add("object","regexp",function(t){return this._formatObject(t,{value:String(t)})}),n.add("number",function(t){return 0===t&&0>1/t?"-0":String(t)}),n.add("string",function(t){return"'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'"}),n.add("object",function(t){return this._formatObject(t)}),n.add("object","arguments",function(t){return this._formatObject(t,{prefix:"Arguments",formatPropertyName:function(t){return t.match(/\d+/)?void 0:this.formatPropertyName(t)},brackets:["[","]"]})}),n.add("object","array",function(t){return this._formatObject(t,{formatPropertyName:function(t){return t.match(/\d+/)?void 0:this.formatPropertyName(t)},brackets:["[","]"]})}),n.add("object","date",function(t){return this._formatObject(t,{value:a(t,this.isUTCdate)})}),n.add("function",function(t){return this._formatObject(t,{additionalProperties:[["name",n.functionName(t)]]})}),n.add("object","error",function(t){return this._formatObject(t,{prefix:t.name,additionalProperties:[["message",t.message]]})}),n.add("object","buffer",n.generateFunctionForIndexedArray("length","Buffer",2)),n.add("object","array-buffer",n.generateFunctionForIndexedArray("byteLength","ArrayBuffer",2)),n.add("object","typed-array","int8",n.generateFunctionForIndexedArray("length","Int8Array",2)),n.add("object","typed-array","uint8",n.generateFunctionForIndexedArray("length","Uint8Array",2)),n.add("object","typed-array","uint8clamped",n.generateFunctionForIndexedArray("length","Uint8ClampedArray",2)),n.add("object","typed-array","int16",n.generateFunctionForIndexedArray("length","Int16Array",4)),n.add("object","typed-array","uint16",n.generateFunctionForIndexedArray("length","Uint16Array",4)),n.add("object","typed-array","int32",n.generateFunctionForIndexedArray("length","Int32Array",8)),n.add("object","typed-array","uint32",n.generateFunctionForIndexedArray("length","Uint32Array",8)),n.add("object","promise",function(){return"[Promise]"}),n.add("object","xhr",function(){return"[XMLHttpRequest]"}),n.add("object","html-element",function(t){return t.outerHTML}),n.add("object","html-element","#text",function(t){return t.nodeValue}),n.add("object","html-element","#document",function(t){return t.documentElement.outerHTML}),n.add("object","window",function(){return"[Window]"}),n.add("object","set",function(t){var e=t.values(),r=0;this.seen.push(t);for(var n=[],a=e.next();!a.done;){var o=a.value,s=this.format(o);r+=s.length,n.push(s),a=e.next()}return this.seen.pop(),0===n.length?"Set {}":r<=this.maxLineLength?"Set { "+n.join(this.propSep+" ")+" }":"Set {\n"+n.map(i.addSpaces).join(this.propSep+"\n")+"\n}"
}),n.add("object","map",function(t){var e=t.entries(),r=0;this.seen.push(t);for(var n=[],a=e.next();!a.done;){var o,s=a.value,u=this.format(s[0]),c=this.format(s[1]);o=u.length+c.length+4<=this.maxLineLength?u+" => "+c:u+" =>\n"+c,r+=u.length+c.length+4,n.push(o),a=e.next()}return this.seen.pop(),0===n.length?"Map {}":r<=this.maxLineLength?"Map { "+n.join(this.propSep+" ")+" }":"Map {\n"+n.map(i.addSpaces).join(this.propSep+"\n")+"\n}"}),n.prototype.defaultFormat=n.prototype._format_object,o.Formatter=n,e.exports=o},{"./util":21,"should-type":22}],21:[function(t,e){function r(t){return t.split("\n").map(function(t){return" "+t}).join("\n")}function n(t,e,r){t=String(t);var n=!1;if(0>e&&(n=!0,e=-e),t.length<e){var a=new Array(e-t.length+1).join(r);return n?t+a:a+t}return t}e.exports={addSpaces:r,pad:n,pad0:function(t,e){return n(t,e,"0")}}},{}],22:[function(t,e){function r(t,e,r){this.type=t,this.cls=e,this.sub=r}function n(){this.checks=[]}function a(t){return i.getType(t)}var o=Object.prototype.toString,s=t("./types");n.prototype={add:function(t){return this.checks.push(t),this},addTypeOf:function(t,e){return this.add(function(n,a){return a===t?new r(e):void 0})},addClass:function(t,e,n){return this.add(function(a,o,i){return i===t?new r(s.OBJECT,e,n):void 0})},getType:function(t){for(var e=typeof t,r=o.call(t),n=0,a=this.checks.length;a>n;n++){var s=this.checks[n].call(this,t,e,r);if("undefined"!=typeof s)return s}}};var i=new n;i.addTypeOf(s.NUMBER,s.NUMBER).addTypeOf(s.UNDEFINED,s.UNDEFINED).addTypeOf(s.STRING,s.STRING).addTypeOf(s.BOOLEAN,s.BOOLEAN).addTypeOf(s.FUNCTION,s.FUNCTION).addTypeOf(s.SYMBOL,s.SYMBOL).add(function(t){return null===t?new r(s.NULL):void 0}).addClass("[object String]",s.STRING).addClass("[object Boolean]",s.BOOLEAN).addClass("[object Number]",s.NUMBER).addClass("[object Array]",s.ARRAY).addClass("[object RegExp]",s.REGEXP).addClass("[object Error]",s.ERROR).addClass("[object Date]",s.DATE).addClass("[object Arguments]",s.ARGUMENTS).addClass("[object Math]",s.OBJECT).addClass("[object JSON]",s.OBJECT).addClass("[object ArrayBuffer]",s.ARRAY_BUFFER).addClass("[object Int8Array]",s.TYPED_ARRAY,"int8").addClass("[object Uint8Array]",s.TYPED_ARRAY,"uint8").addClass("[object Uint8ClampedArray]",s.TYPED_ARRAY,"uint8clamped").addClass("[object Int16Array]",s.TYPED_ARRAY,"int16").addClass("[object Uint16Array]",s.TYPED_ARRAY,"uint16").addClass("[object Int32Array]",s.TYPED_ARRAY,"int32").addClass("[object Uint32Array]",s.TYPED_ARRAY,"uint32").addClass("[object Float32Array]",s.TYPED_ARRAY,"float32").addClass("[object Float64Array]",s.TYPED_ARRAY,"float64").addClass("[object DataView]",s.DATA_VIEW).addClass("[object Map]",s.MAP).addClass("[object WeakMap]",s.WEAK_MAP).addClass("[object Set]",s.SET).addClass("[object WeakSet]",s.WEAK_SET).addClass("[object Promise]",s.PROMISE).addClass("[object Window]",s.WINDOW).addClass("[object HTMLDocument]",s.HTML_ELEMENT,s.DOCUMENT).addClass("[object Blob]",s.BLOB).addClass("[object File]",s.FILE).addClass("[object FileList]",s.FILE_LIST).addClass("[object XMLHttpRequest]",s.XHR).addClass("[object Text]",s.HTML_ELEMENT,s.TEXT).add(function(t){return typeof Promise===s.FUNCTION&&t instanceof Promise||this.getType(t.then)===s.FUNCTION?new r(s.OBJECT,s.PROMISE):void 0}).add(function(t){return"undefined"!=typeof Buffer&&t instanceof Buffer?new r(s.OBJECT,s.BUFFER):void 0}).add(function(t,e,n){var a=n.match(/^\[object HTML(\w*)Element\]$/);return a?new r(s.OBJECT,s.HTML_ELEMENT,a[1]&&a[1].toLowerCase()):void 0}).add(function(){return new r(s.OBJECT)}),a.checker=i,a.TypeChecker=n,a.Type=r,Object.keys(s).forEach(function(t){a[t]=s[t]}),e.exports=a},{"./types":23}],23:[function(t,e){var r={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",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=r},{}]},{},[16])(16)});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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