Comparing version 4.0.1 to 4.0.3
@@ -0,1 +1,7 @@ | ||
4.0.3 / 2014-06-09 | ||
================== | ||
* Fix wrong/strange behaviour of .containDeep with equal keys. Now it check to contain element once. | ||
* Added util.formatProp to format properties more accurate | ||
4.0.1 / 2014-06-04 | ||
@@ -2,0 +8,0 @@ ================== |
@@ -79,7 +79,10 @@ /*! | ||
if(util.isArray(other)) { | ||
var usedKeys = {}; | ||
other.forEach(function(otherItem) { | ||
this.assert(obj.some(function(item, index) { | ||
if(index in usedKeys) return false; | ||
other.forEach(function(otherItem) { | ||
this.assert(obj.some(function(item) { | ||
try { | ||
should(item).not.be.Null.and.containDeep(otherItem); | ||
usedKeys[index] = true; | ||
return true; | ||
@@ -86,0 +89,0 @@ } catch(e) { |
@@ -31,4 +31,4 @@ /*! | ||
util.forOwn(this.obj, function(value, name) { | ||
if(other.exec(value)) matchedProps.push(name); | ||
else notMatchedProps.push(name + '(' + i(value) +')'); | ||
if(other.exec(value)) matchedProps.push(util.formatProp(name)); | ||
else notMatchedProps.push(util.formatProp(name) + ' (' + i(value) +')'); | ||
}, this); | ||
@@ -68,6 +68,6 @@ | ||
should(this.obj[key]).match(value); | ||
matchedProps.push(key); | ||
matchedProps.push(util.formatProp(key)); | ||
} catch(e) { | ||
if(e instanceof should.AssertionError) { | ||
notMatchedProps.push(key + '(' + i(this.obj[key]) + ')'); | ||
notMatchedProps.push(util.formatProp(key) + ' (' + i(this.obj[key]) + ')'); | ||
} else { | ||
@@ -74,0 +74,0 @@ throw e; |
@@ -19,3 +19,3 @@ /*! | ||
this.params = { | ||
operator:"to have enumerable property '"+name+"'" | ||
operator:"to have enumerable property " + util.formatProp(name) | ||
}; | ||
@@ -26,3 +26,3 @@ | ||
if(arguments.length > 1){ | ||
this.params.operator += " equal to '"+val+"'"; | ||
this.params.operator += " equal to "+i(val); | ||
this.assert(eql(val, this.obj[name])); | ||
@@ -61,3 +61,3 @@ } | ||
names.forEach(function(name) { | ||
if(!(name in obj)) missingProperties.push(i(name)); | ||
if(!(name in obj)) missingProperties.push(util.formatProp(name)); | ||
}); | ||
@@ -67,7 +67,7 @@ | ||
if(props.length === 0) { | ||
props = names.map(i); | ||
props = names.map(util.formatProp); | ||
} else if(this.anyOne) { | ||
props = names.filter(function(name) { | ||
return missingProperties.indexOf(i(name)) < 0; | ||
}).map(i); | ||
return missingProperties.indexOf(util.formatProp(name)) < 0; | ||
}).map(util.formatProp); | ||
} | ||
@@ -94,5 +94,5 @@ | ||
if(!eql(obj[name], value)) { | ||
wrongValues.push(i(name) + ' of ' + i(value) + ' (got ' + i(obj[name]) + ')'); | ||
wrongValues.push(util.formatProp(name) + ' of ' + i(value) + ' (got ' + i(obj[name]) + ')'); | ||
} else { | ||
props.push(i(name) + ' of ' + i(value)); | ||
props.push(util.formatProp(name) + ' of ' + i(value)); | ||
} | ||
@@ -126,3 +126,3 @@ }); | ||
name = String(name); | ||
this.params = { operator: 'to have own property ' + i(name), message: description }; | ||
this.params = { operator: 'to have own property ' + util.formatProp(name), message: description }; | ||
@@ -162,3 +162,3 @@ this.assert(hasOwnProperty.call(this.obj, name)); | ||
if(!hasOwnProperty.call(this.obj, key)) | ||
missingKeys.push(i(key)); | ||
missingKeys.push(util.formatProp(key)); | ||
}, this); | ||
@@ -170,3 +170,3 @@ | ||
if(keys.indexOf(key) < 0) { | ||
extraKeys.push(i(key)); | ||
extraKeys.push(util.formatProp(key)); | ||
} | ||
@@ -178,3 +178,3 @@ }); | ||
this.params = { operator: verb + keys.map(i).join(', ')}; | ||
this.params = { operator: verb + keys.map(util.formatProp).join(', ')}; | ||
@@ -197,3 +197,3 @@ if(missingKeys.length > 0) | ||
var allProps = properties.map(i); | ||
var allProps = properties.map(util.formatProp); | ||
@@ -208,3 +208,3 @@ properties = properties.map(String); | ||
while(currentProperty = properties.shift()) { | ||
this.params = { operator: 'to have property by path ' + allProps + ' - failed on ' + i(currentProperty) }; | ||
this.params = { operator: 'to have property by path ' + allProps.join(', ') + ' - failed on ' + util.formatProp(currentProperty) }; | ||
obj = obj.have.property(currentProperty); | ||
@@ -214,3 +214,3 @@ foundProperties.push(currentProperty); | ||
this.params = { operator: 'to have property by path ' + allProps }; | ||
this.params = { operator: 'to have property by path ' + allProps.join(', ') }; | ||
@@ -217,0 +217,0 @@ this.obj = obj.obj; |
@@ -146,2 +146,15 @@ /*! | ||
return name; | ||
}; | ||
}; | ||
exports.formatProp = function(name) { | ||
name = JSON.stringify('' + name); | ||
if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { | ||
name = name.substr(1, name.length - 2); | ||
} else { | ||
name = name.replace(/'/g, "\\'") | ||
.replace(/\\"/g, '"') | ||
.replace(/(^"|"$)/g, "'") | ||
.replace(/\\\\/g, '\\'); | ||
} | ||
return name; | ||
} |
{ | ||
"name": "should", | ||
"description": "test framework agnostic BDD-style assertions", | ||
"version": "4.0.1", | ||
"version": "4.0.3", | ||
"author": "TJ Holowaychuk <tj@vision-media.ca> and contributors", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -7,5 +7,5 @@ # should.js | ||
_should_ is an expressive, readable, test framework agnostic, assertion library. Main goals of this library __to be expressive__ and __to be helpful__. It keeps your test code clean, and your error messages helpful. | ||
_should_ is an expressive, readable, framework-agnostic assertion library. The main goals of this library are __to be expressive__ and __to be helpful__. It keeps your test code clean, and your error messages helpful. | ||
It extends the `Object.prototype` with a single non-enumerable getter that allows you to express how that object should behave, also it returns itself when required with `require`. | ||
_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`. | ||
@@ -28,9 +28,10 @@ ### Breaking changes for 4.x | ||
// if the object was created with Object.create(null) | ||
// then it doesn't inherit `Object` and have the `should` getter | ||
// If the object was created with Object.create(null) | ||
// then it doesn't inherit `Object.prototype`, so it will not have `.should` getter | ||
// so you can do: | ||
should(user).have.property('name', 'tj'); | ||
should(true).ok; | ||
// also you can test in that way for null's | ||
should(null).not.be.ok; | ||
someAsyncTask(foo, function(err, result){ | ||
@@ -95,3 +96,3 @@ should.not.exist(err); | ||
For some rare cases should can be used statically, without `Object.prototype`. | ||
For some rare cases _should_ can be used statically, without `Object.prototype`. | ||
It can be a replacement for the node assert module: | ||
@@ -115,7 +116,7 @@ | ||
`.not` negate current assertion. | ||
`.not` negates the current assertion. | ||
## .any | ||
`.any` allow for assertions with multiple parameters to assert on any of parameters (not all) | ||
`.any` allow for assertions with multiple parameters to assert any of the parameters (but not all). This is similar to the native JavaScript [array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some). | ||
@@ -136,3 +137,3 @@ # Assertions | ||
Assert if chained object is truthy in javascript (ie: not '', null, undefined, 0 , NaN). | ||
Assert that a chained object is truthy in javascript (ie: not '', null, undefined, 0 , NaN). | ||
@@ -156,3 +157,3 @@ Assert truthfulness: | ||
*Warning:* No assertions can be done on null and undefined. | ||
*Warning:* No assertions can be performed on null and undefined values. | ||
e.g. | ||
@@ -171,3 +172,3 @@ ```js | ||
Assert if chained object === true: | ||
Assert if a chained object === true: | ||
@@ -181,3 +182,3 @@ ```javascript | ||
Assert if chained object === false: | ||
Assert if a chained object === false: | ||
@@ -191,3 +192,3 @@ ```javascript | ||
Assert if chained object is *equal* to otherValue. The object is compared by its actual content, not just reference equality. | ||
Assert if a chained object is *equal* to otherValue. The object is compared by its actual content, not just reference equality. | ||
@@ -202,3 +203,3 @@ ```javascript | ||
Assert if chained object is strictly equal to `otherValue` (using `===` - no type conversion for primitive types and reference equivalence for reference types). | ||
Asserts if a chained object is strictly equal to `otherValue` (using `===` - no type conversion for primitive types and reference equivalence for reference types). | ||
@@ -239,3 +240,3 @@ ```javascript | ||
Assert floating point number near `num` within `delta` margin: | ||
Assert a floating point number is near `num` within the `delta` margin: | ||
@@ -248,3 +249,3 @@ ```javascript | ||
Assert numeric value above the given value (`> num`): | ||
Assert a numeric value is above the given value (`> num`): | ||
@@ -260,3 +261,3 @@ ```javascript | ||
Assert numeric value below the given value (`< num`): | ||
Assert a numeric value is below the given value (`< num`): | ||
@@ -272,3 +273,3 @@ ```javascript | ||
Assert numeric value is NaN: | ||
Assert a numeric value is NaN: | ||
@@ -281,3 +282,3 @@ ```javascript | ||
Assert numeric value is Infinity: | ||
Assert a numeric value is Infinity: | ||
@@ -290,3 +291,3 @@ ```javascript | ||
Assert given object is of a particular type (using __typeof__ operator): | ||
Assert a given object is of a particular type (using __typeof__ operator): | ||
```javascript | ||
@@ -299,3 +300,3 @@ user.should.be.type('object'); | ||
Assert given object is an instance of `constructor` (using __instanceof__ operator): | ||
Assert a given object is an instance of `constructor` (using __instanceof__ operator): | ||
@@ -309,3 +310,3 @@ ```javascript | ||
Assert given object is an `Arguments`: | ||
Assert a given object is an `Arguments`: | ||
@@ -320,3 +321,3 @@ ```javascript | ||
Assert given object is instance of the given constructor (shortcut for `.instanceof` assertion). | ||
Assert a given object is instance of the given constructor (shortcut for `.instanceof` assertion). | ||
@@ -332,3 +333,3 @@ ```javascript | ||
Assert a property exists, is enumerable, and has optional value (compare using `.eql`): | ||
Assert a property exists, is enumerable, and has an optional value (compare using `.eql`): | ||
```javascript | ||
@@ -345,3 +346,3 @@ 'asd'.should.not.have.enumerable('0'); | ||
Assert property exists and has optional value (compare using `.eql`): | ||
Assert property exists and has an optional value (compare using `.eql`): | ||
```javascript | ||
@@ -348,0 +349,0 @@ user.should.have.property('name'); |
/** | ||
* should - test framework agnostic BDD-style assertions | ||
* @version v4.0.1 | ||
* @version v4.0.3 | ||
* @author TJ Holowaychuk <tj@vision-media.ca> and contributors | ||
@@ -8,2 +8,2 @@ * @link https://github.com/shouldjs/should.js | ||
*/ | ||
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Should=t()}}(function(){return function t(e,r,n){function i(s,a){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);throw new Error("Cannot find module '"+s+"'")}var c=r[s]={exports:{}};e[s][0].call(c.exports,function(t){var r=e[s][1][t];return i(r?r:t)},c,c.exports,t,e,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,e){function r(t,e){if(t===e)return!0;if(i.isBuffer(t)&&i.isBuffer(e)){if(t.length!=e.length)return!1;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}return i.isDate(t)&&i.isDate(e)?t.getTime()===e.getTime():i.isRegExp(t)&&i.isRegExp(e)?t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase:i.isObject(t)||i.isObject(e)?n(t,e):t==e}function n(t,e){if(i.isNullOrUndefined(t)||i.isNullOrUndefined(e))return!1;if(t.prototype!==e.prototype)return!1;if(i.isArguments(t))return i.isArguments(e)?(t=o.call(t),e=o.call(e),r(t,e)):!1;try{var n,s,a=Object.keys(t),u=Object.keys(e)}catch(c){return!1}if(a.length!=u.length)return!1;for(a.sort(),u.sort(),s=a.length-1;s>=0;s--)if(a[s]!=u[s])return!1;for(s=a.length-1;s>=0;s--)if(n=a[s],!r(t[n],e[n]))return!1;return!0}var i=t("./util");e.exports=r;var o=Array.prototype.slice},{"./util":15}],2:[function(t,e){var r=t("../util"),n=t("assert"),i=n.AssertionError;e.exports=function(t){var e=t.format;r.merge(t,n),t.exist=t.exists=function(r,n){if(null==r)throw new i({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 i({message:n||"expected "+e(r)+" to not exist",stackStartFunction:t.not.exist})}}},{"../util":15,assert:16}],3:[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)}},{}],4:[function(t,e){e.exports=function(t,e){function r(t){Object.defineProperty(e.prototype,t,{get:function(){return this}})}["an","of","a","and","be","have","with","is","which","the"].forEach(r)}},{}],5:[function(t,e){var r=t("../util"),n=t("../eql");e.exports=function(t,e){var i=t.format;e.add("containEql",function(t){this.params={operator:"to contain "+i(t)};var e=this.obj;r.isArray(e)?this.assert(e.some(function(e){return n(e,t)})):r.isString(e)?this.assert(e.indexOf(String(t))>=0):r.isObject(e)?r.forOwn(t,function(t,r){e.should.have.property(r,t)}):this.assert(!1)}),e.add("containDeepOrdered",function(e){this.params={operator:"to contain "+i(e)};var n=this.obj;if(r.isArray(n))if(r.isArray(e)){var o=0;n.forEach(function(r){try{t(r).not.be.Null.and.containDeep(e[o]),o++}catch(n){if(n instanceof t.AssertionError)return;throw n}},this),this.assert(o==e.length)}else this.assert(!1);else r.isString(n)?this.assert(n.indexOf(String(e))>=0):r.isObject(n)?r.isObject(e)?r.forOwn(e,function(e,r){t(n[r]).not.be.Null.and.containDeep(e)}):this.assert(!1):this.eql(e)}),e.add("containDeep",function(e){this.params={operator:"to contain "+i(e)};var n=this.obj;r.isArray(n)?r.isArray(e)?e.forEach(function(e){this.assert(n.some(function(r){try{return t(r).not.be.Null.and.containDeep(e),!0}catch(n){if(n instanceof t.AssertionError)return!1;throw n}}))},this):this.assert(!1):r.isString(n)?this.assert(n.indexOf(String(e))>=0):r.isObject(n)?r.isObject(e)?r.forOwn(e,function(e,r){t(n[r]).not.be.Null.and.containDeep(e)}):this.assert(!1):this.eql(e)})}},{"../eql":1,"../util":15}],6:[function(t,e){var r=t("../eql");e.exports=function(t,e){e.add("eql",function(t,e){this.params={operator:"to equal",expected:t,showDiff:!0,message:e},this.assert(r(t,this.obj))}),e.add("equal",function(t,e){this.params={operator:"to be",expected:t,showDiff:!0,message:e},this.assert(t===this.obj)}),e.alias("equal","exactly")}},{"../eql":1}],7:[function(t,e){var r=t("../util");e.exports=function(t,e){var n=t.format;e.add("throw",function(e,i){var o=this.obj,s={},a="",u=!1,c=!0;try{o()}catch(f){u=!0,s=f}if(u)if(e){if("string"==typeof e)c=e==s.message;else if(e instanceof RegExp)c=e.test(s.message);else if("function"==typeof e)c=s instanceof e;else if(r.isObject(e))try{s.should.match(e)}catch(f){if(!(f instanceof t.AssertionError))throw f;a=": "+f.message,c=!1}if(c){if("function"==typeof e&&i)try{s.should.match(i)}catch(f){if(!(f instanceof t.AssertionError))throw f;a=": "+f.message,c=!1}}else"string"==typeof e||e instanceof RegExp?a=" with a message matching "+n(e)+", but got '"+s.message+"'":"function"==typeof e&&(a=" of type "+r.functionName(e)+", but got "+r.functionName(s.constructor))}else a=" (got "+n(s)+")";this.params={operator:"to throw exception"+a},this.assert(u),this.assert(c)}),e.alias("throw","throwError")}},{"../util":15}],8:[function(t,e){var r=t("../util"),n=t("../eql");e.exports=function(t,e){var i=t.format;e.add("match",function(o,s){if(this.params={operator:"to match "+i(o),message:s},!n(this.obj,o))if(r.isRegExp(o)){if(r.isString(this.obj))this.assert(o.exec(this.obj));else if(r.isArray(this.obj))this.obj.forEach(function(t){this.assert(o.exec(t))},this);else if(r.isObject(this.obj)){var a=[],u=[];r.forOwn(this.obj,function(t,e){o.exec(t)?u.push(e):a.push(e+"("+i(t)+")")},this),a.length&&(this.params.operator+="\n not matched properties: "+a.join(", ")),u.length&&(this.params.operator+="\n matched properties: "+u.join(", ")),this.assert(0==a.length)}}else if(r.isFunction(o)){var c;try{c=o(this.obj)}catch(f){throw f instanceof t.AssertionError&&(this.params.operator+="\n "+f.message),f}c instanceof e&&(this.params.operator+="\n "+c.getMessage()),r.isBoolean(c)&&this.assert(c)}else r.isObject(o)?(a=[],u=[],r.forOwn(o,function(e,r){try{t(this.obj[r]).match(e),u.push(r)}catch(n){if(!(n instanceof t.AssertionError))throw n;a.push(r+"("+i(this.obj[r])+")")}},this),a.length&&(this.params.operator+="\n not matched properties: "+a.join(", ")),u.length&&(this.params.operator+="\n matched properties: "+u.join(", ")),this.assert(0==a.length)):this.assert(!1)}),e.add("matchEach",function(t,e){this.params={operator:"to match each "+i(t),message:e};var o=t;r.isRegExp(t)?o=function(e){return!!t.exec(e)}:r.isFunction(t)||(o=function(e){return n(e,t)}),r.forOwn(this.obj,function(t,e){var n=o(t,e);r.isBoolean(n)&&this.assert(n)},this)})}},{"../eql":1,"../util":15}],9:[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")}},{}],10:[function(t,e){var r=t("../util"),n=t("../eql"),i=Array.prototype.slice;e.exports=function(t,e){var o=t.format;e.add("enumerable",function(t,e){t=String(t),this.params={operator:"to have enumerable property '"+t+"'"},this.assert(this.obj.propertyIsEnumerable(t)),arguments.length>1&&(this.params.operator+=" equal to '"+e+"'",this.assert(n(e,this.obj[t])))}),e.add("property",function(t,e){if(t=String(t),arguments.length>1){var r={};r[t]=e,this.have.properties(r)}else this.have.properties(t);this.obj=this.obj[t]}),e.add("properties",function(t){var e={};arguments.length>1?t=i.call(arguments):r.isArray(t)||(r.isString(t)?t=[t]:(e=t,t=Object.keys(t)));var s=Object(this.obj),a=[];t.forEach(function(t){t in s||a.push(o(t))});var u=a;0===u.length?u=t.map(o):this.anyOne&&(u=t.filter(function(t){return a.indexOf(o(t))<0}).map(o));var c=(1===u.length?"to have property ":"to have "+(this.anyOne?"any of ":"")+"properties ")+u.join(", ");this.params={operator:c},this.assert(0===a.length||this.anyOne&&a.length!=t.length);var f=Object.keys(e);if(f.length){var l=[];u=[],f.forEach(function(t){var r=e[t];n(s[t],r)?u.push(o(t)+" of "+o(r)):l.push(o(t)+" of "+o(r)+" (got "+o(s[t])+")")}),(0!==l.length&&!this.anyOne||this.anyOne&&0===u.length)&&(u=l),c=(1===u.length?"to have property ":"to have "+(this.anyOne?"any of ":"")+"properties ")+u.join(", "),this.params={operator:c},this.assert(0===l.length||this.anyOne&&l.length!=f.length)}}),e.add("length",function(t,e){this.have.property("length",t,e)}),e.alias("length","lengthOf");var s=Object.prototype.hasOwnProperty;e.add("ownProperty",function(t,e){t=String(t),this.params={operator:"to have own property "+o(t),message:e},this.assert(s.call(this.obj,t)),this.obj=this.obj[t]}),e.alias("ownProperty","hasOwnProperty"),e.add("empty",function(){if(this.params={operator:"to be empty"},r.isString(this.obj)||r.isArray(this.obj)||r.isArguments(this.obj))this.have.property("length",0);else{var t=Object(this.obj);for(var e in t)this.have.not.ownProperty(e)}},!0),e.add("keys",function(t){arguments.length>1?t=i.call(arguments):1===arguments.length&&r.isString(t)?t=[t]:0===arguments.length&&(t=[]),t=t.map(String);var e=Object(this.obj),n=[];t.forEach(function(t){s.call(this.obj,t)||n.push(o(t))},this);var a=[];Object.keys(e).forEach(function(e){t.indexOf(e)<0&&a.push(o(e))});var u=0===t.length?"to be empty":"to have "+(1===t.length?"key ":"keys ");this.params={operator:u+t.map(o).join(", ")},n.length>0&&(this.params.operator+="\n missing keys: "+n.join(", ")),a.length>0&&(this.params.operator+="\n extra keys: "+a.join(", ")),this.assert(0===n.length&&0===a.length)}),e.alias("keys","key"),e.add("propertyByPath",function(e){arguments.length>1?e=i.call(arguments):1===arguments.length&&r.isString(e)?e=[e]:0===arguments.length&&(e=[]);var n=e.map(o);e=e.map(String);for(var s,a=t(Object(this.obj)),u=[];s=e.shift();)this.params={operator:"to have property by path "+n+" - failed on "+o(s)},a=a.have.property(s),u.push(s);this.params={operator:"to have property by path "+n},this.obj=a.obj})}},{"../eql":1,"../util":15}],11:[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)})}},{}],12:[function(t,e){var r=t("../util");e.exports=function(t,e){e.add("Number",function(){this.params={operator:"to be a number"},this.assert(r.isNumber(this.obj))},!0),e.add("arguments",function(){this.params={operator:"to be arguments"},this.assert(r.isArguments(this.obj))},!0),e.add("type",function(t,e){this.params={operator:"to have type "+t,message:e},(typeof this.obj).should.be.exactly(t,e)}),e.add("instanceof",function(t,e){this.params={operator:"to be an instance of "+r.functionName(t),message:e},this.assert(Object(this.obj)instanceof t)}),e.add("Function",function(){this.params={operator:"to be a function"},this.assert(r.isFunction(this.obj))},!0),e.add("Object",function(){this.params={operator:"to be an object"},this.assert(r.isObject(this.obj))},!0),e.add("String",function(){this.params={operator:"to be a string"},this.assert(r.isString(this.obj))},!0),e.add("Array",function(){this.params={operator:"to be an array"},this.assert(r.isArray(this.obj))},!0),e.add("Boolean",function(){this.params={operator:"to be a boolean"},this.assert(r.isBoolean(this.obj))},!0),e.add("Error",function(){this.params={operator:"to be an error"},this.assert(r.isError(this.obj))},!0),e.add("null",function(){this.params={operator:"to be null"},this.assert(null===this.obj)},!0),e.alias("null","Null"),e.alias("instanceof","instanceOf")}},{"../util":15}],13:[function(t,e,r){function n(t,e){var n={seen:[],stylize:o};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(e)?n.showHidden=e:e&&r._extend(n,e),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=i),a(n,t,n.depth)}function i(t,e){var r=n.styles[e];return r?"["+n.colors[r][0]+"m"+t+"["+n.colors[r][1]+"m":t}function o(t){return t}function s(t){var e={};return t.forEach(function(t){e[t]=!0}),e}function a(t,e,n){if(t.customInspect&&e&&j(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return v(i)||(i=a(t,i,n)),i}var o=u(t,e);if(o)return o;var g=Object.keys(e),y=s(g);t.showHidden&&(g=Object.getOwnPropertyNames(e));var m,b=e;try{E(e)||(b=e.valueOf())}catch(O){}if(v(b)&&(g=g.filter(function(t){return!(t>=0&&t<b.length)})),S(e))return f(e);if(0===g.length){if(j(e)){var N=e.name?": "+e.name:"";return t.stylize("[Function"+N+"]","special")}if(w(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(E(e))return t.stylize(Date.prototype.toString.call(e),"date");if(v(b))return m=c(t,b),t.stylize("[String: "+m+"]","string");if(x(b))return m=c(t,b),t.stylize("[Number: "+m+"]","number");if(d(b))return m=c(t,b),t.stylize("[Boolean: "+m+"]","boolean")}var z="",D=!1,q=["{","}"];if(A(e)&&(D=!0,q=["[","]"]),j(e)){var k=e.name?": "+e.name:"";z=" [Function"+k+"]"}if(w(e)&&(z=" "+RegExp.prototype.toString.call(e)),E(e)&&(z=" "+Date.prototype.toUTCString.call(e)),S(e)&&(z=" "+f(e)),v(b)&&(m=c(t,b),z=" [String: "+m+"]"),x(b)&&(m=c(t,b),z=" [Number: "+m+"]"),d(b)&&(m=c(t,b),z=" [Boolean: "+m+"]"),0===g.length&&(!D||0===e.length))return q[0]+z+q[1];if(0>n)return w(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var B;return B=D?l(t,e,n,y,g):g.map(function(r){return p(t,e,n,y,r,D)}),t.seen.pop(),h(B,z,q)}function u(t,e){if(b(e))return t.stylize("undefined","undefined");if(v(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return x(e)?0===e&&0>1/e?t.stylize("-0","number"):t.stylize(""+e,"number"):d(e)?t.stylize(""+e,"boolean"):O(e)?t.stylize("null","null"):void 0}function c(t,e){var r=t.stylize;t.stylize=o;var n=u(t,e);return t.stylize=r,n}function f(t){return"["+Error.prototype.toString.call(t)+"]"}function l(t,e,r,n,i){for(var o=[],s=0,a=e.length;a>s;++s)o.push(g(e,String(s))?p(t,e,r,n,String(s),!0):"");return i.forEach(function(i){i.match(/^\d+$/)||o.push(p(t,e,r,n,i,!0))}),o}function p(t,e,r,n,i,o){var s,u,c;if(c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},c.get?u=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(u=t.stylize("[Setter]","special")),g(n,i)||(s="["+i+"]"),u||(t.seen.indexOf(c.value)<0?(u=O(r)?a(t,c.value,null):a(t,c.value,r-1),u.indexOf("\n")>-1&&(u=o?u.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+u.split("\n").map(function(t){return" "+t}).join("\n"))):u=t.stylize("[Circular]","special")),b(s)){if(o&&i.match(/^\d+$/))return u;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'").replace(/\\\\/g,"\\"),s=t.stylize(s,"string"))}return s+": "+u}function h(t,e,r){var n=t.reduce(function(t,e){return t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function g(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var y=t("./util"),d=y.isBoolean,m=y.isObject,b=y.isUndefined,j=y.isFunction,v=y.isString,x=y.isNumber,O=y.isNull,w=y.isRegExp,E=y.isDate,S=y.isError,A=y.isArray;r.inspect=n,n.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]},n.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},r._extend=function(t,e){if(!e||!m(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}},{"./util":15}],14:[function(t,e,r){var n=t("./util"),i=n.AssertionError,o=n.inspect,s=function(t){return new a(n.isWrapperType(t)?t.valueOf():t)},a=s.Assertion=function(t){this.obj=t};a.add=function(t,e,r){var n={};n[r?"get":"value"]=function(){var t=new a(this.obj);t.copy=t.copyIfMissing,t.anyOne=this.anyOne;try{e.apply(t,arguments)}catch(r){if(this.copy(t),r instanceof s.AssertionError){if(this.negate)return this.obj=t.obj,this.negate=!1,this;this.assert(!1)}throw r}return this.copy(t),this.negate&&this.assert(!1),this.obj=t.obj,this.negate=!1,this},Object.defineProperty(a.prototype,t,n)},a.alias=function(t,e){var r=Object.getOwnPropertyDescriptor(a.prototype,t);if(!r)throw new Error("Alias "+t+" -> "+e+" could not be created as "+t+" not defined");Object.defineProperty(a.prototype,e,r)},s.AssertionError=i,s.format=function(t){return n.isDate(t)&&"function"!=typeof t.inspect?t.toISOString():o(t,{depth:null})},s.use=function(t){return t(this,a),this},r=e.exports=s,Object.defineProperty(Object.prototype,"should",{set:function(){},get:function(){return s(this)},configurable:!0}),a.prototype={constructor:a,assert:function(t){if(!t){var e=this.params,r=e.message,n=!1;r||(r=this.getMessage(),n=!0);var o=new i({message:r,actual:this.obj,expected:e.expected,stackStartFunction:this.assert});throw o.showDiff=e.showDiff,o.operator=e.operator,o.generatedMessage=n,o}},getMessage:function(){return"expected "+("obj"in this.params?this.params.obj:s.format(this.obj))+(this.negate?" not ":" ")+this.params.operator+("expected"in this.params?" "+s.format(this.params.expected):"")},copy:function(t){this.params=t.params},copyIfMissing:function(t){this.params||(this.params=t.params)},get not(){return this.negate=!this.negate,this},get any(){return this.anyOne=!0,this}},s.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"))},{"./ext/assert":2,"./ext/bool":3,"./ext/chain":4,"./ext/contain":5,"./ext/eql":6,"./ext/error":7,"./ext/match":8,"./ext/number":9,"./ext/property":10,"./ext/string":11,"./ext/type":12,"./util":15}],15:[function(t,e,r){function n(t){return f(t)&&(t.__ArrayLike||Array.isArray(t))}function i(t){return"number"==typeof t||t instanceof Number}function o(t){return"string"==typeof t||t instanceof String}function s(t){return"boolean"==typeof t||t instanceof Boolean}function a(t){return"undefined"!=typeof Buffer&&t instanceof Buffer}function u(t){return f(t)&&"[object Date]"===c(t)}function c(t){return Object.prototype.toString.call(t)}function f(t){return"object"==typeof t&&null!==t}function l(t){return f(t)&&"[object RegExp]"===c(t)}function p(t){return null==t}function h(t){return null===t}function g(t){return"[object Arguments]"===c(t)}function y(t){return f(t)&&"[object Error]"===c(t)||t instanceof Error}function d(t){return void 0===t}r.isWrapperType=function(t){return i(t)||o(t)||s(t)},r.merge=function(t,e){if(t&&e)for(var r in e)t[r]=e[r];return t},r.isArray=n,r.isNumber=i,r.isBoolean=s,r.isString=o,r.isBuffer=a,r.isDate=u,r.isObject=f,r.isRegExp=l,r.isNullOrUndefined=p,r.isNull=h,r.isArguments=g,r.isFunction=function(t){return"function"==typeof t||t instanceof Function},r.isError=y,r.isUndefined=d,r.inspect=t("./inspect").inspect,r.AssertionError=t("assert").AssertionError;var m=Object.prototype.hasOwnProperty;r.forOwn=function(t,e,r){for(var n in t)m.call(t,n)&&e.call(r,t[n],n)};var b=/^\s*function\s*(\S*)\s*\(/;r.functionName=function(t){if(t.name)return t.name;var e=t.toString().match(b)[1];return e}},{"./inspect":13,assert:16}],16:[function(t,e){function r(t,e){return p.isUndefined(e)?""+e:!p.isNumber(e)||!isNaN(e)&&isFinite(e)?p.isFunction(e)||p.isRegExp(e)?e.toString():e:e.toString()}function n(t,e){return p.isString(t)?t.length<e?t:t.slice(0,e):t}function i(t){return n(JSON.stringify(t.actual,r),128)+" "+t.operator+" "+n(JSON.stringify(t.expected,r),128)}function o(t,e,r,n,i){throw new y.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function s(t,e){t||o(t,!0,e,"==",y.ok)}function a(t,e){if(t===e)return!0;if(p.isBuffer(t)&&p.isBuffer(e)){if(t.length!=e.length)return!1;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}return p.isDate(t)&&p.isDate(e)?t.getTime()===e.getTime():p.isRegExp(t)&&p.isRegExp(e)?t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase:p.isObject(t)||p.isObject(e)?c(t,e):t==e}function u(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function c(t,e){if(p.isNullOrUndefined(t)||p.isNullOrUndefined(e))return!1;if(t.prototype!==e.prototype)return!1;if(u(t))return u(e)?(t=h.call(t),e=h.call(e),a(t,e)):!1;try{var r,n,i=d(t),o=d(e)}catch(s){return!1}if(i.length!=o.length)return!1;for(i.sort(),o.sort(),n=i.length-1;n>=0;n--)if(i[n]!=o[n])return!1;for(n=i.length-1;n>=0;n--)if(r=i[n],!a(t[r],e[r]))return!1;return!0}function f(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 l(t,e,r,n){var i;p.isString(r)&&(n=r,r=null);try{e()}catch(s){i=s}if(n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&o(i,r,"Missing expected exception"+n),!t&&f(i,r)&&o(i,r,"Got unwanted exception"+n),t&&i&&r&&!f(i,r)||!t&&i)throw i}var p=t("util/"),h=Array.prototype.slice,g=Object.prototype.hasOwnProperty,y=e.exports=s;y.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=i(this),this.generatedMessage=!0);var e=t.stackStartFunction||o;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,s=e.name,a=n.indexOf("\n"+s);if(a>=0){var u=n.indexOf("\n",a+1);n=n.substring(u+1)}this.stack=n}}},p.inherits(y.AssertionError,Error),y.fail=o,y.ok=s,y.equal=function(t,e,r){t!=e&&o(t,e,r,"==",y.equal)},y.notEqual=function(t,e,r){t==e&&o(t,e,r,"!=",y.notEqual)},y.deepEqual=function(t,e,r){a(t,e)||o(t,e,r,"deepEqual",y.deepEqual)},y.notDeepEqual=function(t,e,r){a(t,e)&&o(t,e,r,"notDeepEqual",y.notDeepEqual)},y.strictEqual=function(t,e,r){t!==e&&o(t,e,r,"===",y.strictEqual)},y.notStrictEqual=function(t,e,r){t===e&&o(t,e,r,"!==",y.notStrictEqual)},y.throws=function(){l.apply(this,[!0].concat(h.call(arguments)))},y.doesNotThrow=function(){l.apply(this,[!1].concat(h.call(arguments)))},y.ifError=function(t){if(t)throw t};var d=Object.keys||function(t){var e=[];for(var r in t)g.call(t,r)&&e.push(r);return e}},{"util/":18}],17:[function(t,e){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],18:[function(t,e,r){function n(t,e){var n={seen:[],stylize:o};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(e)?n.showHidden=e:e&&r._extend(n,e),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=i),a(n,t,n.depth)}function i(t,e){var r=n.styles[e];return r?"["+n.colors[r][0]+"m"+t+"["+n.colors[r][1]+"m":t}function o(t){return t}function s(t){var e={};return t.forEach(function(t){e[t]=!0}),e}function a(t,e,n){if(t.customInspect&&e&&S(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return b(i)||(i=a(t,i,n)),i}var o=u(t,e);if(o)return o;var g=Object.keys(e),y=s(g);if(t.showHidden&&(g=Object.getOwnPropertyNames(e)),E(e)&&(g.indexOf("message")>=0||g.indexOf("description")>=0))return c(e);if(0===g.length){if(S(e)){var d=e.name?": "+e.name:"";return t.stylize("[Function"+d+"]","special")}if(x(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(w(e))return t.stylize(Date.prototype.toString.call(e),"date");if(E(e))return c(e)}var m="",j=!1,v=["{","}"];if(h(e)&&(j=!0,v=["[","]"]),S(e)){var O=e.name?": "+e.name:"";m=" [Function"+O+"]"}if(x(e)&&(m=" "+RegExp.prototype.toString.call(e)),w(e)&&(m=" "+Date.prototype.toUTCString.call(e)),E(e)&&(m=" "+c(e)),0===g.length&&(!j||0==e.length))return v[0]+m+v[1];if(0>n)return x(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var A;return A=j?f(t,e,n,y,g):g.map(function(r){return l(t,e,n,y,r,j)}),t.seen.pop(),p(A,m,v)}function u(t,e){if(v(e))return t.stylize("undefined","undefined");if(b(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return m(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):y(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,r,n,i){for(var o=[],s=0,a=e.length;a>s;++s)o.push(q(e,String(s))?l(t,e,r,n,String(s),!0):"");return i.forEach(function(i){i.match(/^\d+$/)||o.push(l(t,e,r,n,i,!0))}),o}function l(t,e,r,n,i,o){var s,u,c;if(c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},c.get?u=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(u=t.stylize("[Setter]","special")),q(n,i)||(s="["+i+"]"),u||(t.seen.indexOf(c.value)<0?(u=y(r)?a(t,c.value,null):a(t,c.value,r-1),u.indexOf("\n")>-1&&(u=o?u.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+u.split("\n").map(function(t){return" "+t}).join("\n"))):u=t.stylize("[Circular]","special")),v(s)){if(o&&i.match(/^\d+$/))return u;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+u}function p(t,e,r){var n=0,i=t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function h(t){return Array.isArray(t)}function g(t){return"boolean"==typeof t}function y(t){return null===t}function d(t){return null==t}function m(t){return"number"==typeof t}function b(t){return"string"==typeof t}function j(t){return"symbol"==typeof t}function v(t){return void 0===t}function x(t){return O(t)&&"[object RegExp]"===N(t)}function O(t){return"object"==typeof t&&null!==t}function w(t){return O(t)&&"[object Date]"===N(t)}function E(t){return O(t)&&("[object Error]"===N(t)||t instanceof Error)}function S(t){return"function"==typeof t}function A(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function N(t){return Object.prototype.toString.call(t)}function z(t){return 10>t?"0"+t.toString(10):t.toString(10)}function D(){var t=new Date,e=[z(t.getHours()),z(t.getMinutes()),z(t.getSeconds())].join(":");return[t.getDate(),R[t.getMonth()],e].join(" ")}function q(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var k=/%[sdj%]/g;r.format=function(t){if(!b(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(n(arguments[r]));return e.join(" ")}for(var r=1,i=arguments,o=i.length,s=String(t).replace(k,function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(e){return"[Circular]"}default:return t}}),a=i[r];o>r;a=i[++r])s+=y(a)||!O(a)?" "+a:" "+n(a);return s},r.deprecate=function(t,e){function n(){if(!i){if(process.throwDeprecation)throw new Error(e);process.traceDeprecation?console.trace(e):console.error(e),i=!0}return t.apply(this,arguments)}if(v(global.process))return function(){return r.deprecate(t,e).apply(this,arguments)};if(process.noDeprecation===!0)return t;var i=!1;return n};var B,F={};r.debuglog=function(t){if(v(B)&&(B=process.env.NODE_DEBUG||""),t=t.toUpperCase(),!F[t])if(new RegExp("\\b"+t+"\\b","i").test(B)){var e=process.pid;F[t]=function(){var n=r.format.apply(r,arguments);console.error("%s %d: %s",t,e,n)}}else F[t]=function(){};return F[t]},r.inspect=n,n.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]},n.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=h,r.isBoolean=g,r.isNull=y,r.isNullOrUndefined=d,r.isNumber=m,r.isString=b,r.isSymbol=j,r.isUndefined=v,r.isRegExp=x,r.isObject=O,r.isDate=w,r.isError=E,r.isFunction=S,r.isPrimitive=A,r.isBuffer=t("./support/isBuffer");var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",D(),r.format.apply(r,arguments))},r.inherits=t("inherits"),r._extend=function(t,e){if(!e||!O(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}},{"./support/isBuffer":17,inherits:19}],19:[function(t,e){e.exports="function"==typeof Object.create?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}]},{},[14])(14)}); | ||
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Should=t()}}(function(){return function t(e,r,n){function i(s,a){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);throw new Error("Cannot find module '"+s+"'")}var c=r[s]={exports:{}};e[s][0].call(c.exports,function(t){var r=e[s][1][t];return i(r?r:t)},c,c.exports,t,e,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,e){function r(t,e){if(t===e)return!0;if(i.isBuffer(t)&&i.isBuffer(e)){if(t.length!=e.length)return!1;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}return i.isDate(t)&&i.isDate(e)?t.getTime()===e.getTime():i.isRegExp(t)&&i.isRegExp(e)?t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase:i.isObject(t)||i.isObject(e)?n(t,e):t==e}function n(t,e){if(i.isNullOrUndefined(t)||i.isNullOrUndefined(e))return!1;if(t.prototype!==e.prototype)return!1;if(i.isArguments(t))return i.isArguments(e)?(t=o.call(t),e=o.call(e),r(t,e)):!1;try{var n,s,a=Object.keys(t),u=Object.keys(e)}catch(c){return!1}if(a.length!=u.length)return!1;for(a.sort(),u.sort(),s=a.length-1;s>=0;s--)if(a[s]!=u[s])return!1;for(s=a.length-1;s>=0;s--)if(n=a[s],!r(t[n],e[n]))return!1;return!0}var i=t("./util");e.exports=r;var o=Array.prototype.slice},{"./util":15}],2:[function(t,e){var r=t("../util"),n=t("assert"),i=n.AssertionError;e.exports=function(t){var e=t.format;r.merge(t,n),t.exist=t.exists=function(r,n){if(null==r)throw new i({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 i({message:n||"expected "+e(r)+" to not exist",stackStartFunction:t.not.exist})}}},{"../util":15,assert:16}],3:[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)}},{}],4:[function(t,e){e.exports=function(t,e){function r(t){Object.defineProperty(e.prototype,t,{get:function(){return this}})}["an","of","a","and","be","have","with","is","which","the"].forEach(r)}},{}],5:[function(t,e){var r=t("../util"),n=t("../eql");e.exports=function(t,e){var i=t.format;e.add("containEql",function(t){this.params={operator:"to contain "+i(t)};var e=this.obj;r.isArray(e)?this.assert(e.some(function(e){return n(e,t)})):r.isString(e)?this.assert(e.indexOf(String(t))>=0):r.isObject(e)?r.forOwn(t,function(t,r){e.should.have.property(r,t)}):this.assert(!1)}),e.add("containDeepOrdered",function(e){this.params={operator:"to contain "+i(e)};var n=this.obj;if(r.isArray(n))if(r.isArray(e)){var o=0;n.forEach(function(r){try{t(r).not.be.Null.and.containDeep(e[o]),o++}catch(n){if(n instanceof t.AssertionError)return;throw n}},this),this.assert(o==e.length)}else this.assert(!1);else r.isString(n)?this.assert(n.indexOf(String(e))>=0):r.isObject(n)?r.isObject(e)?r.forOwn(e,function(e,r){t(n[r]).not.be.Null.and.containDeep(e)}):this.assert(!1):this.eql(e)}),e.add("containDeep",function(e){this.params={operator:"to contain "+i(e)};var n=this.obj;if(r.isArray(n))if(r.isArray(e)){var o={};e.forEach(function(e){this.assert(n.some(function(r,n){if(n in o)return!1;try{return t(r).not.be.Null.and.containDeep(e),o[n]=!0,!0}catch(i){if(i instanceof t.AssertionError)return!1;throw i}}))},this)}else this.assert(!1);else r.isString(n)?this.assert(n.indexOf(String(e))>=0):r.isObject(n)?r.isObject(e)?r.forOwn(e,function(e,r){t(n[r]).not.be.Null.and.containDeep(e)}):this.assert(!1):this.eql(e)})}},{"../eql":1,"../util":15}],6:[function(t,e){var r=t("../eql");e.exports=function(t,e){e.add("eql",function(t,e){this.params={operator:"to equal",expected:t,showDiff:!0,message:e},this.assert(r(t,this.obj))}),e.add("equal",function(t,e){this.params={operator:"to be",expected:t,showDiff:!0,message:e},this.assert(t===this.obj)}),e.alias("equal","exactly")}},{"../eql":1}],7:[function(t,e){var r=t("../util");e.exports=function(t,e){var n=t.format;e.add("throw",function(e,i){var o=this.obj,s={},a="",u=!1,c=!0;try{o()}catch(f){u=!0,s=f}if(u)if(e){if("string"==typeof e)c=e==s.message;else if(e instanceof RegExp)c=e.test(s.message);else if("function"==typeof e)c=s instanceof e;else if(r.isObject(e))try{s.should.match(e)}catch(f){if(!(f instanceof t.AssertionError))throw f;a=": "+f.message,c=!1}if(c){if("function"==typeof e&&i)try{s.should.match(i)}catch(f){if(!(f instanceof t.AssertionError))throw f;a=": "+f.message,c=!1}}else"string"==typeof e||e instanceof RegExp?a=" with a message matching "+n(e)+", but got '"+s.message+"'":"function"==typeof e&&(a=" of type "+r.functionName(e)+", but got "+r.functionName(s.constructor))}else a=" (got "+n(s)+")";this.params={operator:"to throw exception"+a},this.assert(u),this.assert(c)}),e.alias("throw","throwError")}},{"../util":15}],8:[function(t,e){var r=t("../util"),n=t("../eql");e.exports=function(t,e){var i=t.format;e.add("match",function(o,s){if(this.params={operator:"to match "+i(o),message:s},!n(this.obj,o))if(r.isRegExp(o)){if(r.isString(this.obj))this.assert(o.exec(this.obj));else if(r.isArray(this.obj))this.obj.forEach(function(t){this.assert(o.exec(t))},this);else if(r.isObject(this.obj)){var a=[],u=[];r.forOwn(this.obj,function(t,e){o.exec(t)?u.push(r.formatProp(e)):a.push(r.formatProp(e)+" ("+i(t)+")")},this),a.length&&(this.params.operator+="\n not matched properties: "+a.join(", ")),u.length&&(this.params.operator+="\n matched properties: "+u.join(", ")),this.assert(0==a.length)}}else if(r.isFunction(o)){var c;try{c=o(this.obj)}catch(f){throw f instanceof t.AssertionError&&(this.params.operator+="\n "+f.message),f}c instanceof e&&(this.params.operator+="\n "+c.getMessage()),r.isBoolean(c)&&this.assert(c)}else r.isObject(o)?(a=[],u=[],r.forOwn(o,function(e,n){try{t(this.obj[n]).match(e),u.push(r.formatProp(n))}catch(o){if(!(o instanceof t.AssertionError))throw o;a.push(r.formatProp(n)+" ("+i(this.obj[n])+")")}},this),a.length&&(this.params.operator+="\n not matched properties: "+a.join(", ")),u.length&&(this.params.operator+="\n matched properties: "+u.join(", ")),this.assert(0==a.length)):this.assert(!1)}),e.add("matchEach",function(t,e){this.params={operator:"to match each "+i(t),message:e};var o=t;r.isRegExp(t)?o=function(e){return!!t.exec(e)}:r.isFunction(t)||(o=function(e){return n(e,t)}),r.forOwn(this.obj,function(t,e){var n=o(t,e);r.isBoolean(n)&&this.assert(n)},this)})}},{"../eql":1,"../util":15}],9:[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")}},{}],10:[function(t,e){var r=t("../util"),n=t("../eql"),i=Array.prototype.slice;e.exports=function(t,e){var o=t.format;e.add("enumerable",function(t,e){t=String(t),this.params={operator:"to have enumerable property "+r.formatProp(t)},this.assert(this.obj.propertyIsEnumerable(t)),arguments.length>1&&(this.params.operator+=" equal to "+o(e),this.assert(n(e,this.obj[t])))}),e.add("property",function(t,e){if(t=String(t),arguments.length>1){var r={};r[t]=e,this.have.properties(r)}else this.have.properties(t);this.obj=this.obj[t]}),e.add("properties",function(t){var e={};arguments.length>1?t=i.call(arguments):r.isArray(t)||(r.isString(t)?t=[t]:(e=t,t=Object.keys(t)));var s=Object(this.obj),a=[];t.forEach(function(t){t in s||a.push(r.formatProp(t))});var u=a;0===u.length?u=t.map(r.formatProp):this.anyOne&&(u=t.filter(function(t){return a.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={operator:c},this.assert(0===a.length||this.anyOne&&a.length!=t.length);var f=Object.keys(e);if(f.length){var p=[];u=[],f.forEach(function(t){var i=e[t];n(s[t],i)?u.push(r.formatProp(t)+" of "+o(i)):p.push(r.formatProp(t)+" of "+o(i)+" (got "+o(s[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={operator:c},this.assert(0===p.length||this.anyOne&&p.length!=f.length)}}),e.add("length",function(t,e){this.have.property("length",t,e)}),e.alias("length","lengthOf");var s=Object.prototype.hasOwnProperty;e.add("ownProperty",function(t,e){t=String(t),this.params={operator:"to have own property "+r.formatProp(t),message:e},this.assert(s.call(this.obj,t)),this.obj=this.obj[t]}),e.alias("ownProperty","hasOwnProperty"),e.add("empty",function(){if(this.params={operator:"to be empty"},r.isString(this.obj)||r.isArray(this.obj)||r.isArguments(this.obj))this.have.property("length",0);else{var t=Object(this.obj);for(var e in t)this.have.not.ownProperty(e)}},!0),e.add("keys",function(t){arguments.length>1?t=i.call(arguments):1===arguments.length&&r.isString(t)?t=[t]:0===arguments.length&&(t=[]),t=t.map(String);var e=Object(this.obj),n=[];t.forEach(function(t){s.call(this.obj,t)||n.push(r.formatProp(t))},this);var o=[];Object.keys(e).forEach(function(e){t.indexOf(e)<0&&o.push(r.formatProp(e))});var a=0===t.length?"to be empty":"to have "+(1===t.length?"key ":"keys ");this.params={operator:a+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=i.call(arguments):1===arguments.length&&r.isString(e)?e=[e]:0===arguments.length&&(e=[]);var n=e.map(r.formatProp);e=e.map(String);for(var o,s=t(Object(this.obj)),a=[];o=e.shift();)this.params={operator:"to have property by path "+n.join(", ")+" - failed on "+r.formatProp(o)},s=s.have.property(o),a.push(o);this.params={operator:"to have property by path "+n.join(", ")},this.obj=s.obj})}},{"../eql":1,"../util":15}],11:[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)})}},{}],12:[function(t,e){var r=t("../util");e.exports=function(t,e){e.add("Number",function(){this.params={operator:"to be a number"},this.assert(r.isNumber(this.obj))},!0),e.add("arguments",function(){this.params={operator:"to be arguments"},this.assert(r.isArguments(this.obj))},!0),e.add("type",function(t,e){this.params={operator:"to have type "+t,message:e},(typeof this.obj).should.be.exactly(t,e)}),e.add("instanceof",function(t,e){this.params={operator:"to be an instance of "+r.functionName(t),message:e},this.assert(Object(this.obj)instanceof t)}),e.add("Function",function(){this.params={operator:"to be a function"},this.assert(r.isFunction(this.obj))},!0),e.add("Object",function(){this.params={operator:"to be an object"},this.assert(r.isObject(this.obj))},!0),e.add("String",function(){this.params={operator:"to be a string"},this.assert(r.isString(this.obj))},!0),e.add("Array",function(){this.params={operator:"to be an array"},this.assert(r.isArray(this.obj))},!0),e.add("Boolean",function(){this.params={operator:"to be a boolean"},this.assert(r.isBoolean(this.obj))},!0),e.add("Error",function(){this.params={operator:"to be an error"},this.assert(r.isError(this.obj))},!0),e.add("null",function(){this.params={operator:"to be null"},this.assert(null===this.obj)},!0),e.alias("null","Null"),e.alias("instanceof","instanceOf")}},{"../util":15}],13:[function(t,e,r){function n(t,e){var n={seen:[],stylize:o};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(e)?n.showHidden=e:e&&r._extend(n,e),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=i),a(n,t,n.depth)}function i(t,e){var r=n.styles[e];return r?"["+n.colors[r][0]+"m"+t+"["+n.colors[r][1]+"m":t}function o(t){return t}function s(t){var e={};return t.forEach(function(t){e[t]=!0}),e}function a(t,e,n){if(t.customInspect&&e&&j(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return v(i)||(i=a(t,i,n)),i}var o=u(t,e);if(o)return o;var g=Object.keys(e),y=s(g);t.showHidden&&(g=Object.getOwnPropertyNames(e));var d,b=e;try{E(e)||(b=e.valueOf())}catch(O){}if(v(b)&&(g=g.filter(function(t){return!(t>=0&&t<b.length)})),S(e))return f(e);if(0===g.length){if(j(e)){var N=e.name?": "+e.name:"";return t.stylize("[Function"+N+"]","special")}if(w(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(E(e))return t.stylize(Date.prototype.toString.call(e),"date");if(v(b))return d=c(t,b),t.stylize("[String: "+d+"]","string");if(x(b))return d=c(t,b),t.stylize("[Number: "+d+"]","number");if(m(b))return d=c(t,b),t.stylize("[Boolean: "+d+"]","boolean")}var z="",D=!1,P=["{","}"];if(A(e)&&(D=!0,P=["[","]"]),j(e)){var q=e.name?": "+e.name:"";z=" [Function"+q+"]"}if(w(e)&&(z=" "+RegExp.prototype.toString.call(e)),E(e)&&(z=" "+Date.prototype.toUTCString.call(e)),S(e)&&(z=" "+f(e)),v(b)&&(d=c(t,b),z=" [String: "+d+"]"),x(b)&&(d=c(t,b),z=" [Number: "+d+"]"),m(b)&&(d=c(t,b),z=" [Boolean: "+d+"]"),0===g.length&&(!D||0===e.length))return P[0]+z+P[1];if(0>n)return w(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var k;return k=D?p(t,e,n,y,g):g.map(function(r){return l(t,e,n,y,r,D)}),t.seen.pop(),h(k,z,P)}function u(t,e){if(b(e))return t.stylize("undefined","undefined");if(v(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return x(e)?0===e&&0>1/e?t.stylize("-0","number"):t.stylize(""+e,"number"):m(e)?t.stylize(""+e,"boolean"):O(e)?t.stylize("null","null"):void 0}function c(t,e){var r=t.stylize;t.stylize=o;var n=u(t,e);return t.stylize=r,n}function f(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,r,n,i){for(var o=[],s=0,a=e.length;a>s;++s)o.push(g(e,String(s))?l(t,e,r,n,String(s),!0):"");return i.forEach(function(i){i.match(/^\d+$/)||o.push(l(t,e,r,n,i,!0))}),o}function l(t,e,r,n,i,o){var s,u,c;if(c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},c.get?u=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(u=t.stylize("[Setter]","special")),g(n,i)||(s="["+i+"]"),u||(t.seen.indexOf(c.value)<0?(u=O(r)?a(t,c.value,null):a(t,c.value,r-1),u.indexOf("\n")>-1&&(u=o?u.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+u.split("\n").map(function(t){return" "+t}).join("\n"))):u=t.stylize("[Circular]","special")),b(s)){if(o&&i.match(/^\d+$/))return u;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'").replace(/\\\\/g,"\\"),s=t.stylize(s,"string"))}return s+": "+u}function h(t,e,r){var n=t.reduce(function(t,e){return t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function g(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var y=t("./util"),m=y.isBoolean,d=y.isObject,b=y.isUndefined,j=y.isFunction,v=y.isString,x=y.isNumber,O=y.isNull,w=y.isRegExp,E=y.isDate,S=y.isError,A=y.isArray;r.inspect=n,n.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]},n.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},r._extend=function(t,e){if(!e||!d(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}},{"./util":15}],14:[function(t,e,r){var n=t("./util"),i=n.AssertionError,o=n.inspect,s=function(t){return new a(n.isWrapperType(t)?t.valueOf():t)},a=s.Assertion=function(t){this.obj=t};a.add=function(t,e,r){var n={};n[r?"get":"value"]=function(){var t=new a(this.obj);t.copy=t.copyIfMissing,t.anyOne=this.anyOne;try{e.apply(t,arguments)}catch(r){if(this.copy(t),r instanceof s.AssertionError){if(this.negate)return this.obj=t.obj,this.negate=!1,this;this.assert(!1)}throw r}return this.copy(t),this.negate&&this.assert(!1),this.obj=t.obj,this.negate=!1,this},Object.defineProperty(a.prototype,t,n)},a.alias=function(t,e){var r=Object.getOwnPropertyDescriptor(a.prototype,t);if(!r)throw new Error("Alias "+t+" -> "+e+" could not be created as "+t+" not defined");Object.defineProperty(a.prototype,e,r)},s.AssertionError=i,s.format=function(t){return n.isDate(t)&&"function"!=typeof t.inspect?t.toISOString():o(t,{depth:null})},s.use=function(t){return t(this,a),this},r=e.exports=s,Object.defineProperty(Object.prototype,"should",{set:function(){},get:function(){return s(this)},configurable:!0}),a.prototype={constructor:a,assert:function(t){if(!t){var e=this.params,r=e.message,n=!1;r||(r=this.getMessage(),n=!0);var o=new i({message:r,actual:this.obj,expected:e.expected,stackStartFunction:this.assert});throw o.showDiff=e.showDiff,o.operator=e.operator,o.generatedMessage=n,o}},getMessage:function(){return"expected "+("obj"in this.params?this.params.obj:s.format(this.obj))+(this.negate?" not ":" ")+this.params.operator+("expected"in this.params?" "+s.format(this.params.expected):"")},copy:function(t){this.params=t.params},copyIfMissing:function(t){this.params||(this.params=t.params)},get not(){return this.negate=!this.negate,this},get any(){return this.anyOne=!0,this}},s.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"))},{"./ext/assert":2,"./ext/bool":3,"./ext/chain":4,"./ext/contain":5,"./ext/eql":6,"./ext/error":7,"./ext/match":8,"./ext/number":9,"./ext/property":10,"./ext/string":11,"./ext/type":12,"./util":15}],15:[function(t,e,r){function n(t){return f(t)&&(t.__ArrayLike||Array.isArray(t))}function i(t){return"number"==typeof t||t instanceof Number}function o(t){return"string"==typeof t||t instanceof String}function s(t){return"boolean"==typeof t||t instanceof Boolean}function a(t){return"undefined"!=typeof Buffer&&t instanceof Buffer}function u(t){return f(t)&&"[object Date]"===c(t)}function c(t){return Object.prototype.toString.call(t)}function f(t){return"object"==typeof t&&null!==t}function p(t){return f(t)&&"[object RegExp]"===c(t)}function l(t){return null==t}function h(t){return null===t}function g(t){return"[object Arguments]"===c(t)}function y(t){return f(t)&&"[object Error]"===c(t)||t instanceof Error}function m(t){return void 0===t}r.isWrapperType=function(t){return i(t)||o(t)||s(t)},r.merge=function(t,e){if(t&&e)for(var r in e)t[r]=e[r];return t},r.isArray=n,r.isNumber=i,r.isBoolean=s,r.isString=o,r.isBuffer=a,r.isDate=u,r.isObject=f,r.isRegExp=p,r.isNullOrUndefined=l,r.isNull=h,r.isArguments=g,r.isFunction=function(t){return"function"==typeof t||t instanceof Function},r.isError=y,r.isUndefined=m,r.inspect=t("./inspect").inspect,r.AssertionError=t("assert").AssertionError;var d=Object.prototype.hasOwnProperty;r.forOwn=function(t,e,r){for(var n in t)d.call(t,n)&&e.call(r,t[n],n)};var b=/^\s*function\s*(\S*)\s*\(/;r.functionName=function(t){if(t.name)return t.name;var e=t.toString().match(b)[1];return e},r.formatProp=function(t){return t=JSON.stringify(""+t),t=t.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?t.substr(1,t.length-2):t.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'").replace(/\\\\/g,"\\")}},{"./inspect":13,assert:16}],16:[function(t,e){function r(t,e){return l.isUndefined(e)?""+e:!l.isNumber(e)||!isNaN(e)&&isFinite(e)?l.isFunction(e)||l.isRegExp(e)?e.toString():e:e.toString()}function n(t,e){return l.isString(t)?t.length<e?t:t.slice(0,e):t}function i(t){return n(JSON.stringify(t.actual,r),128)+" "+t.operator+" "+n(JSON.stringify(t.expected,r),128)}function o(t,e,r,n,i){throw new y.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function s(t,e){t||o(t,!0,e,"==",y.ok)}function a(t,e){if(t===e)return!0;if(l.isBuffer(t)&&l.isBuffer(e)){if(t.length!=e.length)return!1;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}return l.isDate(t)&&l.isDate(e)?t.getTime()===e.getTime():l.isRegExp(t)&&l.isRegExp(e)?t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase:l.isObject(t)||l.isObject(e)?c(t,e):t==e}function u(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function c(t,e){if(l.isNullOrUndefined(t)||l.isNullOrUndefined(e))return!1;if(t.prototype!==e.prototype)return!1;if(u(t))return u(e)?(t=h.call(t),e=h.call(e),a(t,e)):!1;try{var r,n,i=m(t),o=m(e)}catch(s){return!1}if(i.length!=o.length)return!1;for(i.sort(),o.sort(),n=i.length-1;n>=0;n--)if(i[n]!=o[n])return!1;for(n=i.length-1;n>=0;n--)if(r=i[n],!a(t[r],e[r]))return!1;return!0}function f(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 p(t,e,r,n){var i;l.isString(r)&&(n=r,r=null);try{e()}catch(s){i=s}if(n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&o(i,r,"Missing expected exception"+n),!t&&f(i,r)&&o(i,r,"Got unwanted exception"+n),t&&i&&r&&!f(i,r)||!t&&i)throw i}var l=t("util/"),h=Array.prototype.slice,g=Object.prototype.hasOwnProperty,y=e.exports=s;y.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=i(this),this.generatedMessage=!0);var e=t.stackStartFunction||o;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,s=e.name,a=n.indexOf("\n"+s);if(a>=0){var u=n.indexOf("\n",a+1);n=n.substring(u+1)}this.stack=n}}},l.inherits(y.AssertionError,Error),y.fail=o,y.ok=s,y.equal=function(t,e,r){t!=e&&o(t,e,r,"==",y.equal)},y.notEqual=function(t,e,r){t==e&&o(t,e,r,"!=",y.notEqual)},y.deepEqual=function(t,e,r){a(t,e)||o(t,e,r,"deepEqual",y.deepEqual)},y.notDeepEqual=function(t,e,r){a(t,e)&&o(t,e,r,"notDeepEqual",y.notDeepEqual)},y.strictEqual=function(t,e,r){t!==e&&o(t,e,r,"===",y.strictEqual)},y.notStrictEqual=function(t,e,r){t===e&&o(t,e,r,"!==",y.notStrictEqual)},y.throws=function(){p.apply(this,[!0].concat(h.call(arguments)))},y.doesNotThrow=function(){p.apply(this,[!1].concat(h.call(arguments)))},y.ifError=function(t){if(t)throw t};var m=Object.keys||function(t){var e=[];for(var r in t)g.call(t,r)&&e.push(r);return e}},{"util/":18}],17:[function(t,e){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],18:[function(t,e,r){function n(t,e){var n={seen:[],stylize:o};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(e)?n.showHidden=e:e&&r._extend(n,e),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=i),a(n,t,n.depth)}function i(t,e){var r=n.styles[e];return r?"["+n.colors[r][0]+"m"+t+"["+n.colors[r][1]+"m":t}function o(t){return t}function s(t){var e={};return t.forEach(function(t){e[t]=!0}),e}function a(t,e,n){if(t.customInspect&&e&&S(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return b(i)||(i=a(t,i,n)),i}var o=u(t,e);if(o)return o;var g=Object.keys(e),y=s(g);if(t.showHidden&&(g=Object.getOwnPropertyNames(e)),E(e)&&(g.indexOf("message")>=0||g.indexOf("description")>=0))return c(e);if(0===g.length){if(S(e)){var m=e.name?": "+e.name:"";return t.stylize("[Function"+m+"]","special")}if(x(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(w(e))return t.stylize(Date.prototype.toString.call(e),"date");if(E(e))return c(e)}var d="",j=!1,v=["{","}"];if(h(e)&&(j=!0,v=["[","]"]),S(e)){var O=e.name?": "+e.name:"";d=" [Function"+O+"]"}if(x(e)&&(d=" "+RegExp.prototype.toString.call(e)),w(e)&&(d=" "+Date.prototype.toUTCString.call(e)),E(e)&&(d=" "+c(e)),0===g.length&&(!j||0==e.length))return v[0]+d+v[1];if(0>n)return x(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var A;return A=j?f(t,e,n,y,g):g.map(function(r){return p(t,e,n,y,r,j)}),t.seen.pop(),l(A,d,v)}function u(t,e){if(v(e))return t.stylize("undefined","undefined");if(b(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return d(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):y(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,r,n,i){for(var o=[],s=0,a=e.length;a>s;++s)o.push(P(e,String(s))?p(t,e,r,n,String(s),!0):"");return i.forEach(function(i){i.match(/^\d+$/)||o.push(p(t,e,r,n,i,!0))}),o}function p(t,e,r,n,i,o){var s,u,c;if(c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},c.get?u=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(u=t.stylize("[Setter]","special")),P(n,i)||(s="["+i+"]"),u||(t.seen.indexOf(c.value)<0?(u=y(r)?a(t,c.value,null):a(t,c.value,r-1),u.indexOf("\n")>-1&&(u=o?u.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+u.split("\n").map(function(t){return" "+t}).join("\n"))):u=t.stylize("[Circular]","special")),v(s)){if(o&&i.match(/^\d+$/))return u;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+u}function l(t,e,r){var n=0,i=t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function h(t){return Array.isArray(t)}function g(t){return"boolean"==typeof t}function y(t){return null===t}function m(t){return null==t}function d(t){return"number"==typeof t}function b(t){return"string"==typeof t}function j(t){return"symbol"==typeof t}function v(t){return void 0===t}function x(t){return O(t)&&"[object RegExp]"===N(t)}function O(t){return"object"==typeof t&&null!==t}function w(t){return O(t)&&"[object Date]"===N(t)}function E(t){return O(t)&&("[object Error]"===N(t)||t instanceof Error)}function S(t){return"function"==typeof t}function A(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function N(t){return Object.prototype.toString.call(t)}function z(t){return 10>t?"0"+t.toString(10):t.toString(10)}function D(){var t=new Date,e=[z(t.getHours()),z(t.getMinutes()),z(t.getSeconds())].join(":");return[t.getDate(),F[t.getMonth()],e].join(" ")}function P(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var q=/%[sdj%]/g;r.format=function(t){if(!b(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(n(arguments[r]));return e.join(" ")}for(var r=1,i=arguments,o=i.length,s=String(t).replace(q,function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(e){return"[Circular]"}default:return t}}),a=i[r];o>r;a=i[++r])s+=y(a)||!O(a)?" "+a:" "+n(a);return s},r.deprecate=function(t,e){function n(){if(!i){if(process.throwDeprecation)throw new Error(e);process.traceDeprecation?console.trace(e):console.error(e),i=!0}return t.apply(this,arguments)}if(v(global.process))return function(){return r.deprecate(t,e).apply(this,arguments)};if(process.noDeprecation===!0)return t;var i=!1;return n};var k,B={};r.debuglog=function(t){if(v(k)&&(k=process.env.NODE_DEBUG||""),t=t.toUpperCase(),!B[t])if(new RegExp("\\b"+t+"\\b","i").test(k)){var e=process.pid;B[t]=function(){var n=r.format.apply(r,arguments);console.error("%s %d: %s",t,e,n)}}else B[t]=function(){};return B[t]},r.inspect=n,n.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]},n.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=h,r.isBoolean=g,r.isNull=y,r.isNullOrUndefined=m,r.isNumber=d,r.isString=b,r.isSymbol=j,r.isUndefined=v,r.isRegExp=x,r.isObject=O,r.isDate=w,r.isError=E,r.isFunction=S,r.isPrimitive=A,r.isBuffer=t("./support/isBuffer");var F=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",D(),r.format.apply(r,arguments))},r.inherits=t("inherits"),r._extend=function(t,e){if(!e||!O(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}},{"./support/isBuffer":17,inherits:19}],19:[function(t,e){e.exports="function"==typeof Object.create?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}]},{},[14])(14)}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
230403
3658
659