Comparing version 4.3.1 to 4.4.0
@@ -24,6 +24,7 @@ var gulp = require('gulp'); | ||
entries: './lib/should.js', | ||
builtins: ['util', 'assert'], | ||
builtins: null, | ||
insertGlobals: false, | ||
detectGlobals: false, | ||
standalone: 'Should' | ||
standalone: 'Should', | ||
fullPaths: false | ||
}) | ||
@@ -30,0 +31,0 @@ .bundle(); |
@@ -0,1 +1,7 @@ | ||
4.4.0 / 2014-12-12 | ||
================== | ||
* assert methods reimplemented via assertion, deepEqual done via should-equal. To avoid possible confusion between should.deepEqual and a.should.eql(b) | ||
* Possible fix for error tests | ||
4.3.1 / 2014-12-08 | ||
@@ -2,0 +8,0 @@ ================== |
@@ -1,2 +0,42 @@ | ||
// copy that inside | ||
module.exports = require('./util').AssertionError; | ||
var util = require('./util'); | ||
var AssertionError = function AssertionError(options) { | ||
this.name = 'AssertionError'; | ||
this.actual = options.actual; | ||
this.expected = options.expected; | ||
this.operator = options.operator; | ||
this.message = options.message; | ||
var stackStartFunction = options.stackStartFunction; | ||
if(Error.captureStackTrace) { | ||
Error.captureStackTrace(this, stackStartFunction); | ||
} | ||
else { | ||
// non v8 browsers so we can have a stacktrace | ||
var err = new Error(); | ||
if(err.stack) { | ||
var out = err.stack; | ||
if(stackStartFunction) { | ||
// try to strip useless frames | ||
var fn_name = util.functionName(stackStartFunction); | ||
var idx = out.indexOf('\n' + fn_name); | ||
if(idx >= 0) { | ||
// once we have located the function frame | ||
// we need to strip out everything before it (and its line) | ||
var next_line = out.indexOf('\n', idx + 1); | ||
out = out.substring(next_line + 1); | ||
} | ||
} | ||
this.stack = out; | ||
} | ||
} | ||
}; | ||
// assert.AssertionError instanceof Error | ||
AssertionError.prototype = Object.create(Error.prototype); | ||
module.exports = AssertionError; |
var AssertionError = require('./assertion-error'); | ||
var util = require('./util'); | ||
var format = require('should-format'); | ||
function Assertion(obj, format) { | ||
function Assertion(obj) { | ||
this.obj = obj; | ||
this.format = format; | ||
} | ||
@@ -19,3 +19,3 @@ | ||
prop[isGetter ? 'get' : 'value'] = function() { | ||
var context = new Assertion(this.obj, this.format); | ||
var context = new Assertion(this.obj, format); | ||
context.anyOne = this.anyOne; | ||
@@ -103,3 +103,3 @@ | ||
expected: params.expected, | ||
stackStartFunction: this.assert | ||
stackStartFunction: params.stackStartFunction || this.assert | ||
}); | ||
@@ -119,4 +119,4 @@ | ||
getMessage: function() { | ||
var actual = 'obj' in this.params ? this.format(this.params.obj) : this.format(this.obj); | ||
var expected = 'expected' in this.params ? ' ' + this.format(this.params.expected) : ''; | ||
var actual = 'obj' in this.params ? format(this.params.obj) : format(this.obj); | ||
var expected = 'expected' in this.params ? ' ' + format(this.params.expected) : ''; | ||
var details = 'details' in this.params && this.params.details ? ' (' + this.params.details + ')': ''; | ||
@@ -123,0 +123,0 @@ |
@@ -8,4 +8,4 @@ /*! | ||
var util = require('../util') | ||
, assert = require('assert') | ||
, AssertionError = assert.AssertionError; | ||
, assert = require('./_assert') | ||
, AssertionError = require('../assertion-error'); | ||
@@ -12,0 +12,0 @@ module.exports = function(should) { |
@@ -21,3 +21,3 @@ /*! | ||
var unwrappedObj = util.isWrapperType(obj) ? obj.valueOf() : obj; | ||
return new should.Assertion(unwrappedObj, should.format); | ||
return new should.Assertion(unwrappedObj); | ||
}; | ||
@@ -24,0 +24,0 @@ |
{ | ||
"name": "should", | ||
"description": "test framework agnostic BDD-style assertions", | ||
"version": "4.3.1", | ||
"version": "4.4.0", | ||
"author": "TJ Holowaychuk <tj@vision-media.ca> and contributors", | ||
@@ -12,4 +12,4 @@ "repository": { | ||
"scripts": { | ||
"test": "mocha -R mocha-better-spec-reporter ./test/**/*.test.js", | ||
"zuul": "zuul -- ./test/**/[!error]*.test.js ./test/*.test.js", | ||
"test": "mocha -R mocha-better-spec-reporter ./test/**/*.test.js ./test/*.test.js", | ||
"zuul": "zuul -- ./test/**/*.test.js ./test/*.test.js", | ||
"browser": "gulp script" | ||
@@ -39,5 +39,5 @@ }, | ||
"dependencies": { | ||
"should-equal": "0.1.0", | ||
"should-format": "0.0.2" | ||
"should-equal": "0.2.2", | ||
"should-format": "0.0.4" | ||
} | ||
} |
/** | ||
* should - test framework agnostic BDD-style assertions | ||
* @version v4.3.1 | ||
* @version v4.4.0 | ||
* @author TJ Holowaychuk <tj@vision-media.ca> and contributors | ||
@@ -8,3 +8,3 @@ * @link https://github.com/shouldjs/should.js | ||
*/ | ||
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Should=t()}}(function(){return function t(e,r,n){function o(i,a){if(!r[i]){if(!e[i]){var u="function"==typeof require&&require;if(!a&&u)return u(i,!0);if(s)return s(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var f=r[i]={exports:{}};e[i][0].call(f.exports,function(t){var r=e[i][1][t];return o(r?r:t)},f,f.exports,t,e,r,n)}return r[i].exports}for(var s="function"==typeof require&&require,i=0;i<n.length;i++)o(n[i]);return o}({1:[function(t,e,r){var n=t("./util"),o=t("should-format"),s=t("./warn"),i=function c(t){s.staticShouldUnWrap(n.isWrapperType(t)&&c.warn);var e=n.isWrapperType(t)?t.valueOf():t;return new c.Assertion(e,c.format)},a="SHOULDJS_WARN",u="undefined"!=typeof process&&process.env[a]&&"true"===process.env[a];i.warn="undefined"==typeof u?!0:u,i.AssertionError=t("./assertion-error"),i.Assertion=t("./assertion"),i.format=o,r=e.exports=i,i.extend=function(t,e){t=t||"should",e=e||Object.prototype,Object.defineProperty(e,t,{set:function(){},get:function(){return i(n.isWrapperType(this)?this.valueOf():this)},configurable:!0})},i.extend("should",Object.prototype),i.use=function(t){return t(this,this.Assertion),this},i.use(t("./ext/assert")).use(t("./ext/chain")).use(t("./ext/bool")).use(t("./ext/number")).use(t("./ext/eql")).use(t("./ext/type")).use(t("./ext/string")).use(t("./ext/property")).use(t("./ext/error")).use(t("./ext/match")).use(t("./ext/contain"))},{"./assertion":3,"./assertion-error":2,"./ext/assert":4,"./ext/bool":5,"./ext/chain":6,"./ext/contain":7,"./ext/eql":8,"./ext/error":9,"./ext/match":10,"./ext/number":11,"./ext/property":12,"./ext/string":13,"./ext/type":14,"./util":15,"./warn":16,"should-format":23}],2:[function(t,e){e.exports=t("./util").AssertionError},{"./util":15}],3:[function(t,e){function r(t,e){this.obj=t,this.format=e}function n(t){return i+t}function o(t){return t.split("\n").map(n).join("\n")}{var s=t("./assertion-error");t("./util")}r.add=function(t,e,n){var o={enumerable:!0};o[n?"get":"value"]=function(){var t=new r(this.obj,this.format);t.anyOne=this.anyOne;try{e.apply(t,arguments)}catch(n){if(this.params=t.params,n instanceof s){if(this.negate)return this.obj=t.obj,this.negate=!1,this;this.nestedErrorMessage=n.message,this.fail()}throw n}return this.params=t.params,this.negate&&(t.negate=!0,this.nestedErrorMessage=t.params.message?t.params.message:t.getMessage(),this.fail()),this.obj=t.obj,this.negate=!1,this},Object.defineProperty(r.prototype,t,o)},r.alias=function(t,e){var n=Object.getOwnPropertyDescriptor(r.prototype,t);if(!n)throw new Error("Alias "+t+" -> "+e+" could not be created as "+t+" not defined");Object.defineProperty(r.prototype,e,n)};var i=" ";r.prototype={constructor:r,assert:function(t){if(t)return this;var e=this.params,r=e.message,n=!1;r||(r=this.getMessage(),n=!0),this.nestedErrorMessage&&r!=this.nestedErrorMessage&&(r=r+"\n"+o(this.nestedErrorMessage));var i=new s({message:r,actual:this.obj,expected:e.expected,stackStartFunction:this.assert});throw i.showDiff=e.showDiff,i.operator=e.operator,i.generatedMessage=n,i},fail:function(){return this.assert(!1)},getMessage:function(){var t=this.format("obj"in this.params?this.params.obj:this.obj),e="expected"in this.params?" "+this.format(this.params.expected):"",r="details"in this.params&&this.params.details?" ("+this.params.details+")":"";return"expected "+t+(this.negate?" not ":" ")+this.params.operator+e+r},get not(){return this.negate=!this.negate,this},get any(){return this.anyOne=!0,this}},e.exports=r},{"./assertion-error":2,"./util":15}],4:[function(t,e){var r=t("../util"),n=t("assert"),o=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 o({message:n||"expected "+e(r)+" to exist",stackStartFunction:t.exist})},t.not={},t.not.exist=t.not.exists=function(r,n){if(null!=r)throw new o({message:n||"expected "+e(r)+" to not exist",stackStartFunction:t.not.exist})}}},{"../util":15,assert:17}],5:[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)}},{}],6:[function(t,e){e.exports=function(t,e){function r(t){Object.defineProperty(e.prototype,t,{get:function(){return this},enumerable:!0})}["an","of","a","and","be","have","with","is","which","the"].forEach(r)}},{}],7:[function(t,e){var r=t("../util"),n=t("should-equal");e.exports=function(t,e){var o=t.format;e.add("containEql",function(t){this.params={operator:"to contain "+o(t)};var e=this.obj;r.isArray(e)?this.assert(e.some(function(e){return n(e,t).result})):r.isString(e)?this.assert(e.indexOf(String(t))>=0):r.isObject(e)?r.forOwn(t,function(t,r){e.should.have.property(r,t)}):this.assert(!1)}),e.add("containDeepOrdered",function(e){this.params={operator:"to contain "+o(e)};var n=this.obj;if(r.isArray(n))if(r.isArray(e)){var s=0;n.forEach(function(r){try{t(r).not.be.Null.and.containDeep(e[s]),s++}catch(n){if(n instanceof t.AssertionError)return;throw n}},this),this.assert(s==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 "+o(e)};var n=this.obj;if(r.isArray(n))if(r.isArray(e)){var s={};e.forEach(function(e){this.assert(n.some(function(r,n){if(n in s)return!1;try{return t(r).not.be.Null.and.containDeep(e),s[n]=!0,!0}catch(o){if(o instanceof t.AssertionError)return!1;throw o}}))},this)}else this.assert(!1);else r.isString(n)?this.assert(n.indexOf(String(e))>=0):r.isObject(n)?r.isObject(e)?r.forOwn(e,function(e,r){t(n[r]).not.be.Null.and.containDeep(e)}):this.assert(!1):this.eql(e)})}},{"../util":15,"should-equal":21}],8:[function(t,e){var r=t("should-equal"),n=(t("../warn"),t("../util"));e.exports=function(t,e){e.add("eql",function(e,o){this.params={operator:"to equal",expected:e,showDiff:!0,message:o};var s=r(this.obj,e);s.result||(this.params.details=n.formatEqlResult(s,this.obj,e,t.format)),this.assert(s.result)}),e.add("equal",function(t,e){this.params={operator:"to be",expected:t,showDiff:!0,message:e},this.assert(t===this.obj)}),e.alias("equal","exactly")}},{"../util":15,"../warn":16,"should-equal":21}],9:[function(t,e){var r=t("../util");e.exports=function(t,e){var n=t.format;e.add("throw",function(e,o){var s=this.obj,i={},a="",u=!1;this.is.a.Function;var c=!0;try{s()}catch(f){u=!0,i=f}if(u)if(e){if("string"==typeof e)c=e==i.message;else if(e instanceof RegExp)c=e.test(i.message);else if("function"==typeof e)c=i instanceof e;else if(r.isObject(e))try{i.should.match(e)}catch(f){if(!(f instanceof t.AssertionError))throw f;a=": "+f.message,c=!1}if(c){if("function"==typeof e&&o)try{i.should.match(o)}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 '"+i.message+"'":"function"==typeof e&&(a=" of type "+r.functionName(e)+", but got "+r.functionName(i.constructor))}else a=" (got "+n(i)+")";this.params={operator:"to throw exception"+a},this.assert(u),this.assert(c)}),e.alias("throw","throwError")}},{"../util":15}],10:[function(t,e){var r=t("../util"),n=t("should-equal");e.exports=function(t,e){var o=t.format;e.add("match",function(s,i){if(this.params={operator:"to match "+o(s),message:i},!n(this.obj,s).result)if(r.isRegExp(s)){if(r.isString(this.obj))this.assert(s.exec(this.obj));else if(r.isArray(this.obj))this.obj.forEach(function(t){this.assert(s.exec(t))},this);else if(r.isObject(this.obj)){var a=[],u=[];r.forOwn(this.obj,function(t,e){s.exec(t)?u.push(r.formatProp(e)):a.push(r.formatProp(e)+" ("+o(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(s)){var c;c=s(this.obj),c instanceof e&&(this.params.operator+="\n "+c.getMessage()),r.isBoolean(c)&&this.assert(c)}else r.isObject(s)?(a=[],u=[],r.forOwn(s,function(e,n){try{t(this.obj[n]).match(e),u.push(r.formatProp(n))}catch(s){if(!(s instanceof t.AssertionError))throw s;a.push(r.formatProp(n)+" ("+o(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 "+o(t),message:e};var s=t;r.isRegExp(t)?s=function(e){return!!t.exec(e)}:r.isFunction(t)||(s=function(e){return n(e,t).result}),r.forOwn(this.obj,function(t,e){var n=s(t,e);r.isBoolean(n)&&this.assert(n)},this)})}},{"../util":15,"should-equal":21}],11:[function(t,e){e.exports=function(t,e){e.add("NaN",function(){this.params={operator:"to be NaN"},this.assert(this.obj!==this.obj)},!0),e.add("Infinity",function(){this.params={operator:"to be Infinity"},this.obj.should.be.a.Number.and.not.a.NaN.and.assert(!isFinite(this.obj))},!0),e.add("within",function(t,e,r){this.params={operator:"to be within "+t+".."+e,message:r},this.assert(this.obj>=t&&this.obj<=e)}),e.add("approximately",function(t,e,r){this.params={operator:"to be approximately "+t+" ±"+e,message:r},this.assert(Math.abs(this.obj-t)<=e)}),e.add("above",function(t,e){this.params={operator:"to be above "+t,message:e},this.assert(this.obj>t)}),e.add("below",function(t,e){this.params={operator:"to be below "+t,message:e},this.assert(this.obj<t)}),e.alias("above","greaterThan"),e.alias("below","lessThan")}},{}],12:[function(t,e){var r=t("../util"),n=t("should-equal"),o=Array.prototype.slice;e.exports=function(t,e){var s=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 "+s(e),this.assert(n(e,this.obj[t]).result))}),e.add("property",function(t,e){if(t=String(t),arguments.length>1){var r={};r[t]=e,this.have.properties(r)}else this.have.properties(t);this.obj=this.obj[t]}),e.add("properties",function(t){var e={};arguments.length>1?t=o.call(arguments):r.isArray(t)||(r.isString(t)?t=[t]:(e=t,t=Object.keys(t)));var i=Object(this.obj),a=[];t.forEach(function(t){t in i||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={obj:this.obj,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 o=e[t];n(i[t],o).result?u.push(r.formatProp(t)+" of "+s(o)):p.push(r.formatProp(t)+" of "+s(o)+" (got "+s(i[t])+")")}),(0!==p.length&&!this.anyOne||this.anyOne&&0===u.length)&&(u=p),c=(1===u.length?"to have property ":"to have "+(this.anyOne?"any of ":"")+"properties ")+u.join(", "),this.params={obj:this.obj,operator:c},this.assert(0===p.length||this.anyOne&&p.length!=f.length)}}),e.add("length",function(t,e){this.have.property("length",t,e)}),e.alias("length","lengthOf");var i=Object.prototype.hasOwnProperty;e.add("ownProperty",function(t,e){t=String(t),this.params={obj:this.obj,operator:"to have own property "+r.formatProp(t),message:e},this.assert(i.call(this.obj,t)),this.obj=this.obj[t]}),e.alias("ownProperty","hasOwnProperty"),e.add("empty",function(){if(this.params={operator:"to be empty"},r.isString(this.obj)||r.isArray(this.obj)||r.isArguments(this.obj))this.obj.should.have.property("length",0);else{var t=Object(this.obj);for(var e in t)this.obj.should.not.ownProperty(e)}},!0),e.add("keys",function(t){arguments.length>1?t=o.call(arguments):1===arguments.length&&r.isString(t)?t=[t]:0===arguments.length&&(t=[]),t=t.map(String);var e=Object(this.obj),n=[];t.forEach(function(t){i.call(this.obj,t)||n.push(r.formatProp(t))},this);var s=[];Object.keys(e).forEach(function(e){t.indexOf(e)<0&&s.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(", ")),s.length>0&&(this.params.operator+="\n extra keys: "+s.join(", ")),this.assert(0===n.length&&0===s.length)}),e.alias("keys","key"),e.add("propertyByPath",function(e){arguments.length>1?e=o.call(arguments):1===arguments.length&&r.isString(e)?e=[e]:0===arguments.length&&(e=[]);var n=e.map(r.formatProp);e=e.map(String);for(var s,i=t(Object(this.obj)),a=[];s=e.shift();)this.params={operator:"to have property by path "+n.join(", ")+" - failed on "+r.formatProp(s)},i=i.have.property(s),a.push(s);this.params={obj:this.obj,operator:"to have property by path "+n.join(", ")},this.obj=i.obj})}},{"../util":15,"should-equal":21}],13:[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)})}},{}],14:[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}],15:[function(t,e,r){function n(t){return f(t)&&(t.__ArrayLike||Array.isArray(t))}function o(t){return"number"==typeof t}function s(t){return"string"==typeof t}function i(t){return"boolean"==typeof t}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 m(t){return f(t)&&"[object Error]"===c(t)||t instanceof Error}function b(t){return void 0===t}r.isWrapperType=function(t){return t instanceof Number||t instanceof String||t instanceof Boolean},r.merge=function(t,e){if(t&&e)for(var r in e)t[r]=e[r];return t},r.isArray=n,r.isNumber=o,r.isBoolean=i,r.isString=s,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=m,r.isUndefined=b,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 y=/^\s*function\s*(\S*)\s*\(/;r.functionName=function(t){if(t.name)return t.name;var e=t.toString().match(y)[1];return e};var j=t("should-format").formatPropertyName;r.formatProp=function(t){return j(String(t))},r.formatEqlResult=function(t,e,n,o){return(t.path.length>0?"at "+t.path.map(r.formatProp).join(" -> "):"")+(t.a===e?"":", A has "+o(t.a))+(t.b===n?"":" and B has "+o(t.b))}},{assert:17,"should-format":23}],16:[function(t,e,r){function n(t){return function(e){e&&t.concat(s).forEach(function(t){console.warn(o,t)})}}var o="[33mWARN[39m",s=["To disable any warnings add [33mshould.warn = false[39m","If you think that is not right, raise issue on github https://github.com/shouldjs/should.js/issues"];r.staticShouldUnWrap=n(["Static version of should was called with primitive type wrapper like should(new Number(10))","current version will unwrap it to assert on primitive value for you","but that will be changed in future versions, make sure you know what are you doing"])},{}],17:[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 o(t){return n(JSON.stringify(t.actual,r),128)+" "+t.operator+" "+n(JSON.stringify(t.expected,r),128)}function s(t,e,r,n,o){throw new m.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:o})}function i(t,e){t||s(t,!0,e,"==",m.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,o=b(t),s=b(e)}catch(i){return!1}if(o.length!=s.length)return!1;for(o.sort(),s.sort(),n=o.length-1;n>=0;n--)if(o[n]!=s[n])return!1;for(n=o.length-1;n>=0;n--)if(r=o[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 o;l.isString(r)&&(n=r,r=null);try{e()}catch(i){o=i}if(n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!o&&s(o,r,"Missing expected exception"+n),!t&&f(o,r)&&s(o,r,"Got unwanted exception"+n),t&&o&&r&&!f(o,r)||!t&&o)throw o}var l=t("util/"),h=Array.prototype.slice,g=Object.prototype.hasOwnProperty,m=e.exports=i;m.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=o(this),this.generatedMessage=!0);var e=t.stackStartFunction||s;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=e.name,a=n.indexOf("\n"+i);if(a>=0){var u=n.indexOf("\n",a+1);n=n.substring(u+1)}this.stack=n}}},l.inherits(m.AssertionError,Error),m.fail=s,m.ok=i,m.equal=function(t,e,r){t!=e&&s(t,e,r,"==",m.equal)},m.notEqual=function(t,e,r){t==e&&s(t,e,r,"!=",m.notEqual)},m.deepEqual=function(t,e,r){a(t,e)||s(t,e,r,"deepEqual",m.deepEqual)},m.notDeepEqual=function(t,e,r){a(t,e)&&s(t,e,r,"notDeepEqual",m.notDeepEqual)},m.strictEqual=function(t,e,r){t!==e&&s(t,e,r,"===",m.strictEqual)},m.notStrictEqual=function(t,e,r){t===e&&s(t,e,r,"!==",m.notStrictEqual)},m.throws=function(){p.apply(this,[!0].concat(h.call(arguments)))},m.doesNotThrow=function(){p.apply(this,[!1].concat(h.call(arguments)))},m.ifError=function(t){if(t)throw t};var b=Object.keys||function(t){var e=[];for(var r in t)g.call(t,r)&&e.push(r);return e}},{"util/":20}],18:[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}},{}],19:[function(t,e){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],20:[function(t,e,r){function n(t,e){var n={seen:[],stylize:s};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=o),a(n,t,n.depth)}function o(t,e){var r=n.styles[e];return r?"["+n.colors[r][0]+"m"+t+"["+n.colors[r][1]+"m":t}function s(t){return t}function i(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 o=e.inspect(n,t);return y(o)||(o=a(t,o,n)),o}var s=u(t,e);if(s)return s;var g=Object.keys(e),m=i(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 b=e.name?": "+e.name:"";return t.stylize("[Function"+b+"]","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,m,g):g.map(function(r){return p(t,e,n,m,r,j)}),t.seen.pop(),l(A,d,v)}function u(t,e){if(v(e))return t.stylize("undefined","undefined");if(y(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"):m(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,r,n,o){for(var s=[],i=0,a=e.length;a>i;++i)s.push(L(e,String(i))?p(t,e,r,n,String(i),!0):"");return o.forEach(function(o){o.match(/^\d+$/)||s.push(p(t,e,r,n,o,!0))}),s}function p(t,e,r,n,o,s){var i,u,c;if(c=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]},c.get?u=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(u=t.stylize("[Setter]","special")),L(n,o)||(i="["+o+"]"),u||(t.seen.indexOf(c.value)<0?(u=m(r)?a(t,c.value,null):a(t,c.value,r-1),u.indexOf("\n")>-1&&(u=s?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(i)){if(s&&o.match(/^\d+$/))return u;i=JSON.stringify(""+o),i.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=t.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=t.stylize(i,"string"))}return i+": "+u}function l(t,e,r){var n=0,o=t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>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 m(t){return null===t}function b(t){return null==t}function d(t){return"number"==typeof t}function y(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 P(t){return 10>t?"0"+t.toString(10):t.toString(10)}function U(){var t=new Date,e=[P(t.getHours()),P(t.getMinutes()),P(t.getSeconds())].join(":");return[t.getDate(),I[t.getMonth()],e].join(" ")}function L(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var k=/%[sdj%]/g;r.format=function(t){if(!y(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(n(arguments[r]));return e.join(" ")}for(var r=1,o=arguments,s=o.length,i=String(t).replace(k,function(t){if("%%"===t)return"%";if(r>=s)return t;switch(t){case"%s":return String(o[r++]);case"%d":return Number(o[r++]);case"%j":try{return JSON.stringify(o[r++])}catch(e){return"[Circular]"}default:return t}}),a=o[r];s>r;a=o[++r])i+=m(a)||!O(a)?" "+a:" "+n(a);return i},r.deprecate=function(t,e){function n(){if(!o){if(process.throwDeprecation)throw new Error(e);process.traceDeprecation?console.trace(e):console.error(e),o=!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 o=!1;return n};var D,q={};r.debuglog=function(t){if(v(D)&&(D=process.env.NODE_DEBUG||""),t=t.toUpperCase(),!q[t])if(new RegExp("\\b"+t+"\\b","i").test(D)){var e=process.pid;q[t]=function(){var n=r.format.apply(r,arguments);console.error("%s %d: %s",t,e,n)}}else q[t]=function(){};return q[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=m,r.isNullOrUndefined=b,r.isNumber=d,r.isString=y,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 I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",U(),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":19,inherits:18}],21:[function(t,e){function r(t,e,r,n,o){var s={result:t};return t||(s.path=e,s.reason=r,s.a=n,s.b=o),s}function n(t){for(var e=arguments,r=1,n=e.length;n>r;r++)t=t.replace(/%s/,e[r]);return t}function o(t,e,g,m,b){if(b=b||[],t===e)return r(0!==t||1/t==1/e,b,u.PLUS_0_AND_MINUS_0,t,e);var d,y=s(t),j=s(e);if(y!==j)return r(!1,b,n(u.DIFFERENT_TYPES,y,j),t,e);switch(y){case"number":return t!==t?r(e!==e,b,u.NAN_NUMBER,t,e):0===t?r(1/t===1/e,b,u.PLUS_0_AND_MINUS_0,t,e):r(t===e,b,u.EQUALITY,t,e);case"regexp":return r(String(t)===String(e),b,u.EQUALITY,t,e);case"boolean":case"string":return r(t===e,b,u.EQUALITY,t,e);case"date":return r(+t===+e,b,u.EQUALITY,t,e);case"object-number":case"object-boolean":case"object-string":var v=t.valueOf()===e.valueOf();if(v)break;return r(!1,b,u.WRAPPED_VALUE,t.valueOf(),e.valueOf());case"buffer":if(t.length!==e.length)return r(!1,b.concat(c),u.EQUALITY,t.length,e.length);for(d=t.length;d--;)if(t[d]!==e[d])return r(!1,b.concat([d]),u.EQUALITY,t[d],e[d]);return a;case"error":if(t.name!==e.name)return r(!1,b.concat(f),u.EQUALITY,t.name,e.name);if(t.message!==e.message)return r(!1,b.concat(p),u.EQUALITY,t.message,e.message);break;case"array-buffer":if(t.byteLength!==e.byteLength)return r(!1,b.concat(l),u.EQUALITY,t.byteLength,e.byteLength);for(d=t.byteLength;d--;)if(t[d]!==e[d])return r(!1,b.concat([d]),u.EQUALITY,t[d],e[d]);return a}for(g||(g=[]),m||(m=[]),d=g.length;d--;)if(g[d]==t)return r(m[d]==e,b,u.CIRCULAR_VALUES,t,e);g.push(t),m.push(e);var x,O,w;if(("array"===y||"arguments"===y)&&t.length!==e.length)return r(!1,b.concat(c),u.EQUALITY,t.length,e.length);if("function"===j){var E=t.toString(),S=e.toString();if(E!==S)return r(!1,b,u.FUNCTION_SOURCES,E,S)}for(w in e)if(i.call(e,w)){if(x=i.call(t,w),!x)return r(!1,b,n(u.MISSING_KEY,"A",w),t,e);if(O=o(t[w],e[w],g,m,b.concat([w])),!O.result)return O}for(w in t)if(i.call(t,w)&&(x=i.call(e,w),!x))return r(!1,b,n(u.MISSING_KEY,"B",w),t,e);return g.pop(),m.pop(),"function"!==j||(O=o(t.prototype,e.prototype,g,m,b.concat(h)),O.result)?a:O}var s=t("should-type"),i=Object.prototype.hasOwnProperty,a=r(!0),u={PLUS_0_AND_MINUS_0:"+0 is not equal to -0",DIFFERENT_TYPES:"A has type %s and B has type %s",NAN_NUMBER:"NaN is not equal to any number",EQUALITY:"A is not equal to B",WRAPPED_VALUE:"A wrapped value is not equal to B wrapped value",FUNCTION_SOURCES:"function A is not equal to B by source code value (via .toString call)",MISSING_KEY:"%s does not have key %s",CIRCULAR_VALUES:"A has circular reference that was visited not in the same time as B"},c=["length"],f=["name"],p=["message"],l=["byteLength"],h=["prototype"];e.exports=o},{"should-type":22}],22:[function(t,e){var r=Object.prototype.toString,n="undefined"!=typeof Promise,o="undefined"!=typeof Buffer,s="number",i="undefined",a="string",u="boolean",c="object",f="function",p="null",l="array",h="regexp",g="date",m="error",b="arguments",d="symbol",y="array-buffer",j="typed-array",v="data-view",x="map",O="set",w="weak-set",E="weak-map",S="promise",A="object-number",N="object-boolean",P="object-string",U="buffer",L="html-element",k="html-element-text",D="document",q="window",I="file",T="file-list",_="blob",M="xhr";e.exports=function(t){var e=typeof t;switch(e){case s:return s;case i:return i;case a:return a;case u:return u;case f:return f;case d:return d;case c:if(null===t)return p;var R=r.call(t);switch(R){case"[object String]":return P;case"[object Boolean]":return N;case"[object Number]":return A;case"[object Array]":return l;case"[object RegExp]":return h;case"[object Error]":return m;case"[object Date]":return g;case"[object Arguments]":return b;case"[object Math]":return c;case"[object JSON]":return c;case"[object ArrayBuffer]":return y;case"[object Int8Array]":return j;case"[object Uint8Array]":return j;case"[object Uint8ClampedArray]":return j;case"[object Int16Array]":return j;case"[object Uint16Array]":return j;case"[object Int32Array]":return j;case"[object Uint32Array]":return j;case"[object Float32Array]":return j;case"[object Float64Array]":return j;case"[object DataView]":return v;case"[object Map]":return x;case"[object WeakMap]":return E;case"[object Set]":return O;case"[object WeakSet]":return w;case"[object Promise]":return S;case"[object Window]":return q;case"[object HTMLDocument]":return D;case"[object Blob]":return _;case"[object File]":return I;case"[object FileList]":return T;case"[object XMLHttpRequest]":return M;case"[object Text]":return k;default:if(n&&t instanceof Promise)return S;if(o&&t instanceof Buffer)return U;if(/^\[object HTML\w+Element\]$/.test(R))return L;if("[object Object]"===R)return c}}}},{}],23:[function(t,e){function r(t){return function(e){var r=t(e);return r.sort(),r}}function n(t,e){g.formats[t]=e}function o(t){return" "+t}function s(t,e,r,n){n=n||e.keys(t);var s=0;return e.seen.push(t),n=n.map(function(r){var n=i(t,e,r);return s+=n.length,n}),e.seen.pop(),0===n.length?"{}":s<=e.maxLineLength?"{ "+(r?r+" ":"")+n.join(e.propSep+" ")+" }":"{\n"+(r?r+"\n":"")+n.map(o).join(e.propSep+"\n")+"\n}" | ||
}function i(t,e,r){var n;try{n=Object.getOwnPropertyDescriptor(t,r)||{value:t[r]}}catch(o){n={value:o}}var s=g.formatPropertyName(r,e),i=n.get&&n.set?"[Getter/Setter]":n.get?"[Getter]":n.set?"[Setter]":e.seen.indexOf(n.value)>=0?"[Circular]":g(n.value,e);return s+": "+i}function a(t){return 10>t?"0"+t:""+t}function u(t){return 100>t?"0"+a(t):""+t}function c(t){var e=t.getTimezoneOffset(),r=Math.abs(e),n=Math.floor(r/60),o=r-60*n,s="GMT"+(0>e?"+":"-")+a(n)+a(o);return t.toLocaleDateString()+" "+t.toLocaleTimeString()+"."+u(t.getMilliseconds())+" "+s}function f(t){return function(e,r){var n=t(e),o=r.keys(e);return 0==o.length?n:s(e,r,n,o)}}function p(t){if(t.name)return t.name;var e=t.toString().match(m)[1];return e}function l(t,e){return function(r){var n="",o=50,s=r[t];if(s>0){for(var i=0;o>i&&s>i;i++){var u=r[i]||0;n+=" "+a(u.toString(16))}s>o&&(n+=" ... ")}return"["+(r.constructor.name||e)+(n?":"+n:"")+"]"}}var h=t("should-type"),g=function(t,e){e=e||{},"seen"in e||(e.seen=[]),e.keys=r("keys"in e&&e.keys===!1?Object.getOwnPropertyNames:Object.keys),"maxLineLength"in e||(e.maxLineLength=60),"propSep"in e||(e.propSep=",");var n=h(t);return(g.formats[n]||g.formats.object)(t,e)};e.exports=g,g.formats={},["undefined","boolean","null"].forEach(function(t){n(t,String)}),["number","boolean"].forEach(function(t){var e=t.substring(0,1).toUpperCase()+t.substring(1);n("object-"+t,f(function(t){return"["+e+": "+g(t.valueOf())+"]"}))}),n("object-string",function(t,e){var r=t.valueOf(),n="[String: "+g(r)+"]",o=e.keys(t);return o=o.filter(function(t){return!(t.match(/\d+/)&&parseInt(t,10)<r.length)}),0==o.length?n:s(t,e,n,o)}),n("regexp",f(String)),n("number",function(t){return 0===t&&0>1/t?"-0":String(t)}),n("string",function(t){return"'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'"}),n("object",s),n("array",function(t,e){var r=e.keys(t),n=0;e.seen.push(t);var s=r.map(function(r){var o;try{o=Object.getOwnPropertyDescriptor(t,r)||{value:t[r]}}catch(s){o={value:s}}var a;return a=r.match(/\d+/)?g(o.value,e):i(o.value,e,r),n+=a.length,a});return e.seen.pop(),0===s.length?"[]":n<=e.maxLineLength?"[ "+s.join(e.propSep+" ")+" ]":"[\n"+s.map(o).join(e.propSep+"\n")+"\n]"}),g.formatPropertyName=function(t,e){return t.match(/^[a-zA-Z_$][a-zA-Z_$0-9]*$/)?t:g(t,e)},n("date",f(c));var m=/^\s*function\s*(\S*)\s*\(/;n("function",f(function(t){var e=p(t);return"[Function"+(e?": "+e:"")+"]"})),n("error",f(function(t){var e=t.name,r=t.message;return"["+e+(r?": "+r:"")+"]"})),n("buffer",l("length","Buffer")),n("array-buffer",l("byteLength")),n("typed-array",l("byteLength")),n("promise",function(){return"[Promise]"}),n("xhr",function(){return"[XMLHttpRequest]"}),n("html-element",function(t){return t.outerHTML}),n("html-element-text",function(t){return t.nodeValue}),n("document",function(t){return t.documentElement.outerHTML}),n("window",function(){return"[Window]"})},{"should-type":24}],24:[function(t,e){e.exports=t(22)},{"/Users/den/Projects/shouldjs/should/should.js/node_modules/should-equal/node_modules/should-type/index.js":22}]},{},[1])(1)}); | ||
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Should=t()}}(function(){return function t(e,r,n){function o(s,i){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!i&&u)return u(s,!0);if(a)return a(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var f=r[s]={exports:{}};e[s][0].call(f.exports,function(t){var r=e[s][1][t];return o(r?r:t)},f,f.exports,t,e,r,n)}return r[s].exports}for(var a="function"==typeof require&&require,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(t,e,r){var n=t("./util"),o=t("should-format"),a=t("./warn"),s=function c(t){a.staticShouldUnWrap(n.isWrapperType(t)&&c.warn);var e=n.isWrapperType(t)?t.valueOf():t;return new c.Assertion(e)},i="SHOULDJS_WARN",u="undefined"!=typeof process&&process.env[i]&&"true"===process.env[i];s.warn="undefined"==typeof u?!0:u,s.AssertionError=t("./assertion-error"),s.Assertion=t("./assertion"),s.format=o,r=e.exports=s,s.extend=function(t,e){t=t||"should",e=e||Object.prototype,Object.defineProperty(e,t,{set:function(){},get:function(){return s(n.isWrapperType(this)?this.valueOf():this)},configurable:!0})},s.extend("should",Object.prototype),s.use=function(t){return t(this,this.Assertion),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"))},{"./assertion":3,"./assertion-error":2,"./ext/assert":5,"./ext/bool":6,"./ext/chain":7,"./ext/contain":8,"./ext/eql":9,"./ext/error":10,"./ext/match":11,"./ext/number":12,"./ext/property":13,"./ext/string":14,"./ext/type":15,"./util":16,"./warn":17,"should-format":24}],2:[function(t,e){var r=t("./util"),n=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,this.message=t.message;var e=t.stackStartFunction;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var n=new Error;if(n.stack){var o=n.stack;if(e){var a=r.functionName(e),s=o.indexOf("\n"+a);if(s>=0){var i=o.indexOf("\n",s+1);o=o.substring(i+1)}}this.stack=o}}};n.prototype=Object.create(Error.prototype),e.exports=n},{"./util":16}],3:[function(t,e){function r(t){this.obj=t}function n(t){return i+t}function o(t){return t.split("\n").map(n).join("\n")}var a=t("./assertion-error"),s=(t("./util"),t("should-format"));r.add=function(t,e,n){var o={enumerable:!0};o[n?"get":"value"]=function(){var t=new r(this.obj,s);t.anyOne=this.anyOne;try{e.apply(t,arguments)}catch(n){if(this.params=t.params,n instanceof a){if(this.negate)return this.obj=t.obj,this.negate=!1,this;this.nestedErrorMessage=n.message,this.fail()}throw n}return this.params=t.params,this.negate&&(t.negate=!0,this.nestedErrorMessage=t.params.message?t.params.message:t.getMessage(),this.fail()),this.obj=t.obj,this.negate=!1,this},Object.defineProperty(r.prototype,t,o)},r.alias=function(t,e){var n=Object.getOwnPropertyDescriptor(r.prototype,t);if(!n)throw new Error("Alias "+t+" -> "+e+" could not be created as "+t+" not defined");Object.defineProperty(r.prototype,e,n)};var i=" ";r.prototype={constructor:r,assert:function(t){if(t)return this;var e=this.params,r=e.message,n=!1;r||(r=this.getMessage(),n=!0),this.nestedErrorMessage&&r!=this.nestedErrorMessage&&(r=r+"\n"+o(this.nestedErrorMessage));var s=new a({message:r,actual:this.obj,expected:e.expected,stackStartFunction:e.stackStartFunction||this.assert});throw s.showDiff=e.showDiff,s.operator=e.operator,s.generatedMessage=n,s},fail:function(){return this.assert(!1)},getMessage:function(){var t=s("obj"in this.params?this.params.obj:this.obj),e="expected"in this.params?" "+s(this.params.expected):"",r="details"in this.params&&this.params.details?" ("+this.params.details+")":"";return"expected "+t+(this.negate?" not ":" ")+this.params.operator+e+r},get not(){return this.negate=!this.negate,this},get any(){return this.anyOne=!0,this}},e.exports=r},{"./assertion-error":2,"./util":16,"should-format":24}],4:[function(t,e){function r(t,e,n,o,a){var s=new i(t);s.params={operator:o,expected:e,message:n,stackStartFunction:a||r},s.fail()}function n(t,e){t||r(t,!0,e,"==",f.ok)}function o(t,e){return t&&e?"[object RegExp]"==Object.prototype.toString.call(e)?e.test(t):t instanceof e?!0:e.call({},t)===!0?!0:!1:!1}function a(t,e,n,a){var i;s.isString(n)&&(a=n,n=null);try{e()}catch(u){i=u}if(a=(n&&n.name?" ("+n.name+")":".")+(a?" "+a:"."),t&&!i&&r(i,n,"Missing expected exception"+a),!t&&o(i,n)&&r(i,n,"Got unwanted exception"+a),t&&i&&n&&!o(i,n)||!t&&i)throw i}var s=t("./../util"),i=t("./../assertion"),u=t("should-equal"),c=Array.prototype.slice,f=e.exports=n;f.fail=r,f.ok=n,f.equal=function(t,e,n){t!=e&&r(t,e,n,"==",f.equal)},f.notEqual=function(t,e,n){t==e&&r(t,e,n,"!=",f.notEqual)},f.deepEqual=function(t,e,n){u(t,e).result||r(t,e,n,"deepEqual",f.deepEqual)},f.notDeepEqual=function(t,e,n){u(t,e).result&&r(t,e,n,"notDeepEqual",f.notDeepEqual)},f.strictEqual=function(t,e,n){t!==e&&r(t,e,n,"===",f.strictEqual)},f.notStrictEqual=function(t,e,n){t===e&&r(t,e,n,"!==",f.notStrictEqual)},f.throws=function(){a.apply(this,[!0].concat(c.call(arguments)))},f.doesNotThrow=function(){a.apply(this,[!1].concat(c.call(arguments)))},f.ifError=function(t){if(t)throw t}},{"./../assertion":3,"./../util":16,"should-equal":22}],5:[function(t,e){var r=t("../util"),n=t("./_assert"),o=t("../assertion-error");e.exports=function(t){var e=t.format;r.merge(t,n),t.exist=t.exists=function(r,n){if(null==r)throw new o({message:n||"expected "+e(r)+" to exist",stackStartFunction:t.exist})},t.not={},t.not.exist=t.not.exists=function(r,n){if(null!=r)throw new o({message:n||"expected "+e(r)+" to not exist",stackStartFunction:t.not.exist})}}},{"../assertion-error":2,"../util":16,"./_assert":4}],6:[function(t,e){e.exports=function(t,e){e.add("true",function(){this.is.exactly(!0)},!0),e.alias("true","True"),e.add("false",function(){this.is.exactly(!1)},!0),e.alias("false","False"),e.add("ok",function(){this.params={operator:"to be truthy"},this.assert(this.obj)},!0)}},{}],7:[function(t,e){e.exports=function(t,e){function r(t){Object.defineProperty(e.prototype,t,{get:function(){return this},enumerable:!0})}["an","of","a","and","be","have","with","is","which","the"].forEach(r)}},{}],8:[function(t,e){var r=t("../util"),n=t("should-equal");e.exports=function(t,e){var o=t.format;e.add("containEql",function(t){this.params={operator:"to contain "+o(t)};var e=this.obj;r.isArray(e)?this.assert(e.some(function(e){return n(e,t).result})):r.isString(e)?this.assert(e.indexOf(String(t))>=0):r.isObject(e)?r.forOwn(t,function(t,r){e.should.have.property(r,t)}):this.assert(!1)}),e.add("containDeepOrdered",function(e){this.params={operator:"to contain "+o(e)};var n=this.obj;if(r.isArray(n))if(r.isArray(e)){var a=0;n.forEach(function(r){try{t(r).not.be.Null.and.containDeep(e[a]),a++}catch(n){if(n instanceof t.AssertionError)return;throw n}},this),this.assert(a==e.length)}else this.assert(!1);else r.isString(n)?this.assert(n.indexOf(String(e))>=0):r.isObject(n)?r.isObject(e)?r.forOwn(e,function(e,r){t(n[r]).not.be.Null.and.containDeep(e)}):this.assert(!1):this.eql(e)}),e.add("containDeep",function(e){this.params={operator:"to contain "+o(e)};var n=this.obj;if(r.isArray(n))if(r.isArray(e)){var a={};e.forEach(function(e){this.assert(n.some(function(r,n){if(n in a)return!1;try{return t(r).not.be.Null.and.containDeep(e),a[n]=!0,!0}catch(o){if(o instanceof t.AssertionError)return!1;throw o}}))},this)}else this.assert(!1);else r.isString(n)?this.assert(n.indexOf(String(e))>=0):r.isObject(n)?r.isObject(e)?r.forOwn(e,function(e,r){t(n[r]).not.be.Null.and.containDeep(e)}):this.assert(!1):this.eql(e)})}},{"../util":16,"should-equal":22}],9:[function(t,e){var r=t("should-equal"),n=(t("../warn"),t("../util"));e.exports=function(t,e){e.add("eql",function(e,o){this.params={operator:"to equal",expected:e,showDiff:!0,message:o};var a=r(this.obj,e);a.result||(this.params.details=n.formatEqlResult(a,this.obj,e,t.format)),this.assert(a.result)}),e.add("equal",function(t,e){this.params={operator:"to be",expected:t,showDiff:!0,message:e},this.assert(t===this.obj)}),e.alias("equal","exactly")}},{"../util":16,"../warn":17,"should-equal":22}],10:[function(t,e){var r=t("../util");e.exports=function(t,e){var n=t.format;e.add("throw",function(e,o){var a=this.obj,s={},i="",u=!1;this.is.a.Function;var c=!0;try{a()}catch(f){u=!0,s=f}if(u)if(e){if("string"==typeof e)c=e==s.message;else if(e instanceof RegExp)c=e.test(s.message);else if("function"==typeof e)c=s instanceof e;else if(r.isObject(e))try{s.should.match(e)}catch(f){if(!(f instanceof t.AssertionError))throw f;i=": "+f.message,c=!1}if(c){if("function"==typeof e&&o)try{s.should.match(o)}catch(f){if(!(f instanceof t.AssertionError))throw f;i=": "+f.message,c=!1}}else"string"==typeof e||e instanceof RegExp?i=" with a message matching "+n(e)+", but got '"+s.message+"'":"function"==typeof e&&(i=" of type "+r.functionName(e)+", but got "+r.functionName(s.constructor))}else i=" (got "+n(s)+")";this.params={operator:"to throw exception"+i},this.assert(u),this.assert(c)}),e.alias("throw","throwError")}},{"../util":16}],11:[function(t,e){var r=t("../util"),n=t("should-equal");e.exports=function(t,e){var o=t.format;e.add("match",function(a,s){if(this.params={operator:"to match "+o(a),message:s},!n(this.obj,a).result)if(r.isRegExp(a)){if(r.isString(this.obj))this.assert(a.exec(this.obj));else if(r.isArray(this.obj))this.obj.forEach(function(t){this.assert(a.exec(t))},this);else if(r.isObject(this.obj)){var i=[],u=[];r.forOwn(this.obj,function(t,e){a.exec(t)?u.push(r.formatProp(e)):i.push(r.formatProp(e)+" ("+o(t)+")")},this),i.length&&(this.params.operator+="\n not matched properties: "+i.join(", ")),u.length&&(this.params.operator+="\n matched properties: "+u.join(", ")),this.assert(0==i.length)}}else if(r.isFunction(a)){var c;c=a(this.obj),c instanceof e&&(this.params.operator+="\n "+c.getMessage()),r.isBoolean(c)&&this.assert(c)}else r.isObject(a)?(i=[],u=[],r.forOwn(a,function(e,n){try{t(this.obj[n]).match(e),u.push(r.formatProp(n))}catch(a){if(!(a instanceof t.AssertionError))throw a;i.push(r.formatProp(n)+" ("+o(this.obj[n])+")")}},this),i.length&&(this.params.operator+="\n not matched properties: "+i.join(", ")),u.length&&(this.params.operator+="\n matched properties: "+u.join(", ")),this.assert(0==i.length)):this.assert(!1)}),e.add("matchEach",function(t,e){this.params={operator:"to match each "+o(t),message:e};var a=t;r.isRegExp(t)?a=function(e){return!!t.exec(e)}:r.isFunction(t)||(a=function(e){return n(e,t).result}),r.forOwn(this.obj,function(t,e){var n=a(t,e);r.isBoolean(n)&&this.assert(n)},this)})}},{"../util":16,"should-equal":22}],12:[function(t,e){e.exports=function(t,e){e.add("NaN",function(){this.params={operator:"to be NaN"},this.assert(this.obj!==this.obj)},!0),e.add("Infinity",function(){this.params={operator:"to be Infinity"},this.obj.should.be.a.Number.and.not.a.NaN.and.assert(!isFinite(this.obj))},!0),e.add("within",function(t,e,r){this.params={operator:"to be within "+t+".."+e,message:r},this.assert(this.obj>=t&&this.obj<=e)}),e.add("approximately",function(t,e,r){this.params={operator:"to be approximately "+t+" ±"+e,message:r},this.assert(Math.abs(this.obj-t)<=e)}),e.add("above",function(t,e){this.params={operator:"to be above "+t,message:e},this.assert(this.obj>t)}),e.add("below",function(t,e){this.params={operator:"to be below "+t,message:e},this.assert(this.obj<t)}),e.alias("above","greaterThan"),e.alias("below","lessThan")}},{}],13:[function(t,e){var r=t("../util"),n=t("should-equal"),o=Array.prototype.slice;e.exports=function(t,e){var a=t.format;e.add("enumerable",function(t,e){t=String(t),this.params={operator:"to have enumerable property "+r.formatProp(t)},this.assert(this.obj.propertyIsEnumerable(t)),arguments.length>1&&(this.params.operator+=" equal to "+a(e),this.assert(n(e,this.obj[t]).result))}),e.add("property",function(t,e){if(t=String(t),arguments.length>1){var r={};r[t]=e,this.have.properties(r)}else this.have.properties(t);this.obj=this.obj[t]}),e.add("properties",function(t){var e={};arguments.length>1?t=o.call(arguments):r.isArray(t)||(r.isString(t)?t=[t]:(e=t,t=Object.keys(t)));var s=Object(this.obj),i=[];t.forEach(function(t){t in s||i.push(r.formatProp(t))});var u=i;0===u.length?u=t.map(r.formatProp):this.anyOne&&(u=t.filter(function(t){return i.indexOf(r.formatProp(t))<0}).map(r.formatProp));var c=(1===u.length?"to have property ":"to have "+(this.anyOne?"any of ":"")+"properties ")+u.join(", ");this.params={obj:this.obj,operator:c},this.assert(0===i.length||this.anyOne&&i.length!=t.length);var f=Object.keys(e);if(f.length){var p=[];u=[],f.forEach(function(t){var o=e[t];n(s[t],o).result?u.push(r.formatProp(t)+" of "+a(o)):p.push(r.formatProp(t)+" of "+a(o)+" (got "+a(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={obj:this.obj,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={obj:this.obj,operator:"to have own property "+r.formatProp(t),message:e},this.assert(s.call(this.obj,t)),this.obj=this.obj[t]}),e.alias("ownProperty","hasOwnProperty"),e.add("empty",function(){if(this.params={operator:"to be empty"},r.isString(this.obj)||r.isArray(this.obj)||r.isArguments(this.obj))this.obj.should.have.property("length",0);else{var t=Object(this.obj);for(var e in t)this.obj.should.not.ownProperty(e)}},!0),e.add("keys",function(t){arguments.length>1?t=o.call(arguments):1===arguments.length&&r.isString(t)?t=[t]:0===arguments.length&&(t=[]),t=t.map(String);var e=Object(this.obj),n=[];t.forEach(function(t){s.call(this.obj,t)||n.push(r.formatProp(t))},this);var a=[];Object.keys(e).forEach(function(e){t.indexOf(e)<0&&a.push(r.formatProp(e))});var i=0===t.length?"to be empty":"to have "+(1===t.length?"key ":"keys ");this.params={operator:i+t.map(r.formatProp).join(", ")},n.length>0&&(this.params.operator+="\n missing keys: "+n.join(", ")),a.length>0&&(this.params.operator+="\n extra keys: "+a.join(", ")),this.assert(0===n.length&&0===a.length)}),e.alias("keys","key"),e.add("propertyByPath",function(e){arguments.length>1?e=o.call(arguments):1===arguments.length&&r.isString(e)?e=[e]:0===arguments.length&&(e=[]);var n=e.map(r.formatProp);e=e.map(String);for(var a,s=t(Object(this.obj)),i=[];a=e.shift();)this.params={operator:"to have property by path "+n.join(", ")+" - failed on "+r.formatProp(a)},s=s.have.property(a),i.push(a);this.params={obj:this.obj,operator:"to have property by path "+n.join(", ")},this.obj=s.obj})}},{"../util":16,"should-equal":22}],14:[function(t,e){e.exports=function(t,e){e.add("startWith",function(e,r){this.params={operator:"to start with "+t.format(e),message:r},this.assert(0===this.obj.indexOf(e))}),e.add("endWith",function(e,r){this.params={operator:"to end with "+t.format(e),message:r},this.assert(this.obj.indexOf(e,this.obj.length-e.length)>=0)})}},{}],15:[function(t,e){var r=t("../util");e.exports=function(t,e){e.add("Number",function(){this.params={operator:"to be a number"},this.assert(r.isNumber(this.obj))},!0),e.add("arguments",function(){this.params={operator:"to be arguments"},this.assert(r.isArguments(this.obj))},!0),e.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":16}],16:[function(t,e,r){function n(t){return f(t)&&(t.__ArrayLike||Array.isArray(t))}function o(t){return"number"==typeof t}function a(t){return"string"==typeof t}function s(t){return"boolean"==typeof t}function i(t){return"undefined"!=typeof Buffer&&t instanceof Buffer}function u(t){return f(t)&&"[object Date]"===c(t)}function c(t){return Object.prototype.toString.call(t)}function f(t){return"object"==typeof t&&null!==t}function 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 m(t){return f(t)&&"[object Error]"===c(t)||t instanceof Error}function b(t){return void 0===t}r.isWrapperType=function(t){return t instanceof Number||t instanceof String||t instanceof Boolean},r.merge=function(t,e){if(t&&e)for(var r in e)t[r]=e[r];return t},r.isArray=n,r.isNumber=o,r.isBoolean=s,r.isString=a,r.isBuffer=i,r.isDate=u,r.isObject=f,r.isRegExp=p,r.isNullOrUndefined=l,r.isNull=h,r.isArguments=g,r.isFunction=function(t){return"function"==typeof t||t instanceof Function},r.isError=m,r.isUndefined=b,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 y=/^\s*function\s*(\S*)\s*\(/;r.functionName=function(t){if(t.name)return t.name;var e=t.toString().match(y)[1];return e};var j=t("should-format").formatPropertyName;r.formatProp=function(t){return j(String(t))},r.formatEqlResult=function(t,e,n,o){return(t.path.length>0?"at "+t.path.map(r.formatProp).join(" -> "):"")+(t.a===e?"":", A has "+o(t.a))+(t.b===n?"":" and B has "+o(t.b))}},{assert:18,"should-format":24}],17:[function(t,e,r){function n(t){return function(e){e&&t.concat(a).forEach(function(t){console.warn(o,t)})}}var o="[33mWARN[39m",a=["To disable any warnings add [33mshould.warn = false[39m","If you think that is not right, raise issue on github https://github.com/shouldjs/should.js/issues"];r.staticShouldUnWrap=n(["Static version of should was called with primitive type wrapper like should(new Number(10))","current version will unwrap it to assert on primitive value for you","but that will be changed in future versions, make sure you know what are you doing"])},{}],18:[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 o(t){return n(JSON.stringify(t.actual,r),128)+" "+t.operator+" "+n(JSON.stringify(t.expected,r),128)}function a(t,e,r,n,o){throw new m.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:o})}function s(t,e){t||a(t,!0,e,"==",m.ok)}function i(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),i(t,e)):!1;try{var r,n,o=b(t),a=b(e)}catch(s){return!1}if(o.length!=a.length)return!1;for(o.sort(),a.sort(),n=o.length-1;n>=0;n--)if(o[n]!=a[n])return!1;for(n=o.length-1;n>=0;n--)if(r=o[n],!i(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 o;l.isString(r)&&(n=r,r=null);try{e()}catch(s){o=s}if(n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!o&&a(o,r,"Missing expected exception"+n),!t&&f(o,r)&&a(o,r,"Got unwanted exception"+n),t&&o&&r&&!f(o,r)||!t&&o)throw o}var l=t("util/"),h=Array.prototype.slice,g=Object.prototype.hasOwnProperty,m=e.exports=s;m.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=o(this),this.generatedMessage=!0);var e=t.stackStartFunction||a;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,s=e.name,i=n.indexOf("\n"+s);if(i>=0){var u=n.indexOf("\n",i+1);n=n.substring(u+1)}this.stack=n}}},l.inherits(m.AssertionError,Error),m.fail=a,m.ok=s,m.equal=function(t,e,r){t!=e&&a(t,e,r,"==",m.equal)},m.notEqual=function(t,e,r){t==e&&a(t,e,r,"!=",m.notEqual)},m.deepEqual=function(t,e,r){i(t,e)||a(t,e,r,"deepEqual",m.deepEqual)},m.notDeepEqual=function(t,e,r){i(t,e)&&a(t,e,r,"notDeepEqual",m.notDeepEqual)},m.strictEqual=function(t,e,r){t!==e&&a(t,e,r,"===",m.strictEqual)},m.notStrictEqual=function(t,e,r){t===e&&a(t,e,r,"!==",m.notStrictEqual)},m.throws=function(){p.apply(this,[!0].concat(h.call(arguments)))},m.doesNotThrow=function(){p.apply(this,[!1].concat(h.call(arguments)))},m.ifError=function(t){if(t)throw t};var b=Object.keys||function(t){var e=[];for(var r in t)g.call(t,r)&&e.push(r);return e}},{"util/":21}],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}},{}],20:[function(t,e){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],21:[function(t,e,r){function n(t,e){var n={seen:[],stylize:a};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),E(n.showHidden)&&(n.showHidden=!1),E(n.depth)&&(n.depth=2),E(n.colors)&&(n.colors=!1),E(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),i(n,t,n.depth)}function o(t,e){var r=n.styles[e];return r?"["+n.colors[r][0]+"m"+t+"["+n.colors[r][1]+"m":t}function a(t){return t}function s(t){var e={};return t.forEach(function(t){e[t]=!0}),e}function i(t,e,n){if(t.customInspect&&e&&S(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var o=e.inspect(n,t);return y(o)||(o=i(t,o,n)),o}var a=u(t,e);if(a)return a;var g=Object.keys(e),m=s(g);if(t.showHidden&&(g=Object.getOwnPropertyNames(e)),A(e)&&(g.indexOf("message")>=0||g.indexOf("description")>=0))return c(e);if(0===g.length){if(S(e)){var b=e.name?": "+e.name:"";return t.stylize("[Function"+b+"]","special")}if(v(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(x(e))return t.stylize(Date.prototype.toString.call(e),"date");if(A(e))return c(e)}var d="",j=!1,E=["{","}"];if(h(e)&&(j=!0,E=["[","]"]),S(e)){var O=e.name?": "+e.name:"";d=" [Function"+O+"]"}if(v(e)&&(d=" "+RegExp.prototype.toString.call(e)),x(e)&&(d=" "+Date.prototype.toUTCString.call(e)),A(e)&&(d=" "+c(e)),0===g.length&&(!j||0==e.length))return E[0]+d+E[1];if(0>n)return v(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var w;return w=j?f(t,e,n,m,g):g.map(function(r){return p(t,e,n,m,r,j)}),t.seen.pop(),l(w,d,E)}function u(t,e){if(E(e))return t.stylize("undefined","undefined");if(y(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"):m(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,r,n,o){for(var a=[],s=0,i=e.length;i>s;++s)a.push(P(e,String(s))?p(t,e,r,n,String(s),!0):"");return o.forEach(function(o){o.match(/^\d+$/)||a.push(p(t,e,r,n,o,!0))}),a}function p(t,e,r,n,o,a){var s,u,c;if(c=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]},c.get?u=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(u=t.stylize("[Setter]","special")),P(n,o)||(s="["+o+"]"),u||(t.seen.indexOf(c.value)<0?(u=m(r)?i(t,c.value,null):i(t,c.value,r-1),u.indexOf("\n")>-1&&(u=a?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")),E(s)){if(a&&o.match(/^\d+$/))return u;s=JSON.stringify(""+o),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,o=t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>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 m(t){return null===t}function b(t){return null==t}function d(t){return"number"==typeof t}function y(t){return"string"==typeof t}function j(t){return"symbol"==typeof t}function E(t){return void 0===t}function v(t){return O(t)&&"[object RegExp]"===N(t)}function O(t){return"object"==typeof t&&null!==t}function x(t){return O(t)&&"[object Date]"===N(t)}function A(t){return O(t)&&("[object Error]"===N(t)||t instanceof Error)}function S(t){return"function"==typeof t}function w(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 R(t){return 10>t?"0"+t.toString(10):t.toString(10)}function T(){var t=new Date,e=[R(t.getHours()),R(t.getMinutes()),R(t.getSeconds())].join(":");return[t.getDate(),D[t.getMonth()],e].join(" ")}function P(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var _=/%[sdj%]/g;r.format=function(t){if(!y(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(n(arguments[r]));return e.join(" ")}for(var r=1,o=arguments,a=o.length,s=String(t).replace(_,function(t){if("%%"===t)return"%";if(r>=a)return t;switch(t){case"%s":return String(o[r++]);case"%d":return Number(o[r++]);case"%j":try{return JSON.stringify(o[r++])}catch(e){return"[Circular]"}default:return t}}),i=o[r];a>r;i=o[++r])s+=m(i)||!O(i)?" "+i:" "+n(i);return s},r.deprecate=function(t,e){function n(){if(!o){if(process.throwDeprecation)throw new Error(e);process.traceDeprecation?console.trace(e):console.error(e),o=!0}return t.apply(this,arguments)}if(E(global.process))return function(){return r.deprecate(t,e).apply(this,arguments)};if(process.noDeprecation===!0)return t;var o=!1;return n};var L,U={};r.debuglog=function(t){if(E(L)&&(L=process.env.NODE_DEBUG||""),t=t.toUpperCase(),!U[t])if(new RegExp("\\b"+t+"\\b","i").test(L)){var e=process.pid;U[t]=function(){var n=r.format.apply(r,arguments);console.error("%s %d: %s",t,e,n)}}else U[t]=function(){};return U[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=m,r.isNullOrUndefined=b,r.isNumber=d,r.isString=y,r.isSymbol=j,r.isUndefined=E,r.isRegExp=v,r.isObject=O,r.isDate=x,r.isError=A,r.isFunction=S,r.isPrimitive=w,r.isBuffer=t("./support/isBuffer");var D=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",T(),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":20,inherits:19}],22:[function(t,e){function r(t,e,r,n,o){var a={result:t};return t||(a.path=e,a.reason=r,a.a=n,a.b=o),a}function n(t){for(var e=arguments,r=1,n=e.length;n>r;r++)t=t.replace(/%s/,e[r]);return t}function o(t,e,g,m,b){if(b=b||[],t===e)return r(0!==t||1/t==1/e,b,u.PLUS_0_AND_MINUS_0,t,e);var d,y,j=a(t),E=a(e);if(j!==E)return r(!1,b,n(u.DIFFERENT_TYPES,j,E),t,e);switch(j){case"number":return t!==t?r(e!==e,b,u.NAN_NUMBER,t,e):0===t?r(1/t===1/e,b,u.PLUS_0_AND_MINUS_0,t,e):r(t===e,b,u.EQUALITY,t,e);case"regexp":if(y=t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase)break;return r(!1,b,u.EQUALITY,t,e);case"boolean":case"string":return r(t===e,b,u.EQUALITY,t,e);case"date":if(y=+t===+e)break;return r(!1,b,u.EQUALITY,t,e);case"object-number":case"object-boolean":case"object-string":if(y=t.valueOf()===e.valueOf())break;return r(!1,b,u.WRAPPED_VALUE,t.valueOf(),e.valueOf());case"buffer":if(t.length!==e.length)return r(!1,b.concat(c),u.EQUALITY,t.length,e.length);for(d=t.length;d--;)if(t[d]!==e[d])return r(!1,b.concat([d]),u.EQUALITY,t[d],e[d]);return i;case"error":if(t.name!==e.name)return r(!1,b.concat(f),u.EQUALITY,t.name,e.name);if(t.message!==e.message)return r(!1,b.concat(p),u.EQUALITY,t.message,e.message);break;case"array-buffer":if(t.byteLength!==e.byteLength)return r(!1,b.concat(l),u.EQUALITY,t.byteLength,e.byteLength);for(d=t.byteLength;d--;)if(t[d]!==e[d])return r(!1,b.concat([d]),u.EQUALITY,t[d],e[d]);return i}for(g||(g=[]),m||(m=[]),d=g.length;d--;)if(g[d]==t)return r(m[d]==e,b,u.CIRCULAR_VALUES,t,e);g.push(t),m.push(e);var v,O,x;if(("array"===j||"arguments"===j)&&t.length!==e.length)return r(!1,b.concat(c),u.EQUALITY,t.length,e.length);if("function"===E){var A=t.toString(),S=e.toString();if(A!==S)return r(!1,b,u.FUNCTION_SOURCES,A,S)}for(x in e)if(s.call(e,x)){if(v=s.call(t,x),!v)return r(!1,b,n(u.MISSING_KEY,"A",x),t,e);if(O=o(t[x],e[x],g,m,b.concat([x])),!O.result)return O}for(x in t)if(s.call(t,x)&&(v=s.call(e,x),!v))return r(!1,b,n(u.MISSING_KEY,"B",x),t,e);var w=!1,N=!1;return Object.getPrototypeOf?(w=Object.getPrototypeOf(t)===Object.getPrototypeOf(e),N=!0):t.__proto__&&e.__proto__&&(w=t.__proto__===e.__proto__,N=!0),N&&!w?r(!1,b,u.EQUALITY_PROTOTYPE,t,e):(g.pop(),m.pop(),"function"!==E||(O=o(t.prototype,e.prototype,g,m,b.concat(h)),O.result)?i:O)}var a=t("should-type"),s=Object.prototype.hasOwnProperty,i=r(!0),u={PLUS_0_AND_MINUS_0:"+0 is not equal to -0",DIFFERENT_TYPES:"A has type %s and B has type %s",NAN_NUMBER:"NaN is not equal to any number",EQUALITY:"A is not equal to B",EQUALITY_PROTOTYPE:"A and B have different prototypes",WRAPPED_VALUE:"A wrapped value is not equal to B wrapped value",FUNCTION_SOURCES:"function A is not equal to B by source code value (via .toString call)",MISSING_KEY:"%s does not have key %s",CIRCULAR_VALUES:"A has circular reference that was visited not in the same time as B"},c=["length"],f=["name"],p=["message"],l=["byteLength"],h=["prototype"];e.exports=o},{"should-type":23}],23:[function(t,e){var r=Object.prototype.toString,n="undefined"!=typeof Promise,o="undefined"!=typeof Buffer,a={NUMBER:"number",UNDEFINED:"undefined",STRING:"string",BOOLEAN:"boolean",OBJECT:"object",FUNCTION:"function",NULL:"null",ARRAY:"array",REGEXP:"regexp",DATE:"date",ERROR:"error",ARGUMENTS:"arguments",SYMBOL:"symbol",ARRAY_BUFFER:"array-buffer",TYPED_ARRAY:"typed-array",DATA_VIEW:"data-view",MAP:"map",SET:"set",WEAK_SET:"weak-set",WEAK_MAP:"weak-map",PROMISE:"promise",WRAPPER_NUMBER:"object-number",WRAPPER_BOOLEAN:"object-boolean",WRAPPER_STRING:"object-string",BUFFER:"buffer",HTML_ELEMENT:"html-element",HTML_ELEMENT_TEXT:"html-element-text",DOCUMENT:"document",WINDOW:"window",FILE:"file",FILE_LIST:"file-list",BLOB:"blob",XHR:"xhr"}; | ||
e.exports=function s(t){var e=typeof t;switch(e){case a.NUMBER:return a.NUMBER;case a.UNDEFINED:return a.UNDEFINED;case a.STRING:return a.STRING;case a.BOOLEAN:return a.BOOLEAN;case a.FUNCTION:return a.FUNCTION;case a.SYMBOL:return a.SYMBOL;case a.OBJECT:if(null===t)return a.NULL;var i=r.call(t);switch(i){case"[object String]":return a.WRAPPER_STRING;case"[object Boolean]":return a.WRAPPER_BOOLEAN;case"[object Number]":return a.WRAPPER_NUMBER;case"[object Array]":return a.ARRAY;case"[object RegExp]":return a.REGEXP;case"[object Error]":return a.ERROR;case"[object Date]":return a.DATE;case"[object Arguments]":return a.ARGUMENTS;case"[object Math]":return a.OBJECT;case"[object JSON]":return a.OBJECT;case"[object ArrayBuffer]":return a.ARRAY_BUFFER;case"[object Int8Array]":return a.TYPED_ARRAY;case"[object Uint8Array]":return a.TYPED_ARRAY;case"[object Uint8ClampedArray]":return a.TYPED_ARRAY;case"[object Int16Array]":return a.TYPED_ARRAY;case"[object Uint16Array]":return a.TYPED_ARRAY;case"[object Int32Array]":return a.TYPED_ARRAY;case"[object Uint32Array]":return a.TYPED_ARRAY;case"[object Float32Array]":return a.TYPED_ARRAY;case"[object Float64Array]":return a.TYPED_ARRAY;case"[object DataView]":return a.DATA_VIEW;case"[object Map]":return a.MAP;case"[object WeakMap]":return a.WEAK_MAP;case"[object Set]":return a.SET;case"[object WeakSet]":return a.WEAK_SET;case"[object Promise]":return a.PROMISE;case"[object Window]":return a.WINDOW;case"[object HTMLDocument]":return a.DOCUMENT;case"[object Blob]":return a.BLOB;case"[object File]":return a.FILE;case"[object FileList]":return a.FILE_LIST;case"[object XMLHttpRequest]":return a.XHR;case"[object Text]":return a.HTML_ELEMENT_TEXT;default:if(n&&t instanceof Promise&&s(t.then)===FUNCTION&&t.then.length>=2)return a.PROMISE;if(o&&t instanceof Buffer)return a.BUFFER;if(/^\[object HTML\w+Element\]$/.test(i))return a.HTML_ELEMENT;if("[object Object]"===i)return a.OBJECT}}},e.exports.type=a},{}],24:[function(t,e){function r(t){return function(e){var r=t(e);return r.sort(),r}}function n(t,e){g.formats[t]=e}function o(t){return" "+t}function a(t,e,r,n){n=n||e.keys(t);var a=0;return e.seen.push(t),n=n.map(function(r){var n=s(t,e,r);return a+=n.length,n}),e.seen.pop(),0===n.length?"{}":a<=e.maxLineLength?"{ "+(r?r+" ":"")+n.join(e.propSep+" ")+" }":"{\n"+(r?r+"\n":"")+n.map(o).join(e.propSep+"\n")+"\n}"}function s(t,e,r){var n;try{n=Object.getOwnPropertyDescriptor(t,r)||{value:t[r]}}catch(o){n={value:o}}var a=g.formatPropertyName(r,e),s=n.get&&n.set?"[Getter/Setter]":n.get?"[Getter]":n.set?"[Setter]":e.seen.indexOf(n.value)>=0?"[Circular]":g(n.value,e);return a+": "+s}function i(t){return 10>t?"0"+t:""+t}function u(t){return 100>t?"0"+i(t):""+t}function c(t){var e=t.getTimezoneOffset(),r=Math.abs(e),n=Math.floor(r/60),o=r-60*n,a="GMT"+(0>e?"+":"-")+i(n)+i(o);return t.toLocaleDateString()+" "+t.toLocaleTimeString()+"."+u(t.getMilliseconds())+" "+a}function f(t){return function(e,r){var n=t(e),o=r.keys(e);return 0==o.length?n:a(e,r,n,o)}}function p(t){if(t.name)return t.name;var e=t.toString().match(m)[1];return e}function l(t,e){return function(r){var n="",o=50,a=r[t];if(a>0){for(var s=0;o>s&&a>s;s++){var u=r[s]||0;n+=" "+i(u.toString(16))}a>o&&(n+=" ... ")}return"["+(r.constructor.name||e)+(n?":"+n:"")+"]"}}var h=t("should-type"),g=function(t,e){e=e||{},"seen"in e||(e.seen=[]),e.keys=r("keys"in e&&e.keys===!1?Object.getOwnPropertyNames:Object.keys),"maxLineLength"in e||(e.maxLineLength=60),"propSep"in e||(e.propSep=",");var n=h(t);return(g.formats[n]||g.formats.object)(t,e)};e.exports=g,g.formats={},["undefined","boolean","null"].forEach(function(t){n(t,String)}),["number","boolean"].forEach(function(t){var e=t.substring(0,1).toUpperCase()+t.substring(1);n("object-"+t,f(function(t){return"["+e+": "+g(t.valueOf())+"]"}))}),n("object-string",function(t,e){var r=t.valueOf(),n="[String: "+g(r)+"]",o=e.keys(t);return o=o.filter(function(t){return!(t.match(/\d+/)&&parseInt(t,10)<r.length)}),0==o.length?n:a(t,e,n,o)}),n("regexp",f(String)),n("number",function(t){return 0===t&&0>1/t?"-0":String(t)}),n("string",function(t){return"'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'"}),n("object",a),n("array",function(t,e){var r=e.keys(t),n=0;e.seen.push(t);var a=r.map(function(r){var o;try{o=Object.getOwnPropertyDescriptor(t,r)||{value:t[r]}}catch(a){o={value:a}}var i;return i=r.match(/\d+/)?g(o.value,e):s(o.value,e,r),n+=i.length,i});return e.seen.pop(),0===a.length?"[]":n<=e.maxLineLength?"[ "+a.join(e.propSep+" ")+" ]":"[\n"+a.map(o).join(e.propSep+"\n")+"\n]"}),g.formatPropertyName=function(t,e){return t.match(/^[a-zA-Z_$][a-zA-Z_$0-9]*$/)?t:g(t,e)},n("date",f(c));var m=/^\s*function\s*(\S*)\s*\(/;n("function",f(function(t){var e=p(t);return"[Function"+(e?": "+e:"")+"]"})),n("error",f(function(t){var e=t.name,r=t.message;return"["+e+(r?": "+r:"")+"]"})),n("buffer",l("length","Buffer")),n("array-buffer",l("byteLength")),n("typed-array",l("byteLength")),n("promise",function(){return"[Promise]"}),n("xhr",function(){return"[XMLHttpRequest]"}),n("html-element",function(t){return t.outerHTML}),n("html-element-text",function(t){return t.nodeValue}),n("document",function(t){return t.documentElement.outerHTML}),n("window",function(){return"[Window]"})},{"should-type":25}],25:[function(t,e){e.exports=t(23)},{"/Users/den/Projects/shouldjs/should.js/node_modules/should-equal/node_modules/should-type/index.js":23}]},{},[1])(1)}); |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
199134
31
3829
+ Addedshould-equal@0.2.2(transitive)
+ Addedshould-format@0.0.4(transitive)
+ Addedshould-type@0.0.3(transitive)
- Removedshould-equal@0.1.0(transitive)
- Removedshould-format@0.0.2(transitive)
- Removedshould-type@0.0.1(transitive)
Updatedshould-equal@0.2.2
Updatedshould-format@0.0.4