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 3.3.0 to 3.3.1

.idea/libraries/should_js_node_modules.xml

7

History.md

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

3.3.1 / 2014-04-16
==================
* Added aliases for es reserved words
* Fix bug with ownProperty alias
* Fix bug with not function alias
3.3.0 / 2014-04-07

@@ -2,0 +9,0 @@ ==================

4

lib/ext/bool.js

@@ -12,2 +12,4 @@ /*!

Assertion.alias('true', 'True');
Assertion.add('false', function() {

@@ -17,2 +19,4 @@ this.is.exactly(false);

Assertion.alias('false', 'False');
Assertion.add('ok', function() {

@@ -19,0 +23,0 @@ this.params = { operator: 'to be truthy' };

6

lib/ext/property.js

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

Assertion.alias('hasOwnProperty', 'ownProperty');
Assertion.alias('ownProperty', 'hasOwnProperty');

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

try {
should(item).not.be.null.and.containDeep(other[otherIdx]);
should(item).not.be.Null.and.containDeep(other[otherIdx]);
otherIdx++;

@@ -228,3 +228,3 @@ } catch(e) {

util.forOwn(other, function(value, key) {
should(obj[key]).not.be.null.and.containDeep(value);
should(obj[key]).not.be.Null.and.containDeep(value);
});

@@ -231,0 +231,0 @@ } else {//one of the properties contain value

@@ -76,3 +76,5 @@ /*!

Assertion.alias('null', 'Null');
Assertion.alias('instanceof', 'instanceOf');
};

@@ -81,3 +81,5 @@ /*!

Assertion.alias = function(from, to) {
Assertion.prototype[to] = Assertion.prototype[from]
var desc = Object.getOwnPropertyDescriptor(Assertion.prototype, from);
if(!desc) throw new Error('Alias ' + from + ' -> ' + to + ' could not be created as ' + from + ' not defined');
Object.defineProperty(Assertion.prototype, to, desc);
};

@@ -84,0 +86,0 @@

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

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

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

!function(C){if("object"==typeof exports)module.exports=C();else if("function"==typeof define&&define.amd)define(C);else{var h;"undefined"!=typeof window?h=window:"undefined"!=typeof global?h=global:"undefined"!=typeof self&&(h=self);h.Should=C()}}(function(){return function h(k,f,g){function m(c,a){if(!f[c]){if(!k[c]){var b="function"==typeof require&&require;if(!a&&b)return b(c,!0);if(e)return e(c,!0);throw Error("Cannot find module '"+c+"'");}b=f[c]={exports:{}};k[c][0].call(b.exports,function(a){var l=
k[c][1][a];return m(l?l:a)},b,b.exports,h,k,f,g)}return f[c].exports}for(var e="function"==typeof require&&require,b=0;b<g.length;b++)m(g[b]);return m}({1:[function(h,k,f){f=h("./should");f.use(h("./ext/assert")).use(h("./ext/chain")).use(h("./ext/bool")).use(h("./ext/number")).use(h("./ext/eql")).use(h("./ext/type")).use(h("./ext/string")).use(h("./ext/property")).use(h("./ext/error")).use(h("./ext/match")).use(h("./ext/browser/jquery")).use(h("./ext/deprecated"));k.exports=f},{"./ext/assert":3,
"./ext/bool":4,"./ext/browser/jquery":5,"./ext/chain":6,"./ext/deprecated":7,"./ext/eql":8,"./ext/error":9,"./ext/match":10,"./ext/number":11,"./ext/property":12,"./ext/string":13,"./ext/type":14,"./should":15}],2:[function(h,k,f){function g(c,a){if(c===a)return!0;if(e.isBuffer(c)&&e.isBuffer(a)){if(c.length!=a.length)return!1;for(var b=0;b<c.length;b++)if(c[b]!==a[b])return!1;return!0}return e.isDate(c)&&e.isDate(a)?c.getTime()===a.getTime():e.isRegExp(c)&&e.isRegExp(a)?c.source===a.source&&c.global===
a.global&&c.multiline===a.multiline&&c.lastIndex===a.lastIndex&&c.ignoreCase===a.ignoreCase:e.isObject(c)||e.isObject(a)?m(c,a):c==a}function m(c,a){if(e.isNullOrUndefined(c)||e.isNullOrUndefined(a)||c.prototype!==a.prototype)return!1;if(e.isArguments(c)){if(!e.isArguments(a))return!1;c=b.call(c);a=b.call(a);return g(c,a)}try{var f=Object.keys(c),d=Object.keys(a),l}catch(p){return!1}if(f.length!=d.length)return!1;f.sort();d.sort();for(l=f.length-1;0<=l;l--)if(f[l]!=d[l])return!1;for(l=f.length-1;0<=
l;l--)if(d=f[l],!g(c[d],a[d]))return!1;return!0}var e=h("./util");k.exports=g;var b=Array.prototype.slice},{"./util":16}],3:[function(h,k,f){var g=h("../util"),m=h("assert"),e=m.AssertionError;k.exports=function(b){var c=b.format;g.merge(b,m);b.exist=b.exists=function(a,g){if(null==a)throw new e({message:g||"expected "+c(a)+" to exist",stackStartFunction:b.exist});};b.not={};b.not.exist=b.not.exists=function(a,g){if(null!=a)throw new e({message:g||"expected "+c(a)+" to not exist",stackStartFunction:b.not.exist});
}}},{"../util":16,assert:17}],4:[function(h,k,f){k.exports=function(g,f){f.add("true",function(){this.is.exactly(!0)},!0);f.add("false",function(){this.is.exactly(!1)},!0);f.add("ok",function(){this.params={operator:"to be truthy"};this.assert(this.obj)},!0)}},{}],5:[function(h,k,f){var g=h("../../util");k.exports=function(f,e){function b(l,d,e,b,f){var q=(g.isObject(b)?Object.keys(b):[b]).reduce(function(d,b){var c=a(this.obj)[l](b);"undefined"!==typeof c&&(d[b]=c);return d}.bind(this),{});4===arguments.length&&
g.isObject(b)?(this.params={operator:"to have "+e+" "+c(b)},q.should.have.properties(b)):4===arguments.length?(this.params={operator:"to have "+d+" "+c(b)},q.should.have.property(b)):(this.params={operator:"to have "+d+" "+c(b)+" with value "+c(f)},q.should.have.property(b,f))}var c=f.format,a=this.jQuery||this.$;"undefined"!==typeof HTMLElement&&HTMLElement&&!HTMLElement.prototype.inspect&&(HTMLElement.prototype.inspect=function(){return this.outerHTML});"undefined"!==typeof jQuery&&jQuery&&!jQuery.prototype.inspect&&
(jQuery.fn.inspect=function(){var a=this.toArray().map(function(a){return g.inspect(a)}).join(", ");return this.selector?"SELECTOR("+this.selector+") matching "+this.length+" elements"+(a.length?": "+a:""):a});var q=function(l){return a("<div/>").append(l).html()},d=function(l,d,b){e.add(d||l,function(){this.params={operator:"to be "+(b||l)};this.assert(a(this.obj).is(":"+l))},!0)};e.add("className",function(l){this.params={operator:"to have class "+l};this.assert(a(this.obj).hasClass(l))});e.add("css",
function(l){this.params={operator:"to have css "+c(l)};for(var d in l){var b=l[d];"auto"===b&&"auto"===a(this.obj).get(0).style[d]||a(this.obj).css(d).should.eql(b)}});d("visible");d("hidden");d("selected");d("checked");d("disabled");d("empty","emptyJq");d("focus","focused","focused");e.add("inDOM",function(){this.params={operator:"to be in the DOM"};this.assert(a.contains(document.documentElement,a(this.obj)[0]))},!0);e.add("exist",function(){this.params={operator:"to exist"};a(this.obj).should.not.have.length(0)},
!0);e.add("attr",function(){var a=["attr","attribute","attributes"].concat(Array.prototype.slice.call(arguments,0));b.apply(this,a)});e.add("prop",function(){var a=["prop","property","properties"].concat(Array.prototype.slice.call(arguments,0));b.apply(this,a)});e.add("elementId",function(a){this.params={operator:"to have ID "+c(a)};this.obj.should.have.attr("id",a)});e.add("html",function(l){this.params={operator:"to have HTML "+c(l)};a(this.obj).html().should.eql(q(l))});e.add("containHtml",function(l){this.params=
{operator:"to contain HTML "+c(l)};a(this.obj).html().indexOf(q(l)).should.be.above(-1)});e.add("text",function(l){this.params={operator:"to have text "+c(l)};var d=a.trim(a(this.obj).text());g.isRegExp(l)?d.should.match(l):d.should.eql(l)});e.add("containText",function(l){this.params={operator:"to contain text "+c(l)};var d=a.trim(a(this.obj).text());g.isRegExp(l)?d.should.match(l):d.indexOf(l).should.be.above(-1)});e.add("value",function(d){this.params={operator:"to have value "+c(d)};a(this.obj).val().should.eql(d)});
e.add("data",function(){var a=["data","data","data"].concat(Array.prototype.slice.call(arguments,0));b.apply(this,a)});e.add("containElement",function(d){this.params={operator:"to contain "+a(d).inspect()};a(this.obj).find(d).should.not.have.length(0)});e.add("matchedBy",function(d){this.params={operator:"to be matched by selector "+d};a(this.obj).filter(d).should.not.have.length(0)});e.add("handle",function(d){this.params={operator:"to handle "+d};var b=a._data(a(this.obj).get(0),"events");if(!b||
!d||"string"!==typeof d)return this.assert(!1);var c=d.split(".");d=c.shift();var e=c.slice(0).sort(),e=RegExp("(^|\\.)"+e.join("\\.(?:.*\\.)?")+"(\\.|$)");if(b[d]&&c.length){for(c=0;c<b[d].length;c++)if(e.test(b[d][c].namespace))return;this.assert(!1)}else b.should.have.property(d),b[d].should.not.have.length(0)});e.add("handleWith",function(d,b){this.params={operator:"to handle "+d+" with "+b};for(var c=d.split(".")[0],c=a._data(a(this.obj).get(0),"events")[c],e=0;e<c.length;e++)if(c[e].handler==
b)return;this.assert(!1)})}},{"../../util":16}],6:[function(h,k,f){k.exports=function(g,f){"an of a and be have with is which the".split(" ").forEach(function(e){Object.defineProperty(f.prototype,e,{get:function(){return this}})})}},{}],7:[function(h,k,f){var g=h("../util"),m=h("../eql");k.exports=function(e,b){var c=e.format;b.add("include",function(a,b){if(Array.isArray(this.obj)||g.isString(this.obj))this.params={operator:"to include "+c(a),message:b},this.assert(~this.obj.indexOf(a));else{this.params=
{operator:"to include an object equal to "+c(a),message:b};var d={},e;for(e in a)d[e]=this.obj[e];this.assert(m(d,a))}});b.add("includeEql",function(a,b){this.params={operator:"to include an object equal to "+c(a),message:b};this.assert(this.obj.some(function(d){return m(a,d)}))})}},{"../eql":2,"../util":16}],8:[function(h,k,f){var g=h("../eql");k.exports=function(f,e){e.add("eql",function(b,c){this.params={operator:"to equal",expected:b,showDiff:!0,message:c};this.assert(g(b,this.obj))});e.add("equal",
function(b,c){this.params={operator:"to be",expected:b,showDiff:!0,message:c};this.assert(b===this.obj)});e.alias("equal","exactly")}},{"../eql":2}],9:[function(h,k,f){k.exports=function(g,f){var e=g.format;f.add("throw",function(b){var c=this.obj,a={},g="",d=!0;try{c(),d=!1}catch(l){a=l}d&&("string"==typeof b?d=b==a.message:b instanceof RegExp?d=b.test(a.message):"function"==typeof b&&(d=a instanceof b),b&&!d?"string"==typeof b?g=" with a message matching '"+b+"', but got '"+a.message+"'":b instanceof
RegExp?g=" with a message matching "+b+", but got '"+a.message+"'":"function"==typeof b&&(g=" of type "+b.name+", but got "+a.constructor.name):g=" (got "+e(a)+")");this.params={operator:"to throw exception"+g};this.assert(d)});f.alias("throw","throwError")}},{}],10:[function(h,k,f){var g=h("../util"),m=h("../eql");k.exports=function(e,b){var c=e.format;b.add("match",function(a,f){this.params={operator:"to match "+c(a),message:f};if(!m(this.obj,a))if(g.isRegExp(a))if(g.isString(this.obj))this.assert(a.exec(this.obj));
else if(Array.isArray(this.obj))this.obj.forEach(function(d){this.assert(a.exec(d))},this);else{if(g.isObject(this.obj)){var d=[],l=[];g.forOwn(this.obj,function(b,e){a.exec(b)?l.push(c(e)):d.push(c(e))},this);d.length&&(this.params.operator+="\n\tnot matched properties: "+d.join(", "));l.length&&(this.params.operator+="\n\tmatched properties: "+l.join(", "));this.assert(0==d.length)}}else if(g.isFunction(a)){var h;try{h=a(this.obj)}catch(k){throw k instanceof e.AssertionError&&(this.params.operator+=
"\n\t"+k.message),k;}h instanceof b&&(this.params.operator+="\n\t"+h.getMessage());g.isBoolean(h)&&this.assert(h)}else g.isObject(a)?(d=[],l=[],g.forOwn(a,function(a,b){try{this.obj[b].should.match(a),l.push(b)}catch(c){if(c instanceof e.AssertionError)d.push(b);else throw c;}},this),d.length&&(this.params.operator+="\n\tnot matched properties: "+d.join(", ")),l.length&&(this.params.operator+="\n\tmatched properties: "+l.join(", ")),this.assert(0==d.length)):this.assert(!1)});b.add("matchEach",function(a,
b){this.params={operator:"to match each "+c(a),message:b};var d=a;g.isRegExp(a)?d=function(d){return!!a.exec(d)}:g.isFunction(a)||(d=function(d){return m(d,a)});g.forOwn(this.obj,function(a,b){var c=d(a,b);g.isBoolean(c)&&this.assert(c)},this)})}},{"../eql":2,"../util":16}],11:[function(h,k,f){k.exports=function(g,f){f.add("NaN",function(){this.params={operator:"to be NaN"};this.assert(this.obj!==this.obj)},!0);f.add("Infinity",function(){this.params={operator:"to be Infinity"};this.is.a.Number.and.not.a.NaN.and.assert(!isFinite(this.obj))},
!0);f.add("within",function(e,b,c){this.params={operator:"to be within "+e+".."+b,message:c};this.assert(this.obj>=e&&this.obj<=b)});f.add("approximately",function(e,b,c){this.params={operator:"to be approximately "+e+" \u00b1"+b,message:c};this.assert(Math.abs(this.obj-e)<=b)});f.add("above",function(e,b){this.params={operator:"to be above "+e,message:b};this.assert(this.obj>e)});f.add("below",function(e,b){this.params={operator:"to be below "+e,message:b};this.assert(this.obj<e)});f.alias("above",
"greaterThan");f.alias("below","lessThan")}},{}],12:[function(h,k,f){var g=h("../util"),m=h("../eql"),e=Array.prototype.slice;k.exports=function(b,c){var a=b.format;c.add("enumerable",function(a,b){this.params={operator:"to have enumerable property '"+a+"'"};this.assert(this.obj.propertyIsEnumerable(a));1<arguments.length&&(this.params.operator+=" equal to '"+b+"'",this.assert(m(b,this.obj[a])))});c.add("property",function(a,b){if(1<arguments.length){var c={};c[a]=b;this.have.properties(c)}else this.have.properties(a);
this.obj=this.obj[a]});c.add("properties",function(d){var b={};1<arguments.length?d=e.call(arguments):Array.isArray(d)||(g.isString(d)?d=[d]:(b=d,d=Object.keys(d)));var c=Object(this.obj),f=[];d.forEach(function(d){d in c||f.push(a(d))});var h=f;0===h.length?h=d.map(a):this.one&&(h=d.filter(function(d){return 0>f.indexOf(a(d))}).map(a));var k=(1===h.length?"to have property ":"to have "+(this.one?"any of ":"")+"properties ")+h.join(", ");this.params={operator:k};this.assert(0===f.length||this.one&&
f.length!=d.length);var q=Object.keys(b);if(q.length){var r=[],h=[];q.forEach(function(d){var e=b[d];m(c[d],e)?h.push(a(d)+" of "+a(e)):r.push(a(d)+" of "+a(e)+" (got "+a(c[d])+")")});if(0!==r.length&&!this.one||this.one&&0===h.length)h=r;k=(1===h.length?"to have property ":"to have "+(this.one?"any of ":"")+"properties ")+h.join(", ");this.params={operator:k};this.assert(0===r.length||this.one&&r.length!=q.length)}});c.add("length",function(a,b){this.have.property("length",a,b)});c.alias("length",
"lengthOf");var f=Object.prototype.hasOwnProperty;c.add("ownProperty",function(d,b){this.params={operator:"to have own property "+a(d),message:b};this.assert(f.call(this.obj,d));this.obj=this.obj[d]});c.alias("hasOwnProperty","ownProperty");c.add("empty",function(){this.params={operator:"to be empty"};if(g.isString(this.obj)||Array.isArray(this.obj)||g.isArguments(this.obj))this.have.property("length",0);else{var a=Object(this.obj),b;for(b in a)this.have.not.ownProperty(b)}},!0);c.add("keys",function(d){1<
arguments.length?d=e.call(arguments):1===arguments.length&&g.isString(d)?d=[d]:0===arguments.length&&(d=[]);var b=Object(this.obj),c=[];d.forEach(function(d){f.call(this.obj,d)||c.push(a(d))},this);var h=[];Object.keys(b).forEach(function(b){0>d.indexOf(b)&&h.push(a(b))});this.params={operator:(0===d.length?"to be empty":"to have "+(1===d.length?"key ":"keys "))+d.map(a).join(", ")};0<c.length&&(this.params.operator+="\n\tmissing keys: "+c.join(", "));0<h.length&&(this.params.operator+="\n\textra keys: "+
h.join(", "));this.assert(0===c.length&&0===h.length)});c.alias("keys","key");c.add("containEql",function(b){this.params={operator:"to contain "+a(b)};var c=this.obj;Array.isArray(c)?this.assert(c.some(function(a){return m(a,b)})):g.isString(c)?this.assert(0<=c.indexOf(String(b))):g.isObject(c)?g.forOwn(b,function(a,b){c.should.have.property(b,a)}):this.assert(!1)});c.add("containDeep",function(d){this.params={operator:"to contain "+a(d)};var c=this.obj;if(Array.isArray(c))if(Array.isArray(d)){var e=
0;c.forEach(function(a){try{b(a).not.be.null.and.containDeep(d[e]),e++}catch(c){if(!(c instanceof b.AssertionError))throw c;}});this.assert(e==d.length)}else this.assert(!1);else g.isString(c)?this.assert(0<=c.indexOf(String(d))):g.isObject(c)?g.isObject(d)?g.forOwn(d,function(a,d){b(c[d]).not.be.null.and.containDeep(a)}):this.assert(!1):this.eql(d)})}},{"../eql":2,"../util":16}],13:[function(h,k,f){k.exports=function(f,h){h.add("startWith",function(e,b){this.params={operator:"to start with "+f.format(e),
message:b};this.assert(0===this.obj.indexOf(e))});h.add("endWith",function(e,b){this.params={operator:"to end with "+f.format(e),message:b};this.assert(0<=this.obj.indexOf(e,this.obj.length-e.length))})}},{}],14:[function(h,k,f){var g=h("../util");k.exports=function(f,e){e.add("Number",function(){this.params={operator:"to be a number"};this.assert(g.isNumber(this.obj))},!0);e.add("arguments",function(){this.params={operator:"to be arguments"};this.assert(g.isArguments(this.obj))},!0);e.add("type",
function(b,c){this.params={operator:"to have type "+b,message:c};(typeof this.obj).should.be.exactly(b,c)});e.add("instanceof",function(b,c){this.params={operator:"to be an instance of "+b.name,message:c};this.assert(Object(this.obj)instanceof b)});e.add("Function",function(){this.params={operator:"to be a function"};this.assert(g.isFunction(this.obj))},!0);e.add("Object",function(){this.params={operator:"to be an object"};this.assert(g.isObject(this.obj))},!0);e.add("String",function(){this.params=
{operator:"to be a string"};this.assert(g.isString(this.obj))},!0);e.add("Array",function(){this.params={operator:"to be an array"};this.assert(Array.isArray(this.obj))},!0);e.add("Boolean",function(){this.params={operator:"to be a boolean"};this.assert(g.isBoolean(this.obj))},!0);e.add("Error",function(){this.params={operator:"to be an error"};this.assert(g.isError(this.obj))},!0);e.add("null",function(){this.params={operator:"to be null"};this.assert(null===this.obj)},!0);e.alias("instanceof","instanceOf")}},
{"../util":16}],15:[function(h,k,f){var g=h("./util"),m=g.AssertionError,e=g.inspect,b=function(a){return new c(g.isWrapperType(a)?a.valueOf():a)},c=b.Assertion=function(a){this.obj=a};c.add=function(a,d,e){var f={};f[e?"get":"value"]=function(){var a=new c(this.obj);a.copy=a.copyIfMissing;a.one=this.one;try{d.apply(a,arguments)}catch(e){this.copy(a);if(e instanceof b.AssertionError){if(this.negate)return this.obj=a.obj,this.negate=!1,this;this.assert(!1)}throw e;}this.copy(a);this.negate&&this.assert(!1);
this.obj=a.obj;this.negate=!1;return this};Object.defineProperty(c.prototype,a,f)};c.alias=function(a,b){c.prototype[b]=c.prototype[a]};b.AssertionError=m;var a=b.format=function(a){return g.isDate(a)&&"function"!==typeof a.inspect?a.toISOString():e(a,{depth:null})};b.use=function(a){a(this,c);return this};k.exports=b;Object.defineProperty(Object.prototype,"should",{set:function(){},get:function(){return b(this)},configurable:!0});c.prototype={constructor:c,assert:function(a){if(!a){a=this.params;
var b=a.message,c=!1;b||(b=this.getMessage(),c=!0);b=new m({message:b,actual:this.obj,expected:a.expected,stackStartFunction:this.assert});b.showDiff=a.showDiff;b.operator=a.operator;b.generatedMessage=c;throw b;}},getMessage:function(){return"expected "+("obj"in this.params?this.params.obj:a(this.obj))+(this.negate?" not ":" ")+this.params.operator+("expected"in this.params?" "+a(this.params.expected):"")},copy:function(a){this.params=a.params},copyIfMissing:function(a){this.params||(this.params=
a.params)},get not(){this.negate=!this.negate;return this},get any(){this.one=!0;return this}}},{"./util":16}],16:[function(h,k,f){function g(a){return"number"===typeof a||a instanceof Number}function m(a){return"string"===typeof a||a instanceof String}function e(a){return"boolean"===typeof a||a instanceof Boolean}function b(a){return"object"===typeof a&&null!==a}f.isWrapperType=function(a){return g(a)||m(a)||e(a)};f.merge=function(a,b){if(a&&b)for(var c in b)a[c]=b[c];return a};f.isNumber=g;f.isBoolean=
e;f.isString=m;f.isBuffer=function(a){return"undefined"!==typeof Buffer&&a instanceof Buffer};f.isDate=function(a){return b(a)&&"[object Date]"===Object.prototype.toString.call(a)};f.isObject=b;f.isRegExp=function(a){return b(a)&&"[object RegExp]"===Object.prototype.toString.call(a)};f.isNullOrUndefined=function(a){return null==a};f.isArguments=function(a){return"[object Arguments]"===Object.prototype.toString.call(a)};f.isFunction=function(a){return"function"===typeof a||a instanceof Function};f.isError=
function(a){return b(a)&&"[object Error]"===Object.prototype.toString.call(a)||a instanceof Error};f.inspect=h("util").inspect;f.AssertionError=h("assert").AssertionError;var c=Object.prototype.hasOwnProperty;f.forOwn=function(a,b,d){for(var e in a)c.call(a,e)&&b.call(d,a[e],e)}},{assert:17,util:20}],17:[function(h,k,f){function g(a,b){return p.isUndefined(b)?""+b:p.isNumber(b)&&(isNaN(b)||!isFinite(b))||p.isFunction(b)||p.isRegExp(b)?b.toString():b}function m(a,b){return p.isString(a)?a.length<b?
a:a.slice(0,b):a}function e(a,b,c,d,e){throw new n.AssertionError({message:c,actual:a,expected:b,operator:d,stackStartFunction:e});}function b(a,b){a||e(a,!0,b,"==",n.ok)}function c(a,b){if(a===b)return!0;if(p.isBuffer(a)&&p.isBuffer(b)){if(a.length!=b.length)return!1;for(var c=0;c<a.length;c++)if(a[c]!==b[c])return!1;return!0}return p.isDate(a)&&p.isDate(b)?a.getTime()===b.getTime():p.isRegExp(a)&&p.isRegExp(b)?a.source===b.source&&a.global===b.global&&a.multiline===b.multiline&&a.lastIndex===b.lastIndex&&
a.ignoreCase===b.ignoreCase:p.isObject(a)||p.isObject(b)?q(a,b):a==b}function a(a){return"[object Arguments]"==Object.prototype.toString.call(a)}function q(b,d){if(p.isNullOrUndefined(b)||p.isNullOrUndefined(d)||b.prototype!==d.prototype)return!1;if(a(b)){if(!a(d))return!1;b=s.call(b);d=s.call(d);return c(b,d)}try{var e=t(b),f=t(d),g}catch(h){return!1}if(e.length!=f.length)return!1;e.sort();f.sort();for(g=e.length-1;0<=g;g--)if(e[g]!=f[g])return!1;for(g=e.length-1;0<=g;g--)if(f=e[g],!c(b[f],d[f]))return!1;
return!0}function d(a,b){return a&&b?"[object RegExp]"==Object.prototype.toString.call(b)?b.test(a):a instanceof b||!0===b.call({},a)?!0:!1:!1}function l(a,b,c,f){var g;p.isString(c)&&(f=c,c=null);try{b()}catch(h){g=h}f=(c&&c.name?" ("+c.name+").":".")+(f?" "+f:".");a&&!g&&e(g,c,"Missing expected exception"+f);!a&&d(g,c)&&e(g,c,"Got unwanted exception"+f);if(a&&g&&c&&!d(g,c)||!a&&g)throw g;}var p=h("util/"),s=Array.prototype.slice,v=Object.prototype.hasOwnProperty,n=k.exports=b;n.AssertionError=function(a){this.name=
"AssertionError";this.actual=a.actual;this.expected=a.expected;this.operator=a.operator;a.message?(this.message=a.message,this.generatedMessage=!1):(this.message=m(JSON.stringify(this.actual,g),128)+" "+this.operator+" "+m(JSON.stringify(this.expected,g),128),this.generatedMessage=!0);var b=a.stackStartFunction||e;Error.captureStackTrace?Error.captureStackTrace(this,b):(a=Error(),a.stack&&(a=a.stack,b=a.indexOf("\n"+b.name),0<=b&&(b=a.indexOf("\n",b+1),a=a.substring(b+1)),this.stack=a))};p.inherits(n.AssertionError,
Error);n.fail=e;n.ok=b;n.equal=function(a,b,c){a!=b&&e(a,b,c,"==",n.equal)};n.notEqual=function(a,b,c){a==b&&e(a,b,c,"!=",n.notEqual)};n.deepEqual=function(a,b,d){c(a,b)||e(a,b,d,"deepEqual",n.deepEqual)};n.notDeepEqual=function(a,b,d){c(a,b)&&e(a,b,d,"notDeepEqual",n.notDeepEqual)};n.strictEqual=function(a,b,c){a!==b&&e(a,b,c,"===",n.strictEqual)};n.notStrictEqual=function(a,b,c){a===b&&e(a,b,c,"!==",n.notStrictEqual)};n.throws=function(a,b,c){l.apply(this,[!0].concat(s.call(arguments)))};n.doesNotThrow=
function(a,b){l.apply(this,[!1].concat(s.call(arguments)))};n.ifError=function(a){if(a)throw a;};var t=Object.keys||function(a){var b=[],c;for(c in a)v.call(a,c)&&b.push(c);return b}},{"util/":20}],18:[function(h,k,f){k.exports="function"===typeof Object.create?function(f,h){f.super_=h;f.prototype=Object.create(h.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}})}:function(f,h){f.super_=h;var e=function(){};e.prototype=h.prototype;f.prototype=new e;f.prototype.constructor=
f}},{}],19:[function(h,k,f){k.exports=function(f){return f&&"object"===typeof f&&"function"===typeof f.copy&&"function"===typeof f.fill&&"function"===typeof f.readUInt8}},{}],20:[function(h,k,f){function g(a,b){var d={seen:[],stylize:e};3<=arguments.length&&(d.depth=arguments[2]);4<=arguments.length&&(d.colors=arguments[3]);v(b)?d.showHidden=b:b&&f._extend(d,b);r(d.showHidden)&&(d.showHidden=!1);r(d.depth)&&(d.depth=2);r(d.colors)&&(d.colors=!1);r(d.customInspect)&&(d.customInspect=!0);d.colors&&
(d.stylize=m);return c(d,a,d.depth)}function m(a,b){var c=g.styles[b];return c?"\u001b["+g.colors[c][0]+"m"+a+"\u001b["+g.colors[c][1]+"m":a}function e(a,b){return a}function b(a){var b={};a.forEach(function(a,c){b[a]=!0});return b}function c(e,g,h){if(e.customInspect&&g&&y(g.inspect)&&g.inspect!==f.inspect&&(!g.constructor||g.constructor.prototype!==g)){var k=g.inspect(h,e);t(k)||(k=c(e,k,h));return k}if(k=a(e,g))return k;var m=Object.keys(g),n=b(m);e.showHidden&&(m=Object.getOwnPropertyNames(g));
if(x(g)&&(0<=m.indexOf("message")||0<=m.indexOf("description")))return q(g);if(0===m.length){if(y(g))return e.stylize("[Function"+(g.name?": "+g.name:"")+"]","special");if(w(g))return e.stylize(RegExp.prototype.toString.call(g),"regexp");if(D(g))return e.stylize(Date.prototype.toString.call(g),"date");if(x(g))return q(g)}var k="",z=!1,A=["{","}"];s(g)&&(z=!0,A=["[","]"]);y(g)&&(k=" [Function"+(g.name?": "+g.name:"")+"]");w(g)&&(k=" "+RegExp.prototype.toString.call(g));D(g)&&(k=" "+Date.prototype.toUTCString.call(g));
x(g)&&(k=" "+q(g));if(0===m.length&&(!z||0==g.length))return A[0]+k+A[1];if(0>h)return w(g)?e.stylize(RegExp.prototype.toString.call(g),"regexp"):e.stylize("[Object]","special");e.seen.push(g);m=z?d(e,g,h,n,m):m.map(function(a){return l(e,g,h,n,a,z)});e.seen.pop();return p(m,k,A)}function a(a,b){if(r(b))return a.stylize("undefined","undefined");if(t(b)){var c="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(c,"string")}if(n(b))return a.stylize(""+
b,"number");if(v(b))return a.stylize(""+b,"boolean");if(null===b)return a.stylize("null","null")}function q(a){return"["+Error.prototype.toString.call(a)+"]"}function d(a,b,c,d,e){for(var f=[],g=0,h=b.length;g<h;++g)Object.prototype.hasOwnProperty.call(b,String(g))?f.push(l(a,b,c,d,String(g),!0)):f.push("");e.forEach(function(e){e.match(/^\d+$/)||f.push(l(a,b,c,d,e,!0))});return f}function l(a,b,d,e,f,g){var h,k;b=Object.getOwnPropertyDescriptor(b,f)||{value:b[f]};b.get?k=b.set?a.stylize("[Getter/Setter]",
"special"):a.stylize("[Getter]","special"):b.set&&(k=a.stylize("[Setter]","special"));Object.prototype.hasOwnProperty.call(e,f)||(h="["+f+"]");k||(0>a.seen.indexOf(b.value)?(k=null===d?c(a,b.value,null):c(a,b.value,d-1),-1<k.indexOf("\n")&&(k=g?k.split("\n").map(function(a){return" "+a}).join("\n").substr(2):"\n"+k.split("\n").map(function(a){return" "+a}).join("\n"))):k=a.stylize("[Circular]","special"));if(r(h)){if(g&&f.match(/^\d+$/))return k;h=JSON.stringify(""+f);h.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?
(h=h.substr(1,h.length-2),h=a.stylize(h,"name")):(h=h.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),h=a.stylize(h,"string"))}return h+": "+k}function p(a,b,c){var d=0;return 60<a.reduce(function(a,b){d++;0<=b.indexOf("\n")&&d++;return a+b.replace(/\u001b\[\d\d?m/g,"").length+1},0)?c[0]+(""===b?"":b+"\n ")+" "+a.join(",\n ")+" "+c[1]:c[0]+b+" "+a.join(", ")+" "+c[1]}function s(a){return Array.isArray(a)}function v(a){return"boolean"===typeof a}function n(a){return"number"===typeof a}
function t(a){return"string"===typeof a}function r(a){return void 0===a}function w(a){return u(a)&&"[object RegExp]"===Object.prototype.toString.call(a)}function u(a){return"object"===typeof a&&null!==a}function D(a){return u(a)&&"[object Date]"===Object.prototype.toString.call(a)}function x(a){return u(a)&&("[object Error]"===Object.prototype.toString.call(a)||a instanceof Error)}function y(a){return"function"===typeof a}function E(a){return 10>a?"0"+a.toString(10):a.toString(10)}function G(){var a=
new Date,b=[E(a.getHours()),E(a.getMinutes()),E(a.getSeconds())].join(":");return[a.getDate(),H[a.getMonth()],b].join(" ")}var I=/%[sdj%]/g;f.format=function(a){if(!t(a)){for(var b=[],c=0;c<arguments.length;c++)b.push(g(arguments[c]));return b.join(" ")}for(var c=1,d=arguments,e=d.length,b=String(a).replace(I,function(a){if("%%"===a)return"%";if(c>=e)return a;switch(a){case "%s":return String(d[c++]);case "%d":return Number(d[c++]);case "%j":try{return JSON.stringify(d[c++])}catch(b){return"[Circular]"}default:return a}}),
f=d[c];c<e;f=d[++c])b=null!==f&&u(f)?b+(" "+g(f)):b+(" "+f);return b};f.deprecate=function(a,b){if(r(global.process))return function(){return f.deprecate(a,b).apply(this,arguments)};if(!0===process.noDeprecation)return a;var c=!1;return function(){if(!c){if(process.throwDeprecation)throw Error(b);process.traceDeprecation?console.trace(b):console.error(b);c=!0}return a.apply(this,arguments)}};var B={},F;f.debuglog=function(a){r(F)&&(F=process.env.NODE_DEBUG||"");a=a.toUpperCase();if(!B[a])if(RegExp("\\b"+
a+"\\b","i").test(F)){var b=process.pid;B[a]=function(){var c=f.format.apply(f,arguments);console.error("%s %d: %s",a,b,c)}}else B[a]=function(){};return B[a]};f.inspect=g;g.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};g.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"};f.isArray=
s;f.isBoolean=v;f.isNull=function(a){return null===a};f.isNullOrUndefined=function(a){return null==a};f.isNumber=n;f.isString=t;f.isSymbol=function(a){return"symbol"===typeof a};f.isUndefined=r;f.isRegExp=w;f.isObject=u;f.isDate=D;f.isError=x;f.isFunction=y;f.isPrimitive=function(a){return null===a||"boolean"===typeof a||"number"===typeof a||"string"===typeof a||"symbol"===typeof a||"undefined"===typeof a};f.isBuffer=h("./support/isBuffer");var H="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ");
f.log=function(){console.log("%s - %s",G(),f.format.apply(f,arguments))};f.inherits=h("inherits");f._extend=function(a,b){if(!b||!u(b))return a;for(var c=Object.keys(b),d=c.length;d--;)a[c[d]]=b[c[d]];return a}},{"./support/isBuffer":19,inherits:18}]},{},[1])(1)});
!function(C){if("object"==typeof exports)module.exports=C();else if("function"==typeof define&&define.amd)define(C);else{var h;"undefined"!=typeof window?h=window:"undefined"!=typeof global?h=global:"undefined"!=typeof self&&(h=self);h.Should=C()}}(function(){return function h(k,d,e){function m(g,a){if(!d[g]){if(!k[g]){var b="function"==typeof require&&require;if(!a&&b)return b(g,!0);if(c)return c(g,!0);throw Error("Cannot find module '"+g+"'");}b=d[g]={exports:{}};k[g][0].call(b.exports,function(a){var l=
k[g][1][a];return m(l?l:a)},b,b.exports,h,k,d,e)}return d[g].exports}for(var c="function"==typeof require&&require,b=0;b<e.length;b++)m(e[b]);return m}({1:[function(h,k,d){d=h("./should");d.use(h("./ext/assert")).use(h("./ext/chain")).use(h("./ext/bool")).use(h("./ext/number")).use(h("./ext/eql")).use(h("./ext/type")).use(h("./ext/string")).use(h("./ext/property")).use(h("./ext/error")).use(h("./ext/match")).use(h("./ext/browser/jquery")).use(h("./ext/deprecated"));k.exports=d},{"./ext/assert":3,
"./ext/bool":4,"./ext/browser/jquery":5,"./ext/chain":6,"./ext/deprecated":7,"./ext/eql":8,"./ext/error":9,"./ext/match":10,"./ext/number":11,"./ext/property":12,"./ext/string":13,"./ext/type":14,"./should":15}],2:[function(h,k,d){function e(g,a){if(g===a)return!0;if(c.isBuffer(g)&&c.isBuffer(a)){if(g.length!=a.length)return!1;for(var b=0;b<g.length;b++)if(g[b]!==a[b])return!1;return!0}return c.isDate(g)&&c.isDate(a)?g.getTime()===a.getTime():c.isRegExp(g)&&c.isRegExp(a)?g.source===a.source&&g.global===
a.global&&g.multiline===a.multiline&&g.lastIndex===a.lastIndex&&g.ignoreCase===a.ignoreCase:c.isObject(g)||c.isObject(a)?m(g,a):g==a}function m(g,a){if(c.isNullOrUndefined(g)||c.isNullOrUndefined(a)||g.prototype!==a.prototype)return!1;if(c.isArguments(g)){if(!c.isArguments(a))return!1;g=b.call(g);a=b.call(a);return e(g,a)}try{var p=Object.keys(g),f=Object.keys(a),l}catch(q){return!1}if(p.length!=f.length)return!1;p.sort();f.sort();for(l=p.length-1;0<=l;l--)if(p[l]!=f[l])return!1;for(l=p.length-1;0<=
l;l--)if(f=p[l],!e(g[f],a[f]))return!1;return!0}var c=h("./util");k.exports=e;var b=Array.prototype.slice},{"./util":16}],3:[function(h,k,d){var e=h("../util"),m=h("assert"),c=m.AssertionError;k.exports=function(b){var g=b.format;e.merge(b,m);b.exist=b.exists=function(a,e){if(null==a)throw new c({message:e||"expected "+g(a)+" to exist",stackStartFunction:b.exist});};b.not={};b.not.exist=b.not.exists=function(a,e){if(null!=a)throw new c({message:e||"expected "+g(a)+" to not exist",stackStartFunction:b.not.exist});
}}},{"../util":16,assert:17}],4:[function(h,k,d){k.exports=function(e,d){d.add("true",function(){this.is.exactly(!0)},!0);d.alias("true","True");d.add("false",function(){this.is.exactly(!1)},!0);d.alias("false","False");d.add("ok",function(){this.params={operator:"to be truthy"};this.assert(this.obj)},!0)}},{}],5:[function(h,k,d){var e=h("../../util");k.exports=function(d,c){function b(l,f,c,b,d){var p=(e.isObject(b)?Object.keys(b):[b]).reduce(function(f,b){var c=a(this.obj)[l](b);"undefined"!==typeof c&&
(f[b]=c);return f}.bind(this),{});4===arguments.length&&e.isObject(b)?(this.params={operator:"to have "+c+" "+g(b)},p.should.have.properties(b)):4===arguments.length?(this.params={operator:"to have "+f+" "+g(b)},p.should.have.property(b)):(this.params={operator:"to have "+f+" "+g(b)+" with value "+g(d)},p.should.have.property(b,d))}var g=d.format,a=this.jQuery||this.$;"undefined"!==typeof HTMLElement&&HTMLElement&&!HTMLElement.prototype.inspect&&(HTMLElement.prototype.inspect=function(){return this.outerHTML});
"undefined"!==typeof jQuery&&jQuery&&!jQuery.prototype.inspect&&(jQuery.fn.inspect=function(){var a=this.toArray().map(function(a){return e.inspect(a)}).join(", ");return this.selector?"SELECTOR("+this.selector+") matching "+this.length+" elements"+(a.length?": "+a:""):a});var p=function(l){return a("<div/>").append(l).html()},f=function(l,f,b){c.add(f||l,function(){this.params={operator:"to be "+(b||l)};this.assert(a(this.obj).is(":"+l))},!0)};c.add("className",function(l){this.params={operator:"to have class "+
l};this.assert(a(this.obj).hasClass(l))});c.add("css",function(l){this.params={operator:"to have css "+g(l)};for(var f in l){var b=l[f];"auto"===b&&"auto"===a(this.obj).get(0).style[f]||a(this.obj).css(f).should.eql(b)}});f("visible");f("hidden");f("selected");f("checked");f("disabled");f("empty","emptyJq");f("focus","focused","focused");c.add("inDOM",function(){this.params={operator:"to be in the DOM"};this.assert(a.contains(document.documentElement,a(this.obj)[0]))},!0);c.add("exist",function(){this.params=
{operator:"to exist"};a(this.obj).should.not.have.length(0)},!0);c.add("attr",function(){var a=["attr","attribute","attributes"].concat(Array.prototype.slice.call(arguments,0));b.apply(this,a)});c.add("prop",function(){var a=["prop","property","properties"].concat(Array.prototype.slice.call(arguments,0));b.apply(this,a)});c.add("elementId",function(a){this.params={operator:"to have ID "+g(a)};this.obj.should.have.attr("id",a)});c.add("html",function(l){this.params={operator:"to have HTML "+g(l)};
a(this.obj).html().should.eql(p(l))});c.add("containHtml",function(l){this.params={operator:"to contain HTML "+g(l)};a(this.obj).html().indexOf(p(l)).should.be.above(-1)});c.add("text",function(l){this.params={operator:"to have text "+g(l)};var f=a.trim(a(this.obj).text());e.isRegExp(l)?f.should.match(l):f.should.eql(l)});c.add("containText",function(l){this.params={operator:"to contain text "+g(l)};var f=a.trim(a(this.obj).text());e.isRegExp(l)?f.should.match(l):f.indexOf(l).should.be.above(-1)});
c.add("value",function(l){this.params={operator:"to have value "+g(l)};a(this.obj).val().should.eql(l)});c.add("data",function(){var a=["data","data","data"].concat(Array.prototype.slice.call(arguments,0));b.apply(this,a)});c.add("containElement",function(f){this.params={operator:"to contain "+a(f).inspect()};a(this.obj).find(f).should.not.have.length(0)});c.add("matchedBy",function(f){this.params={operator:"to be matched by selector "+f};a(this.obj).filter(f).should.not.have.length(0)});c.add("handle",
function(f){this.params={operator:"to handle "+f};var b=a._data(a(this.obj).get(0),"events");if(!b||!f||"string"!==typeof f)return this.assert(!1);var c=f.split(".");f=c.shift();var g=c.slice(0).sort(),g=RegExp("(^|\\.)"+g.join("\\.(?:.*\\.)?")+"(\\.|$)");if(b[f]&&c.length){for(c=0;c<b[f].length;c++)if(g.test(b[f][c].namespace))return;this.assert(!1)}else b.should.have.property(f),b[f].should.not.have.length(0)});c.add("handleWith",function(f,b){this.params={operator:"to handle "+f+" with "+b};for(var c=
f.split(".")[0],c=a._data(a(this.obj).get(0),"events")[c],g=0;g<c.length;g++)if(c[g].handler==b)return;this.assert(!1)})}},{"../../util":16}],6:[function(h,k,d){k.exports=function(e,d){"an of a and be have with is which the".split(" ").forEach(function(c){Object.defineProperty(d.prototype,c,{get:function(){return this}})})}},{}],7:[function(h,k,d){var e=h("../util"),m=h("../eql");k.exports=function(c,b){var g=c.format;b.add("include",function(a,b){if(Array.isArray(this.obj)||e.isString(this.obj))this.params=
{operator:"to include "+g(a),message:b},this.assert(~this.obj.indexOf(a));else{this.params={operator:"to include an object equal to "+g(a),message:b};var f={},c;for(c in a)f[c]=this.obj[c];this.assert(m(f,a))}});b.add("includeEql",function(a,b){this.params={operator:"to include an object equal to "+g(a),message:b};this.assert(this.obj.some(function(f){return m(a,f)}))})}},{"../eql":2,"../util":16}],8:[function(h,k,d){var e=h("../eql");k.exports=function(d,c){c.add("eql",function(b,c){this.params=
{operator:"to equal",expected:b,showDiff:!0,message:c};this.assert(e(b,this.obj))});c.add("equal",function(b,c){this.params={operator:"to be",expected:b,showDiff:!0,message:c};this.assert(b===this.obj)});c.alias("equal","exactly")}},{"../eql":2}],9:[function(h,k,d){k.exports=function(e,d){var c=e.format;d.add("throw",function(b){var g=this.obj,a={},e="",f=!0;try{g(),f=!1}catch(l){a=l}f&&("string"==typeof b?f=b==a.message:b instanceof RegExp?f=b.test(a.message):"function"==typeof b&&(f=a instanceof
b),b&&!f?"string"==typeof b?e=" with a message matching '"+b+"', but got '"+a.message+"'":b instanceof RegExp?e=" with a message matching "+b+", but got '"+a.message+"'":"function"==typeof b&&(e=" of type "+b.name+", but got "+a.constructor.name):e=" (got "+c(a)+")");this.params={operator:"to throw exception"+e};this.assert(f)});d.alias("throw","throwError")}},{}],10:[function(h,k,d){var e=h("../util"),m=h("../eql");k.exports=function(c,b){var g=c.format;b.add("match",function(a,d){this.params={operator:"to match "+
g(a),message:d};if(!m(this.obj,a))if(e.isRegExp(a))if(e.isString(this.obj))this.assert(a.exec(this.obj));else if(Array.isArray(this.obj))this.obj.forEach(function(f){this.assert(a.exec(f))},this);else{if(e.isObject(this.obj)){var f=[],l=[];e.forOwn(this.obj,function(b,c){a.exec(b)?l.push(g(c)):f.push(g(c))},this);f.length&&(this.params.operator+="\n\tnot matched properties: "+f.join(", "));l.length&&(this.params.operator+="\n\tmatched properties: "+l.join(", "));this.assert(0==f.length)}}else if(e.isFunction(a)){var h;
try{h=a(this.obj)}catch(k){throw k instanceof c.AssertionError&&(this.params.operator+="\n\t"+k.message),k;}h instanceof b&&(this.params.operator+="\n\t"+h.getMessage());e.isBoolean(h)&&this.assert(h)}else e.isObject(a)?(f=[],l=[],e.forOwn(a,function(a,b){try{this.obj[b].should.match(a),l.push(b)}catch(g){if(g instanceof c.AssertionError)f.push(b);else throw g;}},this),f.length&&(this.params.operator+="\n\tnot matched properties: "+f.join(", ")),l.length&&(this.params.operator+="\n\tmatched properties: "+
l.join(", ")),this.assert(0==f.length)):this.assert(!1)});b.add("matchEach",function(a,b){this.params={operator:"to match each "+g(a),message:b};var f=a;e.isRegExp(a)?f=function(f){return!!a.exec(f)}:e.isFunction(a)||(f=function(f){return m(f,a)});e.forOwn(this.obj,function(a,b){var c=f(a,b);e.isBoolean(c)&&this.assert(c)},this)})}},{"../eql":2,"../util":16}],11:[function(h,k,d){k.exports=function(e,d){d.add("NaN",function(){this.params={operator:"to be NaN"};this.assert(this.obj!==this.obj)},!0);
d.add("Infinity",function(){this.params={operator:"to be Infinity"};this.is.a.Number.and.not.a.NaN.and.assert(!isFinite(this.obj))},!0);d.add("within",function(c,b,g){this.params={operator:"to be within "+c+".."+b,message:g};this.assert(this.obj>=c&&this.obj<=b)});d.add("approximately",function(c,b,g){this.params={operator:"to be approximately "+c+" \u00b1"+b,message:g};this.assert(Math.abs(this.obj-c)<=b)});d.add("above",function(c,b){this.params={operator:"to be above "+c,message:b};this.assert(this.obj>
c)});d.add("below",function(c,b){this.params={operator:"to be below "+c,message:b};this.assert(this.obj<c)});d.alias("above","greaterThan");d.alias("below","lessThan")}},{}],12:[function(h,k,d){var e=h("../util"),m=h("../eql"),c=Array.prototype.slice;k.exports=function(b,g){var a=b.format;g.add("enumerable",function(a,b){this.params={operator:"to have enumerable property '"+a+"'"};this.assert(this.obj.propertyIsEnumerable(a));1<arguments.length&&(this.params.operator+=" equal to '"+b+"'",this.assert(m(b,
this.obj[a])))});g.add("property",function(a,b){if(1<arguments.length){var c={};c[a]=b;this.have.properties(c)}else this.have.properties(a);this.obj=this.obj[a]});g.add("properties",function(f){var b={};1<arguments.length?f=c.call(arguments):Array.isArray(f)||(e.isString(f)?f=[f]:(b=f,f=Object.keys(f)));var g=Object(this.obj),d=[];f.forEach(function(f){f in g||d.push(a(f))});var h=d;0===h.length?h=f.map(a):this.one&&(h=f.filter(function(f){return 0>d.indexOf(a(f))}).map(a));var p=(1===h.length?"to have property ":
"to have "+(this.one?"any of ":"")+"properties ")+h.join(", ");this.params={operator:p};this.assert(0===d.length||this.one&&d.length!=f.length);var k=Object.keys(b);if(k.length){var r=[],h=[];k.forEach(function(f){var c=b[f];m(g[f],c)?h.push(a(f)+" of "+a(c)):r.push(a(f)+" of "+a(c)+" (got "+a(g[f])+")")});if(0!==r.length&&!this.one||this.one&&0===h.length)h=r;p=(1===h.length?"to have property ":"to have "+(this.one?"any of ":"")+"properties ")+h.join(", ");this.params={operator:p};this.assert(0===
r.length||this.one&&r.length!=k.length)}});g.add("length",function(a,b){this.have.property("length",a,b)});g.alias("length","lengthOf");var d=Object.prototype.hasOwnProperty;g.add("ownProperty",function(f,b){this.params={operator:"to have own property "+a(f),message:b};this.assert(d.call(this.obj,f));this.obj=this.obj[f]});g.alias("ownProperty","hasOwnProperty");g.add("empty",function(){this.params={operator:"to be empty"};if(e.isString(this.obj)||Array.isArray(this.obj)||e.isArguments(this.obj))this.have.property("length",
0);else{var a=Object(this.obj),b;for(b in a)this.have.not.ownProperty(b)}},!0);g.add("keys",function(b){1<arguments.length?b=c.call(arguments):1===arguments.length&&e.isString(b)?b=[b]:0===arguments.length&&(b=[]);var g=Object(this.obj),h=[];b.forEach(function(b){d.call(this.obj,b)||h.push(a(b))},this);var k=[];Object.keys(g).forEach(function(c){0>b.indexOf(c)&&k.push(a(c))});this.params={operator:(0===b.length?"to be empty":"to have "+(1===b.length?"key ":"keys "))+b.map(a).join(", ")};0<h.length&&
(this.params.operator+="\n\tmissing keys: "+h.join(", "));0<k.length&&(this.params.operator+="\n\textra keys: "+k.join(", "));this.assert(0===h.length&&0===k.length)});g.alias("keys","key");g.add("containEql",function(b){this.params={operator:"to contain "+a(b)};var c=this.obj;Array.isArray(c)?this.assert(c.some(function(a){return m(a,b)})):e.isString(c)?this.assert(0<=c.indexOf(String(b))):e.isObject(c)?e.forOwn(b,function(a,b){c.should.have.property(b,a)}):this.assert(!1)});g.add("containDeep",
function(c){this.params={operator:"to contain "+a(c)};var g=this.obj;if(Array.isArray(g))if(Array.isArray(c)){var d=0;g.forEach(function(a){try{b(a).not.be.Null.and.containDeep(c[d]),d++}catch(g){if(!(g instanceof b.AssertionError))throw g;}});this.assert(d==c.length)}else this.assert(!1);else e.isString(g)?this.assert(0<=g.indexOf(String(c))):e.isObject(g)?e.isObject(c)?e.forOwn(c,function(a,c){b(g[c]).not.be.Null.and.containDeep(a)}):this.assert(!1):this.eql(c)})}},{"../eql":2,"../util":16}],13:[function(h,
k,d){k.exports=function(d,h){h.add("startWith",function(c,b){this.params={operator:"to start with "+d.format(c),message:b};this.assert(0===this.obj.indexOf(c))});h.add("endWith",function(c,b){this.params={operator:"to end with "+d.format(c),message:b};this.assert(0<=this.obj.indexOf(c,this.obj.length-c.length))})}},{}],14:[function(h,k,d){var e=h("../util");k.exports=function(d,c){c.add("Number",function(){this.params={operator:"to be a number"};this.assert(e.isNumber(this.obj))},!0);c.add("arguments",
function(){this.params={operator:"to be arguments"};this.assert(e.isArguments(this.obj))},!0);c.add("type",function(b,c){this.params={operator:"to have type "+b,message:c};(typeof this.obj).should.be.exactly(b,c)});c.add("instanceof",function(b,c){this.params={operator:"to be an instance of "+b.name,message:c};this.assert(Object(this.obj)instanceof b)});c.add("Function",function(){this.params={operator:"to be a function"};this.assert(e.isFunction(this.obj))},!0);c.add("Object",function(){this.params=
{operator:"to be an object"};this.assert(e.isObject(this.obj))},!0);c.add("String",function(){this.params={operator:"to be a string"};this.assert(e.isString(this.obj))},!0);c.add("Array",function(){this.params={operator:"to be an array"};this.assert(Array.isArray(this.obj))},!0);c.add("Boolean",function(){this.params={operator:"to be a boolean"};this.assert(e.isBoolean(this.obj))},!0);c.add("Error",function(){this.params={operator:"to be an error"};this.assert(e.isError(this.obj))},!0);c.add("null",
function(){this.params={operator:"to be null"};this.assert(null===this.obj)},!0);c.alias("null","Null");c.alias("instanceof","instanceOf")}},{"../util":16}],15:[function(h,k,d){var e=h("./util"),m=e.AssertionError,c=e.inspect,b=function(a){return new g(e.isWrapperType(a)?a.valueOf():a)},g=b.Assertion=function(a){this.obj=a};g.add=function(a,c,d){var e={};e[d?"get":"value"]=function(){var a=new g(this.obj);a.copy=a.copyIfMissing;a.one=this.one;try{c.apply(a,arguments)}catch(d){this.copy(a);if(d instanceof
b.AssertionError){if(this.negate)return this.obj=a.obj,this.negate=!1,this;this.assert(!1)}throw d;}this.copy(a);this.negate&&this.assert(!1);this.obj=a.obj;this.negate=!1;return this};Object.defineProperty(g.prototype,a,e)};g.alias=function(a,b){var c=Object.getOwnPropertyDescriptor(g.prototype,a);if(!c)throw Error("Alias "+a+" -> "+b+" could not be created as "+a+" not defined");Object.defineProperty(g.prototype,b,c)};b.AssertionError=m;var a=b.format=function(a){return e.isDate(a)&&"function"!==
typeof a.inspect?a.toISOString():c(a,{depth:null})};b.use=function(a){a(this,g);return this};k.exports=b;Object.defineProperty(Object.prototype,"should",{set:function(){},get:function(){return b(this)},configurable:!0});g.prototype={constructor:g,assert:function(a){if(!a){a=this.params;var b=a.message,c=!1;b||(b=this.getMessage(),c=!0);b=new m({message:b,actual:this.obj,expected:a.expected,stackStartFunction:this.assert});b.showDiff=a.showDiff;b.operator=a.operator;b.generatedMessage=c;throw b;}},
getMessage:function(){return"expected "+("obj"in this.params?this.params.obj:a(this.obj))+(this.negate?" not ":" ")+this.params.operator+("expected"in this.params?" "+a(this.params.expected):"")},copy:function(a){this.params=a.params},copyIfMissing:function(a){this.params||(this.params=a.params)},get not(){this.negate=!this.negate;return this},get any(){this.one=!0;return this}}},{"./util":16}],16:[function(h,k,d){function e(a){return"number"===typeof a||a instanceof Number}function m(a){return"string"===
typeof a||a instanceof String}function c(a){return"boolean"===typeof a||a instanceof Boolean}function b(a){return"object"===typeof a&&null!==a}d.isWrapperType=function(a){return e(a)||m(a)||c(a)};d.merge=function(a,b){if(a&&b)for(var c in b)a[c]=b[c];return a};d.isNumber=e;d.isBoolean=c;d.isString=m;d.isBuffer=function(a){return"undefined"!==typeof Buffer&&a instanceof Buffer};d.isDate=function(a){return b(a)&&"[object Date]"===Object.prototype.toString.call(a)};d.isObject=b;d.isRegExp=function(a){return b(a)&&
"[object RegExp]"===Object.prototype.toString.call(a)};d.isNullOrUndefined=function(a){return null==a};d.isArguments=function(a){return"[object Arguments]"===Object.prototype.toString.call(a)};d.isFunction=function(a){return"function"===typeof a||a instanceof Function};d.isError=function(a){return b(a)&&"[object Error]"===Object.prototype.toString.call(a)||a instanceof Error};d.inspect=h("util").inspect;d.AssertionError=h("assert").AssertionError;var g=Object.prototype.hasOwnProperty;d.forOwn=function(a,
b,c){for(var d in a)g.call(a,d)&&b.call(c,a[d],d)}},{assert:17,util:20}],17:[function(h,k,d){function e(a,b){return q.isUndefined(b)?""+b:q.isNumber(b)&&(isNaN(b)||!isFinite(b))||q.isFunction(b)||q.isRegExp(b)?b.toString():b}function m(a,b){return q.isString(a)?a.length<b?a:a.slice(0,b):a}function c(a,b,c,g,d){throw new n.AssertionError({message:c,actual:a,expected:b,operator:g,stackStartFunction:d});}function b(a,b){a||c(a,!0,b,"==",n.ok)}function g(a,b){if(a===b)return!0;if(q.isBuffer(a)&&q.isBuffer(b)){if(a.length!=
b.length)return!1;for(var c=0;c<a.length;c++)if(a[c]!==b[c])return!1;return!0}return q.isDate(a)&&q.isDate(b)?a.getTime()===b.getTime():q.isRegExp(a)&&q.isRegExp(b)?a.source===b.source&&a.global===b.global&&a.multiline===b.multiline&&a.lastIndex===b.lastIndex&&a.ignoreCase===b.ignoreCase:q.isObject(a)||q.isObject(b)?p(a,b):a==b}function a(a){return"[object Arguments]"==Object.prototype.toString.call(a)}function p(b,c){if(q.isNullOrUndefined(b)||q.isNullOrUndefined(c)||b.prototype!==c.prototype)return!1;
if(a(b)){if(!a(c))return!1;b=s.call(b);c=s.call(c);return g(b,c)}try{var d=t(b),f=t(c),e}catch(h){return!1}if(d.length!=f.length)return!1;d.sort();f.sort();for(e=d.length-1;0<=e;e--)if(d[e]!=f[e])return!1;for(e=d.length-1;0<=e;e--)if(f=d[e],!g(b[f],c[f]))return!1;return!0}function f(a,b){return a&&b?"[object RegExp]"==Object.prototype.toString.call(b)?b.test(a):a instanceof b||!0===b.call({},a)?!0:!1:!1}function l(a,b,d,g){var e;q.isString(d)&&(g=d,d=null);try{b()}catch(h){e=h}g=(d&&d.name?" ("+d.name+
").":".")+(g?" "+g:".");a&&!e&&c(e,d,"Missing expected exception"+g);!a&&f(e,d)&&c(e,d,"Got unwanted exception"+g);if(a&&e&&d&&!f(e,d)||!a&&e)throw e;}var q=h("util/"),s=Array.prototype.slice,v=Object.prototype.hasOwnProperty,n=k.exports=b;n.AssertionError=function(a){this.name="AssertionError";this.actual=a.actual;this.expected=a.expected;this.operator=a.operator;a.message?(this.message=a.message,this.generatedMessage=!1):(this.message=m(JSON.stringify(this.actual,e),128)+" "+this.operator+" "+m(JSON.stringify(this.expected,
e),128),this.generatedMessage=!0);var b=a.stackStartFunction||c;Error.captureStackTrace?Error.captureStackTrace(this,b):(a=Error(),a.stack&&(a=a.stack,b=a.indexOf("\n"+b.name),0<=b&&(b=a.indexOf("\n",b+1),a=a.substring(b+1)),this.stack=a))};q.inherits(n.AssertionError,Error);n.fail=c;n.ok=b;n.equal=function(a,b,d){a!=b&&c(a,b,d,"==",n.equal)};n.notEqual=function(a,b,d){a==b&&c(a,b,d,"!=",n.notEqual)};n.deepEqual=function(a,b,d){g(a,b)||c(a,b,d,"deepEqual",n.deepEqual)};n.notDeepEqual=function(a,b,
d){g(a,b)&&c(a,b,d,"notDeepEqual",n.notDeepEqual)};n.strictEqual=function(a,b,d){a!==b&&c(a,b,d,"===",n.strictEqual)};n.notStrictEqual=function(a,b,d){a===b&&c(a,b,d,"!==",n.notStrictEqual)};n.throws=function(a,b,c){l.apply(this,[!0].concat(s.call(arguments)))};n.doesNotThrow=function(a,b){l.apply(this,[!1].concat(s.call(arguments)))};n.ifError=function(a){if(a)throw a;};var t=Object.keys||function(a){var b=[],c;for(c in a)v.call(a,c)&&b.push(c);return b}},{"util/":20}],18:[function(h,k,d){k.exports=
"function"===typeof Object.create?function(d,h){d.super_=h;d.prototype=Object.create(h.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}})}:function(d,h){d.super_=h;var c=function(){};c.prototype=h.prototype;d.prototype=new c;d.prototype.constructor=d}},{}],19:[function(h,k,d){k.exports=function(d){return d&&"object"===typeof d&&"function"===typeof d.copy&&"function"===typeof d.fill&&"function"===typeof d.readUInt8}},{}],20:[function(h,k,d){function e(a,b){var f={seen:[],
stylize:c};3<=arguments.length&&(f.depth=arguments[2]);4<=arguments.length&&(f.colors=arguments[3]);v(b)?f.showHidden=b:b&&d._extend(f,b);r(f.showHidden)&&(f.showHidden=!1);r(f.depth)&&(f.depth=2);r(f.colors)&&(f.colors=!1);r(f.customInspect)&&(f.customInspect=!0);f.colors&&(f.stylize=m);return g(f,a,f.depth)}function m(a,b){var c=e.styles[b];return c?"\u001b["+e.colors[c][0]+"m"+a+"\u001b["+e.colors[c][1]+"m":a}function c(a,b){return a}function b(a){var b={};a.forEach(function(a,c){b[a]=!0});return b}
function g(c,e,h){if(c.customInspect&&e&&y(e.inspect)&&e.inspect!==d.inspect&&(!e.constructor||e.constructor.prototype!==e)){var k=e.inspect(h,c);t(k)||(k=g(c,k,h));return k}if(k=a(c,e))return k;var m=Object.keys(e),n=b(m);c.showHidden&&(m=Object.getOwnPropertyNames(e));if(x(e)&&(0<=m.indexOf("message")||0<=m.indexOf("description")))return p(e);if(0===m.length){if(y(e))return c.stylize("[Function"+(e.name?": "+e.name:"")+"]","special");if(w(e))return c.stylize(RegExp.prototype.toString.call(e),"regexp");
if(D(e))return c.stylize(Date.prototype.toString.call(e),"date");if(x(e))return p(e)}var k="",z=!1,A=["{","}"];s(e)&&(z=!0,A=["[","]"]);y(e)&&(k=" [Function"+(e.name?": "+e.name:"")+"]");w(e)&&(k=" "+RegExp.prototype.toString.call(e));D(e)&&(k=" "+Date.prototype.toUTCString.call(e));x(e)&&(k=" "+p(e));if(0===m.length&&(!z||0==e.length))return A[0]+k+A[1];if(0>h)return w(e)?c.stylize(RegExp.prototype.toString.call(e),"regexp"):c.stylize("[Object]","special");c.seen.push(e);m=z?f(c,e,h,n,m):m.map(function(a){return l(c,
e,h,n,a,z)});c.seen.pop();return q(m,k,A)}function a(a,b){if(r(b))return a.stylize("undefined","undefined");if(t(b)){var c="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(c,"string")}if(n(b))return a.stylize(""+b,"number");if(v(b))return a.stylize(""+b,"boolean");if(null===b)return a.stylize("null","null")}function p(a){return"["+Error.prototype.toString.call(a)+"]"}function f(a,b,c,d,e){for(var f=[],g=0,h=b.length;g<h;++g)Object.prototype.hasOwnProperty.call(b,
String(g))?f.push(l(a,b,c,d,String(g),!0)):f.push("");e.forEach(function(e){e.match(/^\d+$/)||f.push(l(a,b,c,d,e,!0))});return f}function l(a,b,c,d,e,f){var h,k;b=Object.getOwnPropertyDescriptor(b,e)||{value:b[e]};b.get?k=b.set?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):b.set&&(k=a.stylize("[Setter]","special"));Object.prototype.hasOwnProperty.call(d,e)||(h="["+e+"]");k||(0>a.seen.indexOf(b.value)?(k=null===c?g(a,b.value,null):g(a,b.value,c-1),-1<k.indexOf("\n")&&(k=f?
k.split("\n").map(function(a){return" "+a}).join("\n").substr(2):"\n"+k.split("\n").map(function(a){return" "+a}).join("\n"))):k=a.stylize("[Circular]","special"));if(r(h)){if(f&&e.match(/^\d+$/))return k;h=JSON.stringify(""+e);h.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(h=h.substr(1,h.length-2),h=a.stylize(h,"name")):(h=h.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),h=a.stylize(h,"string"))}return h+": "+k}function q(a,b,c){var d=0;return 60<a.reduce(function(a,b){d++;0<=b.indexOf("\n")&&
d++;return a+b.replace(/\u001b\[\d\d?m/g,"").length+1},0)?c[0]+(""===b?"":b+"\n ")+" "+a.join(",\n ")+" "+c[1]:c[0]+b+" "+a.join(", ")+" "+c[1]}function s(a){return Array.isArray(a)}function v(a){return"boolean"===typeof a}function n(a){return"number"===typeof a}function t(a){return"string"===typeof a}function r(a){return void 0===a}function w(a){return u(a)&&"[object RegExp]"===Object.prototype.toString.call(a)}function u(a){return"object"===typeof a&&null!==a}function D(a){return u(a)&&"[object Date]"===
Object.prototype.toString.call(a)}function x(a){return u(a)&&("[object Error]"===Object.prototype.toString.call(a)||a instanceof Error)}function y(a){return"function"===typeof a}function E(a){return 10>a?"0"+a.toString(10):a.toString(10)}function G(){var a=new Date,b=[E(a.getHours()),E(a.getMinutes()),E(a.getSeconds())].join(":");return[a.getDate(),H[a.getMonth()],b].join(" ")}var I=/%[sdj%]/g;d.format=function(a){if(!t(a)){for(var b=[],c=0;c<arguments.length;c++)b.push(e(arguments[c]));return b.join(" ")}for(var c=
1,d=arguments,f=d.length,b=String(a).replace(I,function(a){if("%%"===a)return"%";if(c>=f)return a;switch(a){case "%s":return String(d[c++]);case "%d":return Number(d[c++]);case "%j":try{return JSON.stringify(d[c++])}catch(b){return"[Circular]"}default:return a}}),g=d[c];c<f;g=d[++c])b=null!==g&&u(g)?b+(" "+e(g)):b+(" "+g);return b};d.deprecate=function(a,b){if(r(global.process))return function(){return d.deprecate(a,b).apply(this,arguments)};if(!0===process.noDeprecation)return a;var c=!1;return function(){if(!c){if(process.throwDeprecation)throw Error(b);
process.traceDeprecation?console.trace(b):console.error(b);c=!0}return a.apply(this,arguments)}};var B={},F;d.debuglog=function(a){r(F)&&(F=process.env.NODE_DEBUG||"");a=a.toUpperCase();if(!B[a])if(RegExp("\\b"+a+"\\b","i").test(F)){var b=process.pid;B[a]=function(){var c=d.format.apply(d,arguments);console.error("%s %d: %s",a,b,c)}}else B[a]=function(){};return B[a]};d.inspect=e;e.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,
39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};e.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"};d.isArray=s;d.isBoolean=v;d.isNull=function(a){return null===a};d.isNullOrUndefined=function(a){return null==a};d.isNumber=n;d.isString=t;d.isSymbol=function(a){return"symbol"===typeof a};d.isUndefined=r;d.isRegExp=w;d.isObject=u;d.isDate=D;d.isError=x;d.isFunction=y;d.isPrimitive=function(a){return null===
a||"boolean"===typeof a||"number"===typeof a||"string"===typeof a||"symbol"===typeof a||"undefined"===typeof a};d.isBuffer=h("./support/isBuffer");var H="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ");d.log=function(){console.log("%s - %s",G(),d.format.apply(d,arguments))};d.inherits=h("inherits");d._extend=function(a,b){if(!b||!u(b))return a;for(var c=Object.keys(b),d=c.length;d--;)a[c[d]]=b[c[d]];return a}},{"./support/isBuffer":19,inherits:18}]},{},[1])(1)});

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

Sorry, the diff of this file is not supported yet

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