1 line
678 KiB
Plaintext
1 line
678 KiB
Plaintext
{"version":3,"sources":["node_modules/assertion-error/index.js","node_modules/pathval/index.js","node_modules/chai/lib/chai/utils/flag.js","node_modules/chai/lib/chai/utils/test.js","node_modules/type-detect/type-detect.js","node_modules/chai/lib/chai/utils/expectTypes.js","node_modules/chai/lib/chai/utils/getActual.js","node_modules/get-func-name/index.js","node_modules/chai/lib/chai/utils/getProperties.js","node_modules/chai/lib/chai/utils/getEnumerableProperties.js","node_modules/chai/lib/chai/config.js","node_modules/chai/lib/chai/utils/inspect.js","node_modules/chai/lib/chai/utils/objDisplay.js","node_modules/chai/lib/chai/utils/getMessage.js","node_modules/chai/lib/chai/utils/transferFlags.js","node_modules/deep-eql/index.js","node_modules/chai/lib/chai/utils/isProxyEnabled.js","node_modules/chai/lib/chai/utils/addProperty.js","node_modules/chai/lib/chai/utils/addLengthGuard.js","node_modules/chai/lib/chai/utils/proxify.js","node_modules/chai/lib/chai/utils/addMethod.js","node_modules/chai/lib/chai/utils/overwriteProperty.js","node_modules/chai/lib/chai/utils/overwriteMethod.js","node_modules/chai/lib/chai/utils/addChainableMethod.js","node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","node_modules/chai/lib/chai/utils/compareByInspect.js","node_modules/chai/lib/chai/utils/getOwnEnumerablePropertySymbols.js","node_modules/chai/lib/chai/utils/getOwnEnumerableProperties.js","node_modules/check-error/index.js","node_modules/chai/lib/chai/utils/isNaN.js","node_modules/chai/lib/chai/utils/index.js","node_modules/chai/lib/chai/assertion.js","node_modules/chai/lib/chai/core/assertions.js","node_modules/chai/lib/chai/interface/expect.js","node_modules/chai/lib/chai/interface/should.js","node_modules/chai/lib/chai/interface/assert.js","node_modules/chai/lib/chai.js","node_modules/chai/index.js","node_modules/chai-as-promised/lib/chai-as-promised.js","node_modules/chai-string/chai-string.js","../ts/index.ts","node_modules/ansi-256-colors/index.js","../../../.nvm/versions/node/v10.13.0/lib/node_modules/parcel-bundler/node_modules/util/support/isBufferBrowser.js","../../../.nvm/versions/node/v10.13.0/lib/node_modules/parcel-bundler/node_modules/inherits/inherits_browser.js","../../../.nvm/versions/node/v10.13.0/lib/node_modules/parcel-bundler/node_modules/process/browser.js","../../../.nvm/versions/node/v10.13.0/lib/node_modules/parcel-bundler/node_modules/util/util.js","../ts/early.hrtMeasurement.ts","../../../.nvm/versions/node/v10.13.0/lib/node_modules/parcel-bundler/node_modules/path-browserify/index.js","node_modules/bindings/bindings.js","../../../.nvm/versions/node/v10.13.0/lib/node_modules/parcel-bundler/node_modules/events/events.js","node_modules/@airbnb/node-memwatch/include.js","node_modules/minimist/index.js","node_modules/pretty-bytes/index.js","node_modules/leakage/lib/result.js","node_modules/es6-error/es6/index.js","node_modules/left-pad/index.js","node_modules/leakage/lib/testConstantHeapSize.js","node_modules/leakage/lib/index.js","../ts/tapbundle.plugins.ts","../ts/tapbundle.classes.taptools.ts","../ts/tapbundle.classes.taptest.ts","../ts/tapbundle.classes.tapwrap.ts","../ts/tapbundle.classes.tap.ts","../ts/smartlog.classes.logrouter.ts","../ts/smartlog.classes.smartlog.ts","ts/index.ts","test/test.ts"],"names":["module","exports","flag","obj","key","value","flags","__flags","Object","create","arguments","length","require","test","args","negate","expr","global","factory","define","amd","typeDetect","promiseExists","Promise","globalObject","self","symbolExists","Symbol","mapExists","Map","setExists","Set","weakMapExists","WeakMap","weakSetExists","WeakSet","dataViewExists","DataView","symbolIteratorExists","iterator","symbolToStringTagExists","toStringTag","setEntriesExists","prototype","entries","mapEntriesExists","setIteratorPrototype","getPrototypeOf","mapIteratorPrototype","arrayIteratorExists","Array","arrayIteratorPrototype","stringIteratorExists","String","stringIteratorPrototype","toStringLeftSliceLength","toStringRightSliceLength","typeofObj","isArray","window","location","document","navigator","mimeTypes","plugins","HTMLElement","tagName","stringTag","objPrototype","RegExp","Date","toString","call","slice","AssertionError","type","expectTypes","types","flagMsg","ssfi","map","t","toLowerCase","sort","str","index","art","indexOf","charAt","or","join","objType","some","expected","undefined","getActual","_obj","getProperties","object","result","getOwnPropertyNames","addProperty","property","push","proto","forEach","getEnumerableProperties","name","includeStack","showDiff","truncateThreshold","useProxy","proxyExcludedKeys","getName","config","inspect","showHidden","depth","colors","ctx","seen","stylize","formatValue","isDOMElement","nodeType","nodeName","recurseTimes","constructor","ret","primitive","formatPrimitive","outerHTML","xmlVersion","xmlSerializer","XMLSerializer","serializeToString","ns","container","createElementNS","appendChild","cloneNode","html","innerHTML","replace","err","visibleKeys","keys","nameSuffix","isError","isRegExp","isDate","toUTCString","formatError","base","array","typedArray","braces","isTypedArray","output","formatArray","formatTypedArray","formatProperty","pop","reduceToSingleString","simple","JSON","stringify","Infinity","Error","i","l","hasOwnProperty","match","propDescriptor","getOwnPropertyDescriptor","get","set","split","line","substr","reduce","prev","cur","ar","objectToString","re","d","e","o","objDisplay","kstr","splice","getMessage","val","actual","msg","transferFlags","assertion","includeAll","FakeMap","_key","Math","random","now","getMap","setMap","isExtensible","defineProperty","configurable","MemoizeMap","memoizeCompare","leftHandOperand","rightHandOperand","memoizeMap","isPrimitive","leftHandMap","memoizeSet","deepEqual","options","comparator","extensiveDeepEqual","simpleResult","simpleEqual","memoize","memoizeResultLeft","memoizeResultRight","comparatorResult","leftHandType","extensiveDeepEqualByType","valueOf","iterableEqual","regexpEqual","generatorEqual","Uint8Array","buffer","entriesEqual","objectEqual","size","leftHandItems","rightHandItems","gatherEntries","getGeneratorEntries","hasIteratorFunction","target","getIteratorEntries","iteratorError","generator","generatorResult","next","accumulator","done","getEnumerableKeys","keysEqual","leftHandKeys","rightHandKeys","leftHandEntries","rightHandEntries","isProxyEnabled","Proxy","Reflect","chai","getter","propertyGetter","newAssertion","Assertion","fnLengthDesc","addLengthGuard","fn","assertionName","isChainable","builtins","proxify","nonChainableMethodName","proxyGetter","has","suggestion","suggestionDistance","prop","dist","stringDistanceCapped","strA","strB","cap","abs","memo","fill","j","ch","charCodeAt","min","addMethod","method","methodWrapper","apply","overwriteProperty","_get","_super","overwritingPropertyGetter","origLockSsfi","overwriteMethod","_method","overwritingMethodWrapper","canSetPrototype","setPrototypeOf","testFn","excludeNames","filter","propDesc","Function","addChainableMethod","chainingBehavior","chainableBehavior","__methods","chainableMethodGetter","chainableMethodWrapper","asserterNames","asserterName","pd","overwriteChainableMethod","_chainingBehavior","overwritingChainableMethodGetter","overwritingChainableMethodWrapper","compareByInspect","a","b","getOwnEnumerablePropertySymbols","getOwnPropertySymbols","sym","enumerable","getOwnEnumerableProperties","concat","isNaN","Number","pathval","eql","getPathInfo","hasProperty","checkError","_chai","util","lockSsfi","console","warn","assert","negateMsg","_actual","ok","_","chain","an","article","SameValueZero","includeChainingBehavior","include","isDeep","descriptor","included","isEql","item","props","firstErr","numErrs","propAssertion","compatibleConstructor","itemsCount","trim","checkArguments","assertEqual","prevLockSsfi","assertEql","assertAbove","n","doLength","msgPrefix","nType","errorMessage","shouldThrow","to","have","printObj","assertLeast","assertBelow","assertMost","start","finish","startType","finishType","range","assertInstanceOf","isInstanceOf","TypeError","assertProperty","isNested","isOwn","nameType","pathInfo","exists","assertOwnProperty","assertOwnPropertyDescriptor","actualDescriptor","assertLengthChain","assertLength","assertMatch","exec","is","assertKeys","keysType","deepStr","mixedArgsMsg","len","any","all","expectedKey","actualKey","every","last","assertThrows","errorLike","errMsgMatcher","caughtErr","everyArgIsUndefined","everyArgIsDefined","Boolean","errorLikeFail","errMsgMatcherFail","errorLikeString","getConstructorName","isCompatibleInstance","compatibleInstance","isCompatibleConstructor","placeholder","isCompatibleMessage","compatibleMessage","respondTo","itself","context","satisfy","matcher","closeTo","delta","isSubsetOf","subset","superset","cmp","contains","ordered","elem","idx","matchIdx","elem2","be","subject","failMsg","failNegateMsg","oneOf","list","assertChanges","initial","final","msgObj","assertIncreases","assertDecreases","assertDelta","behavior","realDelta","expression","isSealed","isFrozen","isFinite","expect","message","fail","operator","loadShould","shouldGetter","shouldSetter","writable","should","equal","val1","val2","Throw","errt","errs","exist","not","Should","express","errmsg","isOk","isNotOk","act","exp","notEqual","strictEqual","notStrictEqual","deepStrictEqual","notDeepEqual","isAbove","abv","above","isAtLeast","atlst","least","isBelow","blw","below","isAtMost","atmst","most","isTrue","isNotTrue","isFalse","isNotFalse","isNull","isNotNull","NaN","isNotNaN","notExists","isUndefined","isDefined","isFunction","isNotFunction","isObject","isNotObject","isNotArray","isString","isNotString","isNumber","isNotNumber","finite","isBoolean","isNotBoolean","typeOf","notTypeOf","instanceOf","notInstanceOf","inc","notInclude","deepInclude","deep","notDeepInclude","nestedInclude","nested","notNestedInclude","deepNestedInclude","notDeepNestedInclude","ownInclude","own","notOwnInclude","deepOwnInclude","notDeepOwnInclude","notMatch","notProperty","propertyVal","notPropertyVal","deepPropertyVal","notDeepPropertyVal","ownProperty","notOwnProperty","ownPropertyVal","notOwnPropertyVal","deepOwnPropertyVal","notDeepOwnPropertyVal","nestedProperty","notNestedProperty","nestedPropertyVal","notNestedPropertyVal","deepNestedPropertyVal","notDeepNestedPropertyVal","lengthOf","hasAnyKeys","hasAllKeys","containsAllKeys","contain","doesNotHaveAnyKeys","doesNotHaveAllKeys","hasAnyDeepKeys","hasAllDeepKeys","containsAllDeepKeys","doesNotHaveAnyDeepKeys","doesNotHaveAllDeepKeys","throws","assertErr","throw","doesNotThrow","approximately","sameMembers","set1","set2","same","members","notSameMembers","sameDeepMembers","notSameDeepMembers","sameOrderedMembers","notSameOrderedMembers","sameDeepOrderedMembers","notSameDeepOrderedMembers","includeMembers","notIncludeMembers","includeDeepMembers","notIncludeDeepMembers","includeOrderedMembers","notIncludeOrderedMembers","includeDeepOrderedMembers","notIncludeDeepOrderedMembers","inList","changes","change","changesBy","tmpMsg","by","doesNotChange","changesButNotBy","but","increases","increase","increasesBy","doesNotIncrease","increasesButNotBy","decreases","decrease","decreasesBy","doesNotDecrease","doesNotDecreaseBy","decreasesButNotBy","ifError","extensible","isNotExtensible","sealed","isNotSealed","frozen","isNotFrozen","isEmpty","empty","isNotEmpty","alias","as","used","version","use","core","fgcodes","bgcodes","fg","codes","standard","bright","rgb","grayscale","getRgb","r","g","bg","reset","process","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","setTimeout","clearTimeout","runTimeout","fun","runClearTimeout","marker","queue","draining","currentQueue","queueIndex","cleanUpNextTick","drainQueue","timeout","run","nextTick","Item","title","browser","env","argv","versions","noop","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","formatRegExp","format","f","objects","x","deprecate","noDeprecation","warned","deprecated","throwDeprecation","traceDeprecation","trace","error","debugs","debugEnviron","debuglog","toUpperCase","pid","opts","stylizeNoColor","_extend","customInspect","stylizeWithColor","styles","styleType","style","arrayToHash","hash","desc","numLinesEst","arg","isNullOrUndefined","isSymbol","isBuffer","pad","months","timestamp","time","getHours","getMinutes","getSeconds","getDate","getMonth","log","inherits","origin","add","fs","path","dirname","accessSync","existsSync","defaults","arrow","compiled","platform","arch","node","bindings","try","module_root","getRoot","getFileName","extname","tries","p","resolve","calling_file","origPST","prepareStackTrace","origSTL","stackTraceLimit","dummy","fileName","st","__filename","captureStackTrace","stack","file","EventEmitter","_events","_maxListeners","defaultMaxListeners","setMaxListeners","er","handler","listener","m","newListener","fired","position","listenerCount","evlistener","emitter","magic","events","gc","HeapDiff","upon_gc","event","data","UNITS","num","neg","exponent","floor","numStr","pow","toPrecision","unit","prettyBytes","createResult","Result","heapDiffs","gcollections","iterations","changesInBytes","heapDiff","size_bytes","average","sum","minimum","maximum","max","formatDiffSize","formattedSize","_classCallCheck","instance","Constructor","_possibleConstructorReturn","ReferenceError","_inherits","subClass","superClass","__proto__","_extendableBuiltin","cls","ExtendableBuiltin","ExtendableError","_extendableBuiltin2","_this","leftPad","MemoryLeakError","testConstantHeapSize","sensitivity","subsequentHeapGrowths","getSubsequentHeapGrowths","throwOnSubsequentHeapGrowths","lastHeapDiff","heapGrowthIterations","round","growthInBytes","total","heapGrowth","formatInteger","prettyHeapContents","trimLeft","growthSeriesSets","subsequentGrowths","getLongestItem","defaultValue","longestItem","currentItem","byGrowth","formatHeapContent","what","sortedDetails","details","formattedHeapContents","heapContentItem","heapContentLines","memwatch","minimist","currentlyRunningTests","iterate","iteratorFn","runAndHeapDiff","then","end","gcIndex","saveHeapDiffs","heapError","async","iterateAsync","runner","reject","currentIterationsDone","setImmediate","onHeapDiff","onAllDone","promise","outFileName","outFilePath","writeFileSync","encoding"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnSA;;;;;;AAMA;;;;;;;;;;;;;;;;;;AAmBAA,MAAM,CAACC,OAAP,GAAiB,SAASC,IAAT,CAAcC,GAAd,EAAmBC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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5KA;;;;;;AAMA;;;;;;;;;;;AAYA,SAASwU,KAAT,CAAetU,KAAf,EAAsB;AACpB;AACA;AACA,SAAOA,KAAK,KAAKA,KAAjB;AACD,EAED;;;AACAL,MAAM,CAACC,OAAP,GAAiB2U,MAAM,CAACD,KAAP,IAAgBA,KAAjC;;ACzBA;;;;;;AAMA;;;AAIA,IAAIE,OAAO,GAAGjU,OAAO,CAAC,SAAD,CAArB;AAEA;;;;;AAIAX,OAAO,CAACY,IAAR,GAAeD,OAAO,CAAC,QAAD,CAAtB;AAEA;;;;AAIAX,OAAO,CAAC0E,IAAR,GAAe/D,OAAO,CAAC,aAAD,CAAtB;AAEA;;;;AAGAX,OAAO,CAAC2E,WAAR,GAAsBhE,OAAO,CAAC,eAAD,CAA7B;AAEA;;;;AAIAX,OAAO,CAAC+L,UAAR,GAAqBpL,OAAO,CAAC,cAAD,CAA5B;AAEA;;;;AAIAX,OAAO,CAAC8F,SAAR,GAAoBnF,OAAO,CAAC,aAAD,CAA3B;AAEA;;;;AAIAX,OAAO,CAACkH,OAAR,GAAkBvG,OAAO,CAAC,WAAD,CAAzB;AAEA;;;;AAIAX,OAAO,CAAC4L,UAAR,GAAqBjL,OAAO,CAAC,cAAD,CAA5B;AAEA;;;;AAIAX,OAAO,C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;;;AAIAA,OAAO,CAACkV,IAAR,GAAeA,IAAf;AAEA;;;;AAIA,IAAIjO,MAAM,GAAGtG,OAAO,CAAC,eAAD,CAApB;;AACAX,OAAO,CAACiH,MAAR,GAAiBA,MAAjB;AAEA;;;;AAIA,IAAImF,SAAS,GAAGzL,OAAO,CAAC,kBAAD,CAAvB;;AACAX,OAAO,CAACgoB,GAAR,CAAY5b,SAAZ;AAEA;;;;AAIA,IAAI6b,IAAI,GAAGtnB,OAAO,CAAC,wBAAD,CAAlB;;AACAX,OAAO,CAACgoB,GAAR,CAAYC,IAAZ;AAEA;;;;AAIA,IAAI7K,MAAM,GAAGzc,OAAO,CAAC,yBAAD,CAApB;;AACAX,OAAO,CAACgoB,GAAR,CAAY5K,MAAZ;AAEA;;;;AAIA,IAAIQ,MAAM,GAAGjd,OAAO,CAAC,yBAAD,CAApB;;AACAX,OAAO,CAACgoB,GAAR,CAAYpK,MAAZ;AAEA;;;;AAIA,IAAItI,MAAM,GAAG3U,OAAO,CAAC,yBAAD,CAApB;;AACAX,OAAO,CAACgoB,GAAR,CAAY1S,MAAZ;;AC3FAvV,MAAM,CAACC,OAAP,GAAiBW,OAAO,CAAC,YAAD,CAAxB;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACzWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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,CAAC,KAAK,EAAU,CAAC;IACxC,IAAI,kBAAkB,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC,YAAY,CAAC;IACtD,IAAI,wBAAwB,GAAW,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC9E,OAAO,CAAC,GAAG,CACT,kCAAkC,YAAY,CAAC,aAAa,CAAC,wBAAwB,EAAE,MAAM,CAAC,EAAE,CACjG,CAAC;IACF,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACjC,OAAO,IAAI,CAAC,OAAO,CAAC;AACtB,CAAC,CAAC;;;;;;AOnCF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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,CAApB;AACD;;AC7SD,IACAgE,KAAK,GAAG5wB,OAAO,CAAC,UAAD,CAAP,CAAoB,UAApB,CADR;AAAA,IAEA6wB,MAAM,GAAG7wB,OAAO,CAAC,QAAD,CAFhB;;AAIAZ,MAAM,CAACC,OAAP,GAAiB,IAAIwxB,MAAM,CAAChB,YAAX,EAAjB;AAEAzwB,MAAM,CAACC,OAAP,CAAeyxB,EAAf,GAAoBF,KAAK,CAACE,EAA1B;AACA1xB,MAAM,CAACC,OAAP,CAAe0xB,QAAf,GAA0BH,KAAK,CAACG,QAAhC;AAEAH,KAAK,CAACI,OAAN,CAAc,UAASC,KAAT,EAAgBC,IAAhB,EAAsB;AAClC,SAAO9xB,MAAM,CAACC,OAAP,CAAegrB,IAAf,CAAoB4G,KAApB,EAA2BC,IAA3B,CAAP;AACD,CAFD;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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AA,CAAI,KAAJ","file":"test.e222d9ca.map","sourceRoot":"..","sourcesContent":["/*!\n * assertion-error\n * Copyright(c) 2013 Jake Luer <jake@qualiancy.com>\n * MIT Licensed\n */\n\n/*!\n * Return a function that will copy properties from\n * one object to another excluding any originally\n * listed. Returned function will create a new `{}`.\n *\n * @param {String} excluded properties ...\n * @return {Function}\n */\n\nfunction exclude () {\n var excludes = [].slice.call(arguments);\n\n function excludeProps (res, obj) {\n Object.keys(obj).forEach(function (key) {\n if (!~excludes.indexOf(key)) res[key] = obj[key];\n });\n }\n\n return function extendExclude () {\n var args = [].slice.call(arguments)\n , i = 0\n , res = {};\n\n for (; i < args.length; i++) {\n excludeProps(res, args[i]);\n }\n\n return res;\n };\n};\n\n/*!\n * Primary Exports\n */\n\nmodule.exports = AssertionError;\n\n/**\n * ### AssertionError\n *\n * An extension of the JavaScript `Error` constructor for\n * assertion and validation scenarios.\n *\n * @param {String} message\n * @param {Object} properties to include (optional)\n * @param {callee} start stack function (optional)\n */\n\nfunction AssertionError (message, _props, ssf) {\n var extend = exclude('name', 'message', 'stack', 'constructor', 'toJSON')\n , props = extend(_props || {});\n\n // default values\n this.message = message || 'Unspecified AssertionError';\n this.showDiff = false;\n\n // copy from properties\n for (var key in props) {\n this[key] = props[key];\n }\n\n // capture stack trace\n ssf = ssf || AssertionError;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, ssf);\n } else {\n try {\n throw new Error();\n } catch(e) {\n this.stack = e.stack;\n }\n }\n}\n\n/*!\n * Inherit from Error.prototype\n */\n\nAssertionError.prototype = Object.create(Error.prototype);\n\n/*!\n * Statically set name\n */\n\nAssertionError.prototype.name = 'AssertionError';\n\n/*!\n * Ensure correct constructor\n */\n\nAssertionError.prototype.constructor = AssertionError;\n\n/**\n * Allow errors to be converted to JSON for static transfer.\n *\n * @param {Boolean} include stack (default: `true`)\n * @return {Object} object that can be `JSON.stringify`\n */\n\nAssertionError.prototype.toJSON = function (stack) {\n var extend = exclude('constructor', 'toJSON', 'stack')\n , props = extend({ name: this.name }, this);\n\n // include stack if exists and not turned off\n if (false !== stack && this.stack) {\n props.stack = this.stack;\n }\n\n return props;\n};\n","'use strict';\n\n/* !\n * Chai - pathval utility\n * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>\n * @see https://github.com/logicalparadox/filtr\n * MIT Licensed\n */\n\n/**\n * ### .hasProperty(object, name)\n *\n * This allows checking whether an object has own\n * or inherited from prototype chain named property.\n *\n * Basically does the same thing as the `in`\n * operator but works properly with null/undefined values\n * and other primitives.\n *\n * var obj = {\n * arr: ['a', 'b', 'c']\n * , str: 'Hello'\n * }\n *\n * The following would be the results.\n *\n * hasProperty(obj, 'str'); // true\n * hasProperty(obj, 'constructor'); // true\n * hasProperty(obj, 'bar'); // false\n *\n * hasProperty(obj.str, 'length'); // true\n * hasProperty(obj.str, 1); // true\n * hasProperty(obj.str, 5); // false\n *\n * hasProperty(obj.arr, 'length'); // true\n * hasProperty(obj.arr, 2); // true\n * hasProperty(obj.arr, 3); // false\n *\n * @param {Object} object\n * @param {String|Symbol} name\n * @returns {Boolean} whether it exists\n * @namespace Utils\n * @name hasProperty\n * @api public\n */\n\nfunction hasProperty(obj, name) {\n if (typeof obj === 'undefined' || obj === null) {\n return false;\n }\n\n // The `in` operator does not work with primitives.\n return name in Object(obj);\n}\n\n/* !\n * ## parsePath(path)\n *\n * Helper function used to parse string object\n * paths. Use in conjunction with `internalGetPathValue`.\n *\n * var parsed = parsePath('myobject.property.subprop');\n *\n * ### Paths:\n *\n * * Can be infinitely deep and nested.\n * * Arrays are also valid using the formal `myobject.document[3].property`.\n * * Literal dots and brackets (not delimiter) must be backslash-escaped.\n *\n * @param {String} path\n * @returns {Object} parsed\n * @api private\n */\n\nfunction parsePath(path) {\n var str = path.replace(/([^\\\\])\\[/g, '$1.[');\n var parts = str.match(/(\\\\\\.|[^.]+?)+/g);\n return parts.map(function mapMatches(value) {\n var regexp = /^\\[(\\d+)\\]$/;\n var mArr = regexp.exec(value);\n var parsed = null;\n if (mArr) {\n parsed = { i: parseFloat(mArr[1]) };\n } else {\n parsed = { p: value.replace(/\\\\([.\\[\\]])/g, '$1') };\n }\n\n return parsed;\n });\n}\n\n/* !\n * ## internalGetPathValue(obj, parsed[, pathDepth])\n *\n * Helper companion function for `.parsePath` that returns\n * the value located at the parsed address.\n *\n * var value = getPathValue(obj, parsed);\n *\n * @param {Object} object to search against\n * @param {Object} parsed definition from `parsePath`.\n * @param {Number} depth (nesting level) of the property we want to retrieve\n * @returns {Object|Undefined} value\n * @api private\n */\n\nfunction internalGetPathValue(obj, parsed, pathDepth) {\n var temporaryValue = obj;\n var res = null;\n pathDepth = (typeof pathDepth === 'undefined' ? parsed.length : pathDepth);\n\n for (var i = 0; i < pathDepth; i++) {\n var part = parsed[i];\n if (temporaryValue) {\n if (typeof part.p === 'undefined') {\n temporaryValue = temporaryValue[part.i];\n } else {\n temporaryValue = temporaryValue[part.p];\n }\n\n if (i === (pathDepth - 1)) {\n res = temporaryValue;\n }\n }\n }\n\n return res;\n}\n\n/* !\n * ## internalSetPathValue(obj, value, parsed)\n *\n * Companion function for `parsePath` that sets\n * the value located at a parsed address.\n *\n * internalSetPathValue(obj, 'value', parsed);\n *\n * @param {Object} object to search and define on\n * @param {*} value to use upon set\n * @param {Object} parsed definition from `parsePath`\n * @api private\n */\n\nfunction internalSetPathValue(obj, val, parsed) {\n var tempObj = obj;\n var pathDepth = parsed.length;\n var part = null;\n // Here we iterate through every part of the path\n for (var i = 0; i < pathDepth; i++) {\n var propName = null;\n var propVal = null;\n part = parsed[i];\n\n // If it's the last part of the path, we set the 'propName' value with the property name\n if (i === (pathDepth - 1)) {\n propName = typeof part.p === 'undefined' ? part.i : part.p;\n // Now we set the property with the name held by 'propName' on object with the desired val\n tempObj[propName] = val;\n } else if (typeof part.p !== 'undefined' && tempObj[part.p]) {\n tempObj = tempObj[part.p];\n } else if (typeof part.i !== 'undefined' && tempObj[part.i]) {\n tempObj = tempObj[part.i];\n } else {\n // If the obj doesn't have the property we create one with that name to define it\n var next = parsed[i + 1];\n // Here we set the name of the property which will be defined\n propName = typeof part.p === 'undefined' ? part.i : part.p;\n // Here we decide if this property will be an array or a new object\n propVal = typeof next.p === 'undefined' ? [] : {};\n tempObj[propName] = propVal;\n tempObj = tempObj[propName];\n }\n }\n}\n\n/**\n * ### .getPathInfo(object, path)\n *\n * This allows the retrieval of property info in an\n * object given a string path.\n *\n * The path info consists of an object with the\n * following properties:\n *\n * * parent - The parent object of the property referenced by `path`\n * * name - The name of the final property, a number if it was an array indexer\n * * value - The value of the property, if it exists, otherwise `undefined`\n * * exists - Whether the property exists or not\n *\n * @param {Object} object\n * @param {String} path\n * @returns {Object} info\n * @namespace Utils\n * @name getPathInfo\n * @api public\n */\n\nfunction getPathInfo(obj, path) {\n var parsed = parsePath(path);\n var last = parsed[parsed.length - 1];\n var info = {\n parent: parsed.length > 1 ? internalGetPathValue(obj, parsed, parsed.length - 1) : obj,\n name: last.p || last.i,\n value: internalGetPathValue(obj, parsed),\n };\n info.exists = hasProperty(info.parent, info.name);\n\n return info;\n}\n\n/**\n * ### .getPathValue(object, path)\n *\n * This allows the retrieval of values in an\n * object given a string path.\n *\n * var obj = {\n * prop1: {\n * arr: ['a', 'b', 'c']\n * , str: 'Hello'\n * }\n * , prop2: {\n * arr: [ { nested: 'Universe' } ]\n * , str: 'Hello again!'\n * }\n * }\n *\n * The following would be the results.\n *\n * getPathValue(obj, 'prop1.str'); // Hello\n * getPathValue(obj, 'prop1.att[2]'); // b\n * getPathValue(obj, 'prop2.arr[0].nested'); // Universe\n *\n * @param {Object} object\n * @param {String} path\n * @returns {Object} value or `undefined`\n * @namespace Utils\n * @name getPathValue\n * @api public\n */\n\nfunction getPathValue(obj, path) {\n var info = getPathInfo(obj, path);\n return info.value;\n}\n\n/**\n * ### .setPathValue(object, path, value)\n *\n * Define the value in an object at a given string path.\n *\n * ```js\n * var obj = {\n * prop1: {\n * arr: ['a', 'b', 'c']\n * , str: 'Hello'\n * }\n * , prop2: {\n * arr: [ { nested: 'Universe' } ]\n * , str: 'Hello again!'\n * }\n * };\n * ```\n *\n * The following would be acceptable.\n *\n * ```js\n * var properties = require('tea-properties');\n * properties.set(obj, 'prop1.str', 'Hello Universe!');\n * properties.set(obj, 'prop1.arr[2]', 'B');\n * properties.set(obj, 'prop2.arr[0].nested.value', { hello: 'universe' });\n * ```\n *\n * @param {Object} object\n * @param {String} path\n * @param {Mixed} value\n * @api private\n */\n\nfunction setPathValue(obj, path, val) {\n var parsed = parsePath(path);\n internalSetPathValue(obj, val, parsed);\n return obj;\n}\n\nmodule.exports = {\n hasProperty: hasProperty,\n getPathInfo: getPathInfo,\n getPathValue: getPathValue,\n setPathValue: setPathValue,\n};\n","/*!\n * Chai - flag utility\n * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\n/**\n * ### .flag(object, key, [value])\n *\n * Get or set a flag value on an object. If a\n * value is provided it will be set, else it will\n * return the currently set value or `undefined` if\n * the value is not set.\n *\n * utils.flag(this, 'foo', 'bar'); // setter\n * utils.flag(this, 'foo'); // getter, returns `bar`\n *\n * @param {Object} object constructed Assertion\n * @param {String} key\n * @param {Mixed} value (optional)\n * @namespace Utils\n * @name flag\n * @api private\n */\n\nmodule.exports = function flag(obj, key, value) {\n var flags = obj.__flags || (obj.__flags = Object.create(null));\n if (arguments.length === 3) {\n flags[key] = value;\n } else {\n return flags[key];\n }\n};\n","/*!\n * Chai - test utility\n * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\n/*!\n * Module dependencies\n */\n\nvar flag = require('./flag');\n\n/**\n * ### .test(object, expression)\n *\n * Test and object for expression.\n *\n * @param {Object} object (constructed Assertion)\n * @param {Arguments} chai.Assertion.prototype.assert arguments\n * @namespace Utils\n * @name test\n */\n\nmodule.exports = function test(obj, args) {\n var negate = flag(obj, 'negate')\n , expr = args[0];\n return negate ? !expr : expr;\n};\n","(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.typeDetect = factory());\n}(this, (function () { 'use strict';\n\n/* !\n * type-detect\n * Copyright(c) 2013 jake luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\nvar promiseExists = typeof Promise === 'function';\n\n/* eslint-disable no-undef */\nvar globalObject = typeof self === 'object' ? self : global; // eslint-disable-line id-blacklist\n\nvar symbolExists = typeof Symbol !== 'undefined';\nvar mapExists = typeof Map !== 'undefined';\nvar setExists = typeof Set !== 'undefined';\nvar weakMapExists = typeof WeakMap !== 'undefined';\nvar weakSetExists = typeof WeakSet !== 'undefined';\nvar dataViewExists = typeof DataView !== 'undefined';\nvar symbolIteratorExists = symbolExists && typeof Symbol.iterator !== 'undefined';\nvar symbolToStringTagExists = symbolExists && typeof Symbol.toStringTag !== 'undefined';\nvar setEntriesExists = setExists && typeof Set.prototype.entries === 'function';\nvar mapEntriesExists = mapExists && typeof Map.prototype.entries === 'function';\nvar setIteratorPrototype = setEntriesExists && Object.getPrototypeOf(new Set().entries());\nvar mapIteratorPrototype = mapEntriesExists && Object.getPrototypeOf(new Map().entries());\nvar arrayIteratorExists = symbolIteratorExists && typeof Array.prototype[Symbol.iterator] === 'function';\nvar arrayIteratorPrototype = arrayIteratorExists && Object.getPrototypeOf([][Symbol.iterator]());\nvar stringIteratorExists = symbolIteratorExists && typeof String.prototype[Symbol.iterator] === 'function';\nvar stringIteratorPrototype = stringIteratorExists && Object.getPrototypeOf(''[Symbol.iterator]());\nvar toStringLeftSliceLength = 8;\nvar toStringRightSliceLength = -1;\n/**\n * ### typeOf (obj)\n *\n * Uses `Object.prototype.toString` to determine the type of an object,\n * normalising behaviour across engine versions & well optimised.\n *\n * @param {Mixed} object\n * @return {String} object type\n * @api public\n */\nfunction typeDetect(obj) {\n /* ! Speed optimisation\n * Pre:\n * string literal x 3,039,035 ops/sec ±1.62% (78 runs sampled)\n * boolean literal x 1,424,138 ops/sec ±4.54% (75 runs sampled)\n * number literal x 1,653,153 ops/sec ±1.91% (82 runs sampled)\n * undefined x 9,978,660 ops/sec ±1.92% (75 runs sampled)\n * function x 2,556,769 ops/sec ±1.73% (77 runs sampled)\n * Post:\n * string literal x 38,564,796 ops/sec ±1.15% (79 runs sampled)\n * boolean literal x 31,148,940 ops/sec ±1.10% (79 runs sampled)\n * number literal x 32,679,330 ops/sec ±1.90% (78 runs sampled)\n * undefined x 32,363,368 ops/sec ±1.07% (82 runs sampled)\n * function x 31,296,870 ops/sec ±0.96% (83 runs sampled)\n */\n var typeofObj = typeof obj;\n if (typeofObj !== 'object') {\n return typeofObj;\n }\n\n /* ! Speed optimisation\n * Pre:\n * null x 28,645,765 ops/sec ±1.17% (82 runs sampled)\n * Post:\n * null x 36,428,962 ops/sec ±1.37% (84 runs sampled)\n */\n if (obj === null) {\n return 'null';\n }\n\n /* ! Spec Conformance\n * Test: `Object.prototype.toString.call(window)``\n * - Node === \"[object global]\"\n * - Chrome === \"[object global]\"\n * - Firefox === \"[object Window]\"\n * - PhantomJS === \"[object Window]\"\n * - Safari === \"[object Window]\"\n * - IE 11 === \"[object Window]\"\n * - IE Edge === \"[object Window]\"\n * Test: `Object.prototype.toString.call(this)``\n * - Chrome Worker === \"[object global]\"\n * - Firefox Worker === \"[object DedicatedWorkerGlobalScope]\"\n * - Safari Worker === \"[object DedicatedWorkerGlobalScope]\"\n * - IE 11 Worker === \"[object WorkerGlobalScope]\"\n * - IE Edge Worker === \"[object WorkerGlobalScope]\"\n */\n if (obj === globalObject) {\n return 'global';\n }\n\n /* ! Speed optimisation\n * Pre:\n * array literal x 2,888,352 ops/sec ±0.67% (82 runs sampled)\n * Post:\n * array literal x 22,479,650 ops/sec ±0.96% (81 runs sampled)\n */\n if (\n Array.isArray(obj) &&\n (symbolToStringTagExists === false || !(Symbol.toStringTag in obj))\n ) {\n return 'Array';\n }\n\n // Not caching existence of `window` and related properties due to potential\n // for `window` to be unset before tests in quasi-browser environments.\n if (typeof window === 'object' && window !== null) {\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/multipage/browsers.html#location)\n * WhatWG HTML$7.7.3 - The `Location` interface\n * Test: `Object.prototype.toString.call(window.location)``\n * - IE <=11 === \"[object Object]\"\n * - IE Edge <=13 === \"[object Object]\"\n */\n if (typeof window.location === 'object' && obj === window.location) {\n return 'Location';\n }\n\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/#document)\n * WhatWG HTML$3.1.1 - The `Document` object\n * Note: Most browsers currently adher to the W3C DOM Level 2 spec\n * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-26809268)\n * which suggests that browsers should use HTMLTableCellElement for\n * both TD and TH elements. WhatWG separates these.\n * WhatWG HTML states:\n * > For historical reasons, Window objects must also have a\n * > writable, configurable, non-enumerable property named\n * > HTMLDocument whose value is the Document interface object.\n * Test: `Object.prototype.toString.call(document)``\n * - Chrome === \"[object HTMLDocument]\"\n * - Firefox === \"[object HTMLDocument]\"\n * - Safari === \"[object HTMLDocument]\"\n * - IE <=10 === \"[object Document]\"\n * - IE 11 === \"[object HTMLDocument]\"\n * - IE Edge <=13 === \"[object HTMLDocument]\"\n */\n if (typeof window.document === 'object' && obj === window.document) {\n return 'Document';\n }\n\n if (typeof window.navigator === 'object') {\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/multipage/webappapis.html#mimetypearray)\n * WhatWG HTML$8.6.1.5 - Plugins - Interface MimeTypeArray\n * Test: `Object.prototype.toString.call(navigator.mimeTypes)``\n * - IE <=10 === \"[object MSMimeTypesCollection]\"\n */\n if (typeof window.navigator.mimeTypes === 'object' &&\n obj === window.navigator.mimeTypes) {\n return 'MimeTypeArray';\n }\n\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray)\n * WhatWG HTML$8.6.1.5 - Plugins - Interface PluginArray\n * Test: `Object.prototype.toString.call(navigator.plugins)``\n * - IE <=10 === \"[object MSPluginsCollection]\"\n */\n if (typeof window.navigator.plugins === 'object' &&\n obj === window.navigator.plugins) {\n return 'PluginArray';\n }\n }\n\n if ((typeof window.HTMLElement === 'function' ||\n typeof window.HTMLElement === 'object') &&\n obj instanceof window.HTMLElement) {\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray)\n * WhatWG HTML$4.4.4 - The `blockquote` element - Interface `HTMLQuoteElement`\n * Test: `Object.prototype.toString.call(document.createElement('blockquote'))``\n * - IE <=10 === \"[object HTMLBlockElement]\"\n */\n if (obj.tagName === 'BLOCKQUOTE') {\n return 'HTMLQuoteElement';\n }\n\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/#htmltabledatacellelement)\n * WhatWG HTML$4.9.9 - The `td` element - Interface `HTMLTableDataCellElement`\n * Note: Most browsers currently adher to the W3C DOM Level 2 spec\n * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-82915075)\n * which suggests that browsers should use HTMLTableCellElement for\n * both TD and TH elements. WhatWG separates these.\n * Test: Object.prototype.toString.call(document.createElement('td'))\n * - Chrome === \"[object HTMLTableCellElement]\"\n * - Firefox === \"[object HTMLTableCellElement]\"\n * - Safari === \"[object HTMLTableCellElement]\"\n */\n if (obj.tagName === 'TD') {\n return 'HTMLTableDataCellElement';\n }\n\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/#htmltableheadercellelement)\n * WhatWG HTML$4.9.9 - The `td` element - Interface `HTMLTableHeaderCellElement`\n * Note: Most browsers currently adher to the W3C DOM Level 2 spec\n * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-82915075)\n * which suggests that browsers should use HTMLTableCellElement for\n * both TD and TH elements. WhatWG separates these.\n * Test: Object.prototype.toString.call(document.createElement('th'))\n * - Chrome === \"[object HTMLTableCellElement]\"\n * - Firefox === \"[object HTMLTableCellElement]\"\n * - Safari === \"[object HTMLTableCellElement]\"\n */\n if (obj.tagName === 'TH') {\n return 'HTMLTableHeaderCellElement';\n }\n }\n }\n\n /* ! Speed optimisation\n * Pre:\n * Float64Array x 625,644 ops/sec ±1.58% (80 runs sampled)\n * Float32Array x 1,279,852 ops/sec ±2.91% (77 runs sampled)\n * Uint32Array x 1,178,185 ops/sec ±1.95% (83 runs sampled)\n * Uint16Array x 1,008,380 ops/sec ±2.25% (80 runs sampled)\n * Uint8Array x 1,128,040 ops/sec ±2.11% (81 runs sampled)\n * Int32Array x 1,170,119 ops/sec ±2.88% (80 runs sampled)\n * Int16Array x 1,176,348 ops/sec ±5.79% (86 runs sampled)\n * Int8Array x 1,058,707 ops/sec ±4.94% (77 runs sampled)\n * Uint8ClampedArray x 1,110,633 ops/sec ±4.20% (80 runs sampled)\n * Post:\n * Float64Array x 7,105,671 ops/sec ±13.47% (64 runs sampled)\n * Float32Array x 5,887,912 ops/sec ±1.46% (82 runs sampled)\n * Uint32Array x 6,491,661 ops/sec ±1.76% (79 runs sampled)\n * Uint16Array x 6,559,795 ops/sec ±1.67% (82 runs sampled)\n * Uint8Array x 6,463,966 ops/sec ±1.43% (85 runs sampled)\n * Int32Array x 5,641,841 ops/sec ±3.49% (81 runs sampled)\n * Int16Array x 6,583,511 ops/sec ±1.98% (80 runs sampled)\n * Int8Array x 6,606,078 ops/sec ±1.74% (81 runs sampled)\n * Uint8ClampedArray x 6,602,224 ops/sec ±1.77% (83 runs sampled)\n */\n var stringTag = (symbolToStringTagExists && obj[Symbol.toStringTag]);\n if (typeof stringTag === 'string') {\n return stringTag;\n }\n\n var objPrototype = Object.getPrototypeOf(obj);\n /* ! Speed optimisation\n * Pre:\n * regex literal x 1,772,385 ops/sec ±1.85% (77 runs sampled)\n * regex constructor x 2,143,634 ops/sec ±2.46% (78 runs sampled)\n * Post:\n * regex literal x 3,928,009 ops/sec ±0.65% (78 runs sampled)\n * regex constructor x 3,931,108 ops/sec ±0.58% (84 runs sampled)\n */\n if (objPrototype === RegExp.prototype) {\n return 'RegExp';\n }\n\n /* ! Speed optimisation\n * Pre:\n * date x 2,130,074 ops/sec ±4.42% (68 runs sampled)\n * Post:\n * date x 3,953,779 ops/sec ±1.35% (77 runs sampled)\n */\n if (objPrototype === Date.prototype) {\n return 'Date';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-promise.prototype-@@tostringtag)\n * ES6$25.4.5.4 - Promise.prototype[@@toStringTag] should be \"Promise\":\n * Test: `Object.prototype.toString.call(Promise.resolve())``\n * - Chrome <=47 === \"[object Object]\"\n * - Edge <=20 === \"[object Object]\"\n * - Firefox 29-Latest === \"[object Promise]\"\n * - Safari 7.1-Latest === \"[object Promise]\"\n */\n if (promiseExists && objPrototype === Promise.prototype) {\n return 'Promise';\n }\n\n /* ! Speed optimisation\n * Pre:\n * set x 2,222,186 ops/sec ±1.31% (82 runs sampled)\n * Post:\n * set x 4,545,879 ops/sec ±1.13% (83 runs sampled)\n */\n if (setExists && objPrototype === Set.prototype) {\n return 'Set';\n }\n\n /* ! Speed optimisation\n * Pre:\n * map x 2,396,842 ops/sec ±1.59% (81 runs sampled)\n * Post:\n * map x 4,183,945 ops/sec ±6.59% (82 runs sampled)\n */\n if (mapExists && objPrototype === Map.prototype) {\n return 'Map';\n }\n\n /* ! Speed optimisation\n * Pre:\n * weakset x 1,323,220 ops/sec ±2.17% (76 runs sampled)\n * Post:\n * weakset x 4,237,510 ops/sec ±2.01% (77 runs sampled)\n */\n if (weakSetExists && objPrototype === WeakSet.prototype) {\n return 'WeakSet';\n }\n\n /* ! Speed optimisation\n * Pre:\n * weakmap x 1,500,260 ops/sec ±2.02% (78 runs sampled)\n * Post:\n * weakmap x 3,881,384 ops/sec ±1.45% (82 runs sampled)\n */\n if (weakMapExists && objPrototype === WeakMap.prototype) {\n return 'WeakMap';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-dataview.prototype-@@tostringtag)\n * ES6$24.2.4.21 - DataView.prototype[@@toStringTag] should be \"DataView\":\n * Test: `Object.prototype.toString.call(new DataView(new ArrayBuffer(1)))``\n * - Edge <=13 === \"[object Object]\"\n */\n if (dataViewExists && objPrototype === DataView.prototype) {\n return 'DataView';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%mapiteratorprototype%-@@tostringtag)\n * ES6$23.1.5.2.2 - %MapIteratorPrototype%[@@toStringTag] should be \"Map Iterator\":\n * Test: `Object.prototype.toString.call(new Map().entries())``\n * - Edge <=13 === \"[object Object]\"\n */\n if (mapExists && objPrototype === mapIteratorPrototype) {\n return 'Map Iterator';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%setiteratorprototype%-@@tostringtag)\n * ES6$23.2.5.2.2 - %SetIteratorPrototype%[@@toStringTag] should be \"Set Iterator\":\n * Test: `Object.prototype.toString.call(new Set().entries())``\n * - Edge <=13 === \"[object Object]\"\n */\n if (setExists && objPrototype === setIteratorPrototype) {\n return 'Set Iterator';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%arrayiteratorprototype%-@@tostringtag)\n * ES6$22.1.5.2.2 - %ArrayIteratorPrototype%[@@toStringTag] should be \"Array Iterator\":\n * Test: `Object.prototype.toString.call([][Symbol.iterator]())``\n * - Edge <=13 === \"[object Object]\"\n */\n if (arrayIteratorExists && objPrototype === arrayIteratorPrototype) {\n return 'Array Iterator';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%stringiteratorprototype%-@@tostringtag)\n * ES6$21.1.5.2.2 - %StringIteratorPrototype%[@@toStringTag] should be \"String Iterator\":\n * Test: `Object.prototype.toString.call(''[Symbol.iterator]())``\n * - Edge <=13 === \"[object Object]\"\n */\n if (stringIteratorExists && objPrototype === stringIteratorPrototype) {\n return 'String Iterator';\n }\n\n /* ! Speed optimisation\n * Pre:\n * object from null x 2,424,320 ops/sec ±1.67% (76 runs sampled)\n * Post:\n * object from null x 5,838,000 ops/sec ±0.99% (84 runs sampled)\n */\n if (objPrototype === null) {\n return 'Object';\n }\n\n return Object\n .prototype\n .toString\n .call(obj)\n .slice(toStringLeftSliceLength, toStringRightSliceLength);\n}\n\nreturn typeDetect;\n\n})));\n","/*!\n * Chai - expectTypes utility\n * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\n/**\n * ### .expectTypes(obj, types)\n *\n * Ensures that the object being tested against is of a valid type.\n *\n * utils.expectTypes(this, ['array', 'object', 'string']);\n *\n * @param {Mixed} obj constructed Assertion\n * @param {Array} type A list of allowed types for this assertion\n * @namespace Utils\n * @name expectTypes\n * @api public\n */\n\nvar AssertionError = require('assertion-error');\nvar flag = require('./flag');\nvar type = require('type-detect');\n\nmodule.exports = function expectTypes(obj, types) {\n var flagMsg = flag(obj, 'message');\n var ssfi = flag(obj, 'ssfi');\n\n flagMsg = flagMsg ? flagMsg + ': ' : '';\n\n obj = flag(obj, 'object');\n types = types.map(function (t) { return t.toLowerCase(); });\n types.sort();\n\n // Transforms ['lorem', 'ipsum'] into 'a lorem, or an ipsum'\n var str = types.map(function (t, index) {\n var art = ~[ 'a', 'e', 'i', 'o', 'u' ].indexOf(t.charAt(0)) ? 'an' : 'a';\n var or = types.length > 1 && index === types.length - 1 ? 'or ' : '';\n return or + art + ' ' + t;\n }).join(', ');\n\n var objType = type(obj).toLowerCase();\n\n if (!types.some(function (expected) { return objType === expected; })) {\n throw new AssertionError(\n flagMsg + 'object tested must be ' + str + ', but ' + objType + ' given',\n undefined,\n ssfi\n );\n }\n};\n","/*!\n * Chai - getActual utility\n * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\n/**\n * ### .getActual(object, [actual])\n *\n * Returns the `actual` value for an Assertion.\n *\n * @param {Object} object (constructed Assertion)\n * @param {Arguments} chai.Assertion.prototype.assert arguments\n * @namespace Utils\n * @name getActual\n */\n\nmodule.exports = function getActual(obj, args) {\n return args.length > 4 ? args[4] : obj._obj;\n};\n","'use strict';\n\n/* !\n * Chai - getFuncName utility\n * Copyright(c) 2012-2016 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\n/**\n * ### .getFuncName(constructorFn)\n *\n * Returns the name of a function.\n * When a non-function instance is passed, returns `null`.\n * This also includes a polyfill function if `aFunc.name` is not defined.\n *\n * @name getFuncName\n * @param {Function} funct\n * @namespace Utils\n * @api public\n */\n\nvar toString = Function.prototype.toString;\nvar functionNameMatch = /\\s*function(?:\\s|\\s*\\/\\*[^(?:*\\/)]+\\*\\/\\s*)*([^\\s\\(\\/]+)/;\nfunction getFuncName(aFunc) {\n if (typeof aFunc !== 'function') {\n return null;\n }\n\n var name = '';\n if (typeof Function.prototype.name === 'undefined' && typeof aFunc.name === 'undefined') {\n // Here we run a polyfill if Function does not support the `name` property and if aFunc.name is not defined\n var match = toString.call(aFunc).match(functionNameMatch);\n if (match) {\n name = match[1];\n }\n } else {\n // If we've got a `name` property we just use it\n name = aFunc.name;\n }\n\n return name;\n}\n\nmodule.exports = getFuncName;\n","/*!\n * Chai - getProperties utility\n * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\n/**\n * ### .getProperties(object)\n *\n * This allows the retrieval of property names of an object, enumerable or not,\n * inherited or not.\n *\n * @param {Object} object\n * @returns {Array}\n * @namespace Utils\n * @name getProperties\n * @api public\n */\n\nmodule.exports = function getProperties(object) {\n var result = Object.getOwnPropertyNames(object);\n\n function addProperty(property) {\n if (result.indexOf(property) === -1) {\n result.push(property);\n }\n }\n\n var proto = Object.getPrototypeOf(object);\n while (proto !== null) {\n Object.getOwnPropertyNames(proto).forEach(addProperty);\n proto = Object.getPrototypeOf(proto);\n }\n\n return result;\n};\n","/*!\n * Chai - getEnumerableProperties utility\n * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\n/**\n * ### .getEnumerableProperties(object)\n *\n * This allows the retrieval of enumerable property names of an object,\n * inherited or not.\n *\n * @param {Object} object\n * @returns {Array}\n * @namespace Utils\n * @name getEnumerableProperties\n * @api public\n */\n\nmodule.exports = function getEnumerableProperties(object) {\n var result = [];\n for (var name in object) {\n result.push(name);\n }\n return result;\n};\n","module.exports = {\n\n /**\n * ### config.includeStack\n *\n * User configurable property, influences whether stack trace\n * is included in Assertion error message. Default of false\n * suppresses stack trace in the error message.\n *\n * chai.config.includeStack = true; // enable stack on error\n *\n * @param {Boolean}\n * @api public\n */\n\n includeStack: false,\n\n /**\n * ### config.showDiff\n *\n * User configurable property, influences whether or not\n * the `showDiff` flag should be included in the thrown\n * AssertionErrors. `false` will always be `false`; `true`\n * will be true when the assertion has requested a diff\n * be shown.\n *\n * @param {Boolean}\n * @api public\n */\n\n showDiff: true,\n\n /**\n * ### config.truncateThreshold\n *\n * User configurable property, sets length threshold for actual and\n * expected values in assertion errors. If this threshold is exceeded, for\n * example for large data structures, the value is replaced with something\n * like `[ Array(3) ]` or `{ Object (prop1, prop2) }`.\n *\n * Set it to zero if you want to disable truncating altogether.\n *\n * This is especially userful when doing assertions on arrays: having this\n * set to a reasonable large value makes the failure messages readily\n * inspectable.\n *\n * chai.config.truncateThreshold = 0; // disable truncating\n *\n * @param {Number}\n * @api public\n */\n\n truncateThreshold: 40,\n\n /**\n * ### config.useProxy\n *\n * User configurable property, defines if chai will use a Proxy to throw\n * an error when a non-existent property is read, which protects users\n * from typos when using property-based assertions.\n *\n * Set it to false if you want to disable this feature.\n *\n * chai.config.useProxy = false; // disable use of Proxy\n *\n * This feature is automatically disabled regardless of this config value\n * in environments that don't support proxies.\n *\n * @param {Boolean}\n * @api public\n */\n\n useProxy: true,\n\n /**\n * ### config.proxyExcludedKeys\n *\n * User configurable property, defines which properties should be ignored\n * instead of throwing an error if they do not exist on the assertion.\n * This is only applied if the environment Chai is running in supports proxies and\n * if the `useProxy` configuration setting is enabled.\n * By default, `then` and `inspect` will not throw an error if they do not exist on the\n * assertion object because the `.inspect` property is read by `util.inspect` (for example, when\n * using `console.log` on the assertion object) and `.then` is necessary for promise type-checking.\n *\n * // By default these keys will not throw an error if they do not exist on the assertion object\n * chai.config.proxyExcludedKeys = ['then', 'inspect'];\n *\n * @param {Array}\n * @api public\n */\n\n proxyExcludedKeys: ['then', 'catch', 'inspect', 'toJSON']\n};\n","// This is (almost) directly from Node.js utils\n// https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/util.js\n\nvar getName = require('get-func-name');\nvar getProperties = require('./getProperties');\nvar getEnumerableProperties = require('./getEnumerableProperties');\nvar config = require('../config');\n\nmodule.exports = inspect;\n\n/**\n * ### .inspect(obj, [showHidden], [depth], [colors])\n *\n * Echoes the value of a value. Tries to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Boolean} showHidden Flag that shows hidden (not enumerable)\n * properties of objects. Default is false.\n * @param {Number} depth Depth in which to descend in object. Default is 2.\n * @param {Boolean} colors Flag to turn on ANSI escape codes to color the\n * output. Default is false (no coloring).\n * @namespace Utils\n * @name inspect\n */\nfunction inspect(obj, showHidden, depth, colors) {\n var ctx = {\n showHidden: showHidden,\n seen: [],\n stylize: function (str) { return str; }\n };\n return formatValue(ctx, obj, (typeof depth === 'undefined' ? 2 : depth));\n}\n\n// Returns true if object is a DOM element.\nvar isDOMElement = function (object) {\n if (typeof HTMLElement === 'object') {\n return object instanceof HTMLElement;\n } else {\n return object &&\n typeof object === 'object' &&\n 'nodeType' in object &&\n object.nodeType === 1 &&\n typeof object.nodeName === 'string';\n }\n};\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (value && typeof value.inspect === 'function' &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (typeof ret !== 'string') {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // If this is a DOM element, try to get the outer HTML.\n if (isDOMElement(value)) {\n if ('outerHTML' in value) {\n return value.outerHTML;\n // This value does not have an outerHTML attribute,\n // it could still be an XML element\n } else {\n // Attempt to serialize it\n try {\n if (document.xmlVersion) {\n var xmlSerializer = new XMLSerializer();\n return xmlSerializer.serializeToString(value);\n } else {\n // Firefox 11- do not support outerHTML\n // It does, however, support innerHTML\n // Use the following to render the element\n var ns = \"http://www.w3.org/1999/xhtml\";\n var container = document.createElementNS(ns, '_');\n\n container.appendChild(value.cloneNode(false));\n var html = container.innerHTML\n .replace('><', '>' + value.innerHTML + '<');\n container.innerHTML = '';\n return html;\n }\n } catch (err) {\n // This could be a non-native DOM implementation,\n // continue with the normal flow:\n // printing the element as if it is an object.\n }\n }\n }\n\n // Look up the keys of the object.\n var visibleKeys = getEnumerableProperties(value);\n var keys = ctx.showHidden ? getProperties(value) : visibleKeys;\n\n var name, nameSuffix;\n\n // Some type of object without properties can be shortcut.\n // In IE, errors have a single `stack` property, or if they are vanilla `Error`,\n // a `stack` plus `description` property; ignore those for consistency.\n if (keys.length === 0 || (isError(value) && (\n (keys.length === 1 && keys[0] === 'stack') ||\n (keys.length === 2 && keys[0] === 'description' && keys[1] === 'stack')\n ))) {\n if (typeof value === 'function') {\n name = getName(value);\n nameSuffix = name ? ': ' + name : '';\n return ctx.stylize('[Function' + nameSuffix + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toUTCString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = ''\n , array = false\n , typedArray = false\n , braces = ['{', '}'];\n\n if (isTypedArray(value)) {\n typedArray = true;\n braces = ['[', ']'];\n }\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (typeof value === 'function') {\n name = getName(value);\n nameSuffix = name ? ': ' + name : '';\n base = ' [Function' + nameSuffix + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n return formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else if (typedArray) {\n return formatTypedArray(value);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\nfunction formatPrimitive(ctx, value) {\n switch (typeof value) {\n case 'undefined':\n return ctx.stylize('undefined', 'undefined');\n\n case 'string':\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n\n case 'number':\n if (value === 0 && (1/value) === -Infinity) {\n return ctx.stylize('-0', 'number');\n }\n return ctx.stylize('' + value, 'number');\n\n case 'boolean':\n return ctx.stylize('' + value, 'boolean');\n\n case 'symbol':\n return ctx.stylize(value.toString(), 'symbol');\n }\n // For some reason typeof null is \"object\", so special case here.\n if (value === null) {\n return ctx.stylize('null', 'null');\n }\n}\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (Object.prototype.hasOwnProperty.call(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\nfunction formatTypedArray(value) {\n var str = '[ ';\n\n for (var i = 0; i < value.length; ++i) {\n if (str.length >= config.truncateThreshold - 7) {\n str += '...';\n break;\n }\n str += value[i] + ', ';\n }\n str += ' ]';\n\n // Removing trailing `, ` if the array was not truncated\n if (str.indexOf(', ]') !== -1) {\n str = str.replace(', ]', ' ]');\n }\n\n return str;\n}\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name;\n var propDescriptor = Object.getOwnPropertyDescriptor(value, key);\n var str;\n\n if (propDescriptor) {\n if (propDescriptor.get) {\n if (propDescriptor.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (propDescriptor.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n }\n if (visibleKeys.indexOf(key) < 0) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(value[key]) < 0) {\n if (recurseTimes === null) {\n str = formatValue(ctx, value[key], null);\n } else {\n str = formatValue(ctx, value[key], recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').substr(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (typeof name === 'undefined') {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\nfunction reduceToSingleString(output, base, braces) {\n var length = output.reduce(function(prev, cur) {\n return prev + cur.length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\nfunction isTypedArray(ar) {\n // Unfortunately there's no way to check if an object is a TypedArray\n // We have to check if it's one of these types\n return (typeof ar === 'object' && /\\w+Array]$/.test(objectToString(ar)));\n}\n\nfunction isArray(ar) {\n return Array.isArray(ar) ||\n (typeof ar === 'object' && objectToString(ar) === '[object Array]');\n}\n\nfunction isRegExp(re) {\n return typeof re === 'object' && objectToString(re) === '[object RegExp]';\n}\n\nfunction isDate(d) {\n return typeof d === 'object' && objectToString(d) === '[object Date]';\n}\n\nfunction isError(e) {\n return typeof e === 'object' && objectToString(e) === '[object Error]';\n}\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n","/*!\n * Chai - flag utility\n * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\n/*!\n * Module dependencies\n */\n\nvar inspect = require('./inspect');\nvar config = require('../config');\n\n/**\n * ### .objDisplay(object)\n *\n * Determines if an object or an array matches\n * criteria to be inspected in-line for error\n * messages or should be truncated.\n *\n * @param {Mixed} javascript object to inspect\n * @name objDisplay\n * @namespace Utils\n * @api public\n */\n\nmodule.exports = function objDisplay(obj) {\n var str = inspect(obj)\n , type = Object.prototype.toString.call(obj);\n\n if (config.truncateThreshold && str.length >= config.truncateThreshold) {\n if (type === '[object Function]') {\n return !obj.name || obj.name === ''\n ? '[Function]'\n : '[Function: ' + obj.name + ']';\n } else if (type === '[object Array]') {\n return '[ Array(' + obj.length + ') ]';\n } else if (type === '[object Object]') {\n var keys = Object.keys(obj)\n , kstr = keys.length > 2\n ? keys.splice(0, 2).join(', ') + ', ...'\n : keys.join(', ');\n return '{ Object (' + kstr + ') }';\n } else {\n return str;\n }\n } else {\n return str;\n }\n};\n","/*!\n * Chai - message composition utility\n * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\n/*!\n * Module dependencies\n */\n\nvar flag = require('./flag')\n , getActual = require('./getActual')\n , objDisplay = require('./objDisplay');\n\n/**\n * ### .getMessage(object, message, negateMessage)\n *\n * Construct the error message based on flags\n * and template tags. Template tags will return\n * a stringified inspection of the object referenced.\n *\n * Message template tags:\n * - `#{this}` current asserted object\n * - `#{act}` actual value\n * - `#{exp}` expected value\n *\n * @param {Object} object (constructed Assertion)\n * @param {Arguments} chai.Assertion.prototype.assert arguments\n * @namespace Utils\n * @name getMessage\n * @api public\n */\n\nmodule.exports = function getMessage(obj, args) {\n var negate = flag(obj, 'negate')\n , val = flag(obj, 'object')\n , expected = args[3]\n , actual = getActual(obj, args)\n , msg = negate ? args[2] : args[1]\n , flagMsg = flag(obj, 'message');\n\n if(typeof msg === \"function\") msg = msg();\n msg = msg || '';\n msg = msg\n .replace(/#\\{this\\}/g, function () { return objDisplay(val); })\n .replace(/#\\{act\\}/g, function () { return objDisplay(actual); })\n .replace(/#\\{exp\\}/g, function () { return objDisplay(expected); });\n\n return flagMsg ? flagMsg + ': ' + msg : msg;\n};\n","/*!\n * Chai - transferFlags utility\n * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\n/**\n * ### .transferFlags(assertion, object, includeAll = true)\n *\n * Transfer all the flags for `assertion` to `object`. If\n * `includeAll` is set to `false`, then the base Chai\n * assertion flags (namely `object`, `ssfi`, `lockSsfi`,\n * and `message`) will not be transferred.\n *\n *\n * var newAssertion = new Assertion();\n * utils.transferFlags(assertion, newAssertion);\n *\n * var anotherAssertion = new Assertion(myObj);\n * utils.transferFlags(assertion, anotherAssertion, false);\n *\n * @param {Assertion} assertion the assertion to transfer the flags from\n * @param {Object} object the object to transfer the flags to; usually a new assertion\n * @param {Boolean} includeAll\n * @namespace Utils\n * @name transferFlags\n * @api private\n */\n\nmodule.exports = function transferFlags(assertion, object, includeAll) {\n var flags = assertion.__flags || (assertion.__flags = Object.create(null));\n\n if (!object.__flags) {\n object.__flags = Object.create(null);\n }\n\n includeAll = arguments.length === 3 ? includeAll : true;\n\n for (var flag in flags) {\n if (includeAll ||\n (flag !== 'object' && flag !== 'ssfi' && flag !== 'lockSsfi' && flag != 'message')) {\n object.__flags[flag] = flags[flag];\n }\n }\n};\n","'use strict';\n/* globals Symbol: false, Uint8Array: false, WeakMap: false */\n/*!\n * deep-eql\n * Copyright(c) 2013 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\nvar type = require('type-detect');\nfunction FakeMap() {\n this._key = 'chai/deep-eql__' + Math.random() + Date.now();\n}\n\nFakeMap.prototype = {\n get: function getMap(key) {\n return key[this._key];\n },\n set: function setMap(key, value) {\n if (Object.isExtensible(key)) {\n Object.defineProperty(key, this._key, {\n value: value,\n configurable: true,\n });\n }\n },\n};\n\nvar MemoizeMap = typeof WeakMap === 'function' ? WeakMap : FakeMap;\n/*!\n * Check to see if the MemoizeMap has recorded a result of the two operands\n *\n * @param {Mixed} leftHandOperand\n * @param {Mixed} rightHandOperand\n * @param {MemoizeMap} memoizeMap\n * @returns {Boolean|null} result\n*/\nfunction memoizeCompare(leftHandOperand, rightHandOperand, memoizeMap) {\n // Technically, WeakMap keys can *only* be objects, not primitives.\n if (!memoizeMap || isPrimitive(leftHandOperand) || isPrimitive(rightHandOperand)) {\n return null;\n }\n var leftHandMap = memoizeMap.get(leftHandOperand);\n if (leftHandMap) {\n var result = leftHandMap.get(rightHandOperand);\n if (typeof result === 'boolean') {\n return result;\n }\n }\n return null;\n}\n\n/*!\n * Set the result of the equality into the MemoizeMap\n *\n * @param {Mixed} leftHandOperand\n * @param {Mixed} rightHandOperand\n * @param {MemoizeMap} memoizeMap\n * @param {Boolean} result\n*/\nfunction memoizeSet(leftHandOperand, rightHandOperand, memoizeMap, result) {\n // Technically, WeakMap keys can *only* be objects, not primitives.\n if (!memoizeMap || isPrimitive(leftHandOperand) || isPrimitive(rightHandOperand)) {\n return;\n }\n var leftHandMap = memoizeMap.get(leftHandOperand);\n if (leftHandMap) {\n leftHandMap.set(rightHandOperand, result);\n } else {\n leftHandMap = new MemoizeMap();\n leftHandMap.set(rightHandOperand, result);\n memoizeMap.set(leftHandOperand, leftHandMap);\n }\n}\n\n/*!\n * Primary Export\n */\n\nmodule.exports = deepEqual;\nmodule.exports.MemoizeMap = MemoizeMap;\n\n/**\n * Assert deeply nested sameValue equality between two objects of any type.\n *\n * @param {Mixed} leftHandOperand\n * @param {Mixed} rightHandOperand\n * @param {Object} [options] (optional) Additional options\n * @param {Array} [options.comparator] (optional) Override default algorithm, determining custom equality.\n * @param {Array} [options.memoize] (optional) Provide a custom memoization object which will cache the results of\n complex objects for a speed boost. By passing `false` you can disable memoization, but this will cause circular\n references to blow the stack.\n * @return {Boolean} equal match\n */\nfunction deepEqual(leftHandOperand, rightHandOperand, options) {\n // If we have a comparator, we can't assume anything; so bail to its check first.\n if (options && options.comparator) {\n return extensiveDeepEqual(leftHandOperand, rightHandOperand, options);\n }\n\n var simpleResult = simpleEqual(leftHandOperand, rightHandOperand);\n if (simpleResult !== null) {\n return simpleResult;\n }\n\n // Deeper comparisons are pushed through to a larger function\n return extensiveDeepEqual(leftHandOperand, rightHandOperand, options);\n}\n\n/**\n * Many comparisons can be canceled out early via simple equality or primitive checks.\n * @param {Mixed} leftHandOperand\n * @param {Mixed} rightHandOperand\n * @return {Boolean|null} equal match\n */\nfunction simpleEqual(leftHandOperand, rightHandOperand) {\n // Equal references (except for Numbers) can be returned early\n if (leftHandOperand === rightHandOperand) {\n // Handle +-0 cases\n return leftHandOperand !== 0 || 1 / leftHandOperand === 1 / rightHandOperand;\n }\n\n // handle NaN cases\n if (\n leftHandOperand !== leftHandOperand && // eslint-disable-line no-self-compare\n rightHandOperand !== rightHandOperand // eslint-disable-line no-self-compare\n ) {\n return true;\n }\n\n // Anything that is not an 'object', i.e. symbols, functions, booleans, numbers,\n // strings, and undefined, can be compared by reference.\n if (isPrimitive(leftHandOperand) || isPrimitive(rightHandOperand)) {\n // Easy out b/c it would have passed the first equality check\n return false;\n }\n return null;\n}\n\n/*!\n * The main logic of the `deepEqual` function.\n *\n * @param {Mixed} leftHandOperand\n * @param {Mixed} rightHandOperand\n * @param {Object} [options] (optional) Additional options\n * @param {Array} [options.comparator] (optional) Override default algorithm, determining custom equality.\n * @param {Array} [options.memoize] (optional) Provide a custom memoization object which will cache the results of\n complex objects for a speed boost. By passing `false` you can disable memoization, but this will cause circular\n references to blow the stack.\n * @return {Boolean} equal match\n*/\nfunction extensiveDeepEqual(leftHandOperand, rightHandOperand, options) {\n options = options || {};\n options.memoize = options.memoize === false ? false : options.memoize || new MemoizeMap();\n var comparator = options && options.comparator;\n\n // Check if a memoized result exists.\n var memoizeResultLeft = memoizeCompare(leftHandOperand, rightHandOperand, options.memoize);\n if (memoizeResultLeft !== null) {\n return memoizeResultLeft;\n }\n var memoizeResultRight = memoizeCompare(rightHandOperand, leftHandOperand, options.memoize);\n if (memoizeResultRight !== null) {\n return memoizeResultRight;\n }\n\n // If a comparator is present, use it.\n if (comparator) {\n var comparatorResult = comparator(leftHandOperand, rightHandOperand);\n // Comparators may return null, in which case we want to go back to default behavior.\n if (comparatorResult === false || comparatorResult === true) {\n memoizeSet(leftHandOperand, rightHandOperand, options.memoize, comparatorResult);\n return comparatorResult;\n }\n // To allow comparators to override *any* behavior, we ran them first. Since it didn't decide\n // what to do, we need to make sure to return the basic tests first before we move on.\n var simpleResult = simpleEqual(leftHandOperand, rightHandOperand);\n if (simpleResult !== null) {\n // Don't memoize this, it takes longer to set/retrieve than to just compare.\n return simpleResult;\n }\n }\n\n var leftHandType = type(leftHandOperand);\n if (leftHandType !== type(rightHandOperand)) {\n memoizeSet(leftHandOperand, rightHandOperand, options.memoize, false);\n return false;\n }\n\n // Temporarily set the operands in the memoize object to prevent blowing the stack\n memoizeSet(leftHandOperand, rightHandOperand, options.memoize, true);\n\n var result = extensiveDeepEqualByType(leftHandOperand, rightHandOperand, leftHandType, options);\n memoizeSet(leftHandOperand, rightHandOperand, options.memoize, result);\n return result;\n}\n\nfunction extensiveDeepEqualByType(leftHandOperand, rightHandOperand, leftHandType, options) {\n switch (leftHandType) {\n case 'String':\n case 'Number':\n case 'Boolean':\n case 'Date':\n // If these types are their instance types (e.g. `new Number`) then re-deepEqual against their values\n return deepEqual(leftHandOperand.valueOf(), rightHandOperand.valueOf());\n case 'Promise':\n case 'Symbol':\n case 'function':\n case 'WeakMap':\n case 'WeakSet':\n case 'Error':\n return leftHandOperand === rightHandOperand;\n case 'Arguments':\n case 'Int8Array':\n case 'Uint8Array':\n case 'Uint8ClampedArray':\n case 'Int16Array':\n case 'Uint16Array':\n case 'Int32Array':\n case 'Uint32Array':\n case 'Float32Array':\n case 'Float64Array':\n case 'Array':\n return iterableEqual(leftHandOperand, rightHandOperand, options);\n case 'RegExp':\n return regexpEqual(leftHandOperand, rightHandOperand);\n case 'Generator':\n return generatorEqual(leftHandOperand, rightHandOperand, options);\n case 'DataView':\n return iterableEqual(new Uint8Array(leftHandOperand.buffer), new Uint8Array(rightHandOperand.buffer), options);\n case 'ArrayBuffer':\n return iterableEqual(new Uint8Array(leftHandOperand), new Uint8Array(rightHandOperand), options);\n case 'Set':\n return entriesEqual(leftHandOperand, rightHandOperand, options);\n case 'Map':\n return entriesEqual(leftHandOperand, rightHandOperand, options);\n default:\n return objectEqual(leftHandOperand, rightHandOperand, options);\n }\n}\n\n/*!\n * Compare two Regular Expressions for equality.\n *\n * @param {RegExp} leftHandOperand\n * @param {RegExp} rightHandOperand\n * @return {Boolean} result\n */\n\nfunction regexpEqual(leftHandOperand, rightHandOperand) {\n return leftHandOperand.toString() === rightHandOperand.toString();\n}\n\n/*!\n * Compare two Sets/Maps for equality. Faster than other equality functions.\n *\n * @param {Set} leftHandOperand\n * @param {Set} rightHandOperand\n * @param {Object} [options] (Optional)\n * @return {Boolean} result\n */\n\nfunction entriesEqual(leftHandOperand, rightHandOperand, options) {\n // IE11 doesn't support Set#entries or Set#@@iterator, so we need manually populate using Set#forEach\n if (leftHandOperand.size !== rightHandOperand.size) {\n return false;\n }\n if (leftHandOperand.size === 0) {\n return true;\n }\n var leftHandItems = [];\n var rightHandItems = [];\n leftHandOperand.forEach(function gatherEntries(key, value) {\n leftHandItems.push([ key, value ]);\n });\n rightHandOperand.forEach(function gatherEntries(key, value) {\n rightHandItems.push([ key, value ]);\n });\n return iterableEqual(leftHandItems.sort(), rightHandItems.sort(), options);\n}\n\n/*!\n * Simple equality for flat iterable objects such as Arrays, TypedArrays or Node.js buffers.\n *\n * @param {Iterable} leftHandOperand\n * @param {Iterable} rightHandOperand\n * @param {Object} [options] (Optional)\n * @return {Boolean} result\n */\n\nfunction iterableEqual(leftHandOperand, rightHandOperand, options) {\n var length = leftHandOperand.length;\n if (length !== rightHandOperand.length) {\n return false;\n }\n if (length === 0) {\n return true;\n }\n var index = -1;\n while (++index < length) {\n if (deepEqual(leftHandOperand[index], rightHandOperand[index], options) === false) {\n return false;\n }\n }\n return true;\n}\n\n/*!\n * Simple equality for generator objects such as those returned by generator functions.\n *\n * @param {Iterable} leftHandOperand\n * @param {Iterable} rightHandOperand\n * @param {Object} [options] (Optional)\n * @return {Boolean} result\n */\n\nfunction generatorEqual(leftHandOperand, rightHandOperand, options) {\n return iterableEqual(getGeneratorEntries(leftHandOperand), getGeneratorEntries(rightHandOperand), options);\n}\n\n/*!\n * Determine if the given object has an @@iterator function.\n *\n * @param {Object} target\n * @return {Boolean} `true` if the object has an @@iterator function.\n */\nfunction hasIteratorFunction(target) {\n return typeof Symbol !== 'undefined' &&\n typeof target === 'object' &&\n typeof Symbol.iterator !== 'undefined' &&\n typeof target[Symbol.iterator] === 'function';\n}\n\n/*!\n * Gets all iterator entries from the given Object. If the Object has no @@iterator function, returns an empty array.\n * This will consume the iterator - which could have side effects depending on the @@iterator implementation.\n *\n * @param {Object} target\n * @returns {Array} an array of entries from the @@iterator function\n */\nfunction getIteratorEntries(target) {\n if (hasIteratorFunction(target)) {\n try {\n return getGeneratorEntries(target[Symbol.iterator]());\n } catch (iteratorError) {\n return [];\n }\n }\n return [];\n}\n\n/*!\n * Gets all entries from a Generator. This will consume the generator - which could have side effects.\n *\n * @param {Generator} target\n * @returns {Array} an array of entries from the Generator.\n */\nfunction getGeneratorEntries(generator) {\n var generatorResult = generator.next();\n var accumulator = [ generatorResult.value ];\n while (generatorResult.done === false) {\n generatorResult = generator.next();\n accumulator.push(generatorResult.value);\n }\n return accumulator;\n}\n\n/*!\n * Gets all own and inherited enumerable keys from a target.\n *\n * @param {Object} target\n * @returns {Array} an array of own and inherited enumerable keys from the target.\n */\nfunction getEnumerableKeys(target) {\n var keys = [];\n for (var key in target) {\n keys.push(key);\n }\n return keys;\n}\n\n/*!\n * Determines if two objects have matching values, given a set of keys. Defers to deepEqual for the equality check of\n * each key. If any value of the given key is not equal, the function will return false (early).\n *\n * @param {Mixed} leftHandOperand\n * @param {Mixed} rightHandOperand\n * @param {Array} keys An array of keys to compare the values of leftHandOperand and rightHandOperand against\n * @param {Object} [options] (Optional)\n * @return {Boolean} result\n */\nfunction keysEqual(leftHandOperand, rightHandOperand, keys, options) {\n var length = keys.length;\n if (length === 0) {\n return true;\n }\n for (var i = 0; i < length; i += 1) {\n if (deepEqual(leftHandOperand[keys[i]], rightHandOperand[keys[i]], options) === false) {\n return false;\n }\n }\n return true;\n}\n\n/*!\n * Recursively check the equality of two Objects. Once basic sameness has been established it will defer to `deepEqual`\n * for each enumerable key in the object.\n *\n * @param {Mixed} leftHandOperand\n * @param {Mixed} rightHandOperand\n * @param {Object} [options] (Optional)\n * @return {Boolean} result\n */\n\nfunction objectEqual(leftHandOperand, rightHandOperand, options) {\n var leftHandKeys = getEnumerableKeys(leftHandOperand);\n var rightHandKeys = getEnumerableKeys(rightHandOperand);\n if (leftHandKeys.length && leftHandKeys.length === rightHandKeys.length) {\n leftHandKeys.sort();\n rightHandKeys.sort();\n if (iterableEqual(leftHandKeys, rightHandKeys) === false) {\n return false;\n }\n return keysEqual(leftHandOperand, rightHandOperand, leftHandKeys, options);\n }\n\n var leftHandEntries = getIteratorEntries(leftHandOperand);\n var rightHandEntries = getIteratorEntries(rightHandOperand);\n if (leftHandEntries.length && leftHandEntries.length === rightHandEntries.length) {\n leftHandEntries.sort();\n rightHandEntries.sort();\n return iterableEqual(leftHandEntries, rightHandEntries, options);\n }\n\n if (leftHandKeys.length === 0 &&\n leftHandEntries.length === 0 &&\n rightHandKeys.length === 0 &&\n rightHandEntries.length === 0) {\n return true;\n }\n\n return false;\n}\n\n/*!\n * Returns true if the argument is a primitive.\n *\n * This intentionally returns true for all objects that can be compared by reference,\n * including functions and symbols.\n *\n * @param {Mixed} value\n * @return {Boolean} result\n */\nfunction isPrimitive(value) {\n return value === null || typeof value !== 'object';\n}\n","var config = require('../config');\n\n/*!\n * Chai - isProxyEnabled helper\n * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\n/**\n * ### .isProxyEnabled()\n *\n * Helper function to check if Chai's proxy protection feature is enabled. If\n * proxies are unsupported or disabled via the user's Chai config, then return\n * false. Otherwise, return true.\n *\n * @namespace Utils\n * @name isProxyEnabled\n */\n\nmodule.exports = function isProxyEnabled() {\n return config.useProxy &&\n typeof Proxy !== 'undefined' &&\n typeof Reflect !== 'undefined';\n};\n","/*!\n * Chai - addProperty utility\n * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\nvar chai = require('../../chai');\nvar flag = require('./flag');\nvar isProxyEnabled = require('./isProxyEnabled');\nvar transferFlags = require('./transferFlags');\n\n/**\n * ### .addProperty(ctx, name, getter)\n *\n * Adds a property to the prototype of an object.\n *\n * utils.addProperty(chai.Assertion.prototype, 'foo', function () {\n * var obj = utils.flag(this, 'object');\n * new chai.Assertion(obj).to.be.instanceof(Foo);\n * });\n *\n * Can also be accessed directly from `chai.Assertion`.\n *\n * chai.Assertion.addProperty('foo', fn);\n *\n * Then can be used as any other assertion.\n *\n * expect(myFoo).to.be.foo;\n *\n * @param {Object} ctx object to which the property is added\n * @param {String} name of property to add\n * @param {Function} getter function to be used for name\n * @namespace Utils\n * @name addProperty\n * @api public\n */\n\nmodule.exports = function addProperty(ctx, name, getter) {\n getter = getter === undefined ? function () {} : getter;\n\n Object.defineProperty(ctx, name,\n { get: function propertyGetter() {\n // Setting the `ssfi` flag to `propertyGetter` causes this function to\n // be the starting point for removing implementation frames from the\n // stack trace of a failed assertion.\n //\n // However, we only want to use this function as the starting point if\n // the `lockSsfi` flag isn't set and proxy protection is disabled.\n //\n // If the `lockSsfi` flag is set, then either this assertion has been\n // overwritten by another assertion, or this assertion is being invoked\n // from inside of another assertion. In the first case, the `ssfi` flag\n // has already been set by the overwriting assertion. In the second\n // case, the `ssfi` flag has already been set by the outer assertion.\n //\n // If proxy protection is enabled, then the `ssfi` flag has already been\n // set by the proxy getter.\n if (!isProxyEnabled() && !flag(this, 'lockSsfi')) {\n flag(this, 'ssfi', propertyGetter);\n }\n\n var result = getter.call(this);\n if (result !== undefined)\n return result;\n\n var newAssertion = new chai.Assertion();\n transferFlags(this, newAssertion);\n return newAssertion;\n }\n , configurable: true\n });\n};\n","var fnLengthDesc = Object.getOwnPropertyDescriptor(function () {}, 'length');\n\n/*!\n * Chai - addLengthGuard utility\n * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\n/**\n * ### .addLengthGuard(fn, assertionName, isChainable)\n *\n * Define `length` as a getter on the given uninvoked method assertion. The\n * getter acts as a guard against chaining `length` directly off of an uninvoked\n * method assertion, which is a problem because it references `function`'s\n * built-in `length` property instead of Chai's `length` assertion. When the\n * getter catches the user making this mistake, it throws an error with a\n * helpful message.\n *\n * There are two ways in which this mistake can be made. The first way is by\n * chaining the `length` assertion directly off of an uninvoked chainable\n * method. In this case, Chai suggests that the user use `lengthOf` instead. The\n * second way is by chaining the `length` assertion directly off of an uninvoked\n * non-chainable method. Non-chainable methods must be invoked prior to\n * chaining. In this case, Chai suggests that the user consult the docs for the\n * given assertion.\n *\n * If the `length` property of functions is unconfigurable, then return `fn`\n * without modification.\n *\n * Note that in ES6, the function's `length` property is configurable, so once\n * support for legacy environments is dropped, Chai's `length` property can\n * replace the built-in function's `length` property, and this length guard will\n * no longer be necessary. In the mean time, maintaining consistency across all\n * environments is the priority.\n *\n * @param {Function} fn\n * @param {String} assertionName\n * @param {Boolean} isChainable\n * @namespace Utils\n * @name addLengthGuard\n */\n\nmodule.exports = function addLengthGuard (fn, assertionName, isChainable) {\n if (!fnLengthDesc.configurable) return fn;\n\n Object.defineProperty(fn, 'length', {\n get: function () {\n if (isChainable) {\n throw Error('Invalid Chai property: ' + assertionName + '.length. Due' +\n ' to a compatibility issue, \"length\" cannot directly follow \"' +\n assertionName + '\". Use \"' + assertionName + '.lengthOf\" instead.');\n }\n\n throw Error('Invalid Chai property: ' + assertionName + '.length. See' +\n ' docs for proper usage of \"' + assertionName + '\".');\n }\n });\n\n return fn;\n};\n","var config = require('../config');\nvar flag = require('./flag');\nvar getProperties = require('./getProperties');\nvar isProxyEnabled = require('./isProxyEnabled');\n\n/*!\n * Chai - proxify utility\n * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\n/**\n * ### .proxify(object)\n *\n * Return a proxy of given object that throws an error when a non-existent\n * property is read. By default, the root cause is assumed to be a misspelled\n * property, and thus an attempt is made to offer a reasonable suggestion from\n * the list of existing properties. However, if a nonChainableMethodName is\n * provided, then the root cause is instead a failure to invoke a non-chainable\n * method prior to reading the non-existent property.\n *\n * If proxies are unsupported or disabled via the user's Chai config, then\n * return object without modification.\n *\n * @param {Object} obj\n * @param {String} nonChainableMethodName\n * @namespace Utils\n * @name proxify\n */\n\nvar builtins = ['__flags', '__methods', '_obj', 'assert'];\n\nmodule.exports = function proxify(obj, nonChainableMethodName) {\n if (!isProxyEnabled()) return obj;\n\n return new Proxy(obj, {\n get: function proxyGetter(target, property) {\n // This check is here because we should not throw errors on Symbol properties\n // such as `Symbol.toStringTag`.\n // The values for which an error should be thrown can be configured using\n // the `config.proxyExcludedKeys` setting.\n if (typeof property === 'string' &&\n config.proxyExcludedKeys.indexOf(property) === -1 &&\n !Reflect.has(target, property)) {\n // Special message for invalid property access of non-chainable methods.\n if (nonChainableMethodName) {\n throw Error('Invalid Chai property: ' + nonChainableMethodName + '.' +\n property + '. See docs for proper usage of \"' +\n nonChainableMethodName + '\".');\n }\n\n // If the property is reasonably close to an existing Chai property,\n // suggest that property to the user. Only suggest properties with a\n // distance less than 4.\n var suggestion = null;\n var suggestionDistance = 4;\n getProperties(target).forEach(function(prop) {\n if (\n !Object.prototype.hasOwnProperty(prop) &&\n builtins.indexOf(prop) === -1\n ) {\n var dist = stringDistanceCapped(\n property,\n prop,\n suggestionDistance\n );\n if (dist < suggestionDistance) {\n suggestion = prop;\n suggestionDistance = dist;\n }\n }\n });\n\n if (suggestion !== null) {\n throw Error('Invalid Chai property: ' + property +\n '. Did you mean \"' + suggestion + '\"?');\n } else {\n throw Error('Invalid Chai property: ' + property);\n }\n }\n\n // Use this proxy getter as the starting point for removing implementation\n // frames from the stack trace of a failed assertion. For property\n // assertions, this prevents the proxy getter from showing up in the stack\n // trace since it's invoked before the property getter. For method and\n // chainable method assertions, this flag will end up getting changed to\n // the method wrapper, which is good since this frame will no longer be in\n // the stack once the method is invoked. Note that Chai builtin assertion\n // properties such as `__flags` are skipped since this is only meant to\n // capture the starting point of an assertion. This step is also skipped\n // if the `lockSsfi` flag is set, thus indicating that this assertion is\n // being called from within another assertion. In that case, the `ssfi`\n // flag is already set to the outer assertion's starting point.\n if (builtins.indexOf(property) === -1 && !flag(target, 'lockSsfi')) {\n flag(target, 'ssfi', proxyGetter);\n }\n\n return Reflect.get(target, property);\n }\n });\n};\n\n/**\n * # stringDistanceCapped(strA, strB, cap)\n * Return the Levenshtein distance between two strings, but no more than cap.\n * @param {string} strA\n * @param {string} strB\n * @param {number} number\n * @return {number} min(string distance between strA and strB, cap)\n * @api private\n */\n\nfunction stringDistanceCapped(strA, strB, cap) {\n if (Math.abs(strA.length - strB.length) >= cap) {\n return cap;\n }\n\n var memo = [];\n // `memo` is a two-dimensional array containing distances.\n // memo[i][j] is the distance between strA.slice(0, i) and\n // strB.slice(0, j).\n for (var i = 0; i <= strA.length; i++) {\n memo[i] = Array(strB.length + 1).fill(0);\n memo[i][0] = i;\n }\n for (var j = 0; j < strB.length; j++) {\n memo[0][j] = j;\n }\n\n for (var i = 1; i <= strA.length; i++) {\n var ch = strA.charCodeAt(i - 1);\n for (var j = 1; j <= strB.length; j++) {\n if (Math.abs(i - j) >= cap) {\n memo[i][j] = cap;\n continue;\n }\n memo[i][j] = Math.min(\n memo[i - 1][j] + 1,\n memo[i][j - 1] + 1,\n memo[i - 1][j - 1] +\n (ch === strB.charCodeAt(j - 1) ? 0 : 1)\n );\n }\n }\n\n return memo[strA.length][strB.length];\n}\n","/*!\n * Chai - addMethod utility\n * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\nvar addLengthGuard = require('./addLengthGuard');\nvar chai = require('../../chai');\nvar flag = require('./flag');\nvar proxify = require('./proxify');\nvar transferFlags = require('./transferFlags');\n\n/**\n * ### .addMethod(ctx, name, method)\n *\n * Adds a method to the prototype of an object.\n *\n * utils.addMethod(chai.Assertion.prototype, 'foo', function (str) {\n * var obj = utils.flag(this, 'object');\n * new chai.Assertion(obj).to.be.equal(str);\n * });\n *\n * Can also be accessed directly from `chai.Assertion`.\n *\n * chai.Assertion.addMethod('foo', fn);\n *\n * Then can be used as any other assertion.\n *\n * expect(fooStr).to.be.foo('bar');\n *\n * @param {Object} ctx object to which the method is added\n * @param {String} name of method to add\n * @param {Function} method function to be used for name\n * @namespace Utils\n * @name addMethod\n * @api public\n */\n\nmodule.exports = function addMethod(ctx, name, method) {\n var methodWrapper = function () {\n // Setting the `ssfi` flag to `methodWrapper` causes this function to be the\n // starting point for removing implementation frames from the stack trace of\n // a failed assertion.\n //\n // However, we only want to use this function as the starting point if the\n // `lockSsfi` flag isn't set.\n //\n // If the `lockSsfi` flag is set, then either this assertion has been\n // overwritten by another assertion, or this assertion is being invoked from\n // inside of another assertion. In the first case, the `ssfi` flag has\n // already been set by the overwriting assertion. In the second case, the\n // `ssfi` flag has already been set by the outer assertion.\n if (!flag(this, 'lockSsfi')) {\n flag(this, 'ssfi', methodWrapper);\n }\n\n var result = method.apply(this, arguments);\n if (result !== undefined)\n return result;\n\n var newAssertion = new chai.Assertion();\n transferFlags(this, newAssertion);\n return newAssertion;\n };\n\n addLengthGuard(methodWrapper, name, false);\n ctx[name] = proxify(methodWrapper, name);\n};\n","/*!\n * Chai - overwriteProperty utility\n * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\nvar chai = require('../../chai');\nvar flag = require('./flag');\nvar isProxyEnabled = require('./isProxyEnabled');\nvar transferFlags = require('./transferFlags');\n\n/**\n * ### .overwriteProperty(ctx, name, fn)\n *\n * Overwrites an already existing property getter and provides\n * access to previous value. Must return function to use as getter.\n *\n * utils.overwriteProperty(chai.Assertion.prototype, 'ok', function (_super) {\n * return function () {\n * var obj = utils.flag(this, 'object');\n * if (obj instanceof Foo) {\n * new chai.Assertion(obj.name).to.equal('bar');\n * } else {\n * _super.call(this);\n * }\n * }\n * });\n *\n *\n * Can also be accessed directly from `chai.Assertion`.\n *\n * chai.Assertion.overwriteProperty('foo', fn);\n *\n * Then can be used as any other assertion.\n *\n * expect(myFoo).to.be.ok;\n *\n * @param {Object} ctx object whose property is to be overwritten\n * @param {String} name of property to overwrite\n * @param {Function} getter function that returns a getter function to be used for name\n * @namespace Utils\n * @name overwriteProperty\n * @api public\n */\n\nmodule.exports = function overwriteProperty(ctx, name, getter) {\n var _get = Object.getOwnPropertyDescriptor(ctx, name)\n , _super = function () {};\n\n if (_get && 'function' === typeof _get.get)\n _super = _get.get\n\n Object.defineProperty(ctx, name,\n { get: function overwritingPropertyGetter() {\n // Setting the `ssfi` flag to `overwritingPropertyGetter` causes this\n // function to be the starting point for removing implementation frames\n // from the stack trace of a failed assertion.\n //\n // However, we only want to use this function as the starting point if\n // the `lockSsfi` flag isn't set and proxy protection is disabled.\n //\n // If the `lockSsfi` flag is set, then either this assertion has been\n // overwritten by another assertion, or this assertion is being invoked\n // from inside of another assertion. In the first case, the `ssfi` flag\n // has already been set by the overwriting assertion. In the second\n // case, the `ssfi` flag has already been set by the outer assertion.\n //\n // If proxy protection is enabled, then the `ssfi` flag has already been\n // set by the proxy getter.\n if (!isProxyEnabled() && !flag(this, 'lockSsfi')) {\n flag(this, 'ssfi', overwritingPropertyGetter);\n }\n\n // Setting the `lockSsfi` flag to `true` prevents the overwritten\n // assertion from changing the `ssfi` flag. By this point, the `ssfi`\n // flag is already set to the correct starting point for this assertion.\n var origLockSsfi = flag(this, 'lockSsfi');\n flag(this, 'lockSsfi', true);\n var result = getter(_super).call(this);\n flag(this, 'lockSsfi', origLockSsfi);\n\n if (result !== undefined) {\n return result;\n }\n\n var newAssertion = new chai.Assertion();\n transferFlags(this, newAssertion);\n return newAssertion;\n }\n , configurable: true\n });\n};\n","/*!\n * Chai - overwriteMethod utility\n * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\nvar addLengthGuard = require('./addLengthGuard');\nvar chai = require('../../chai');\nvar flag = require('./flag');\nvar proxify = require('./proxify');\nvar transferFlags = require('./transferFlags');\n\n/**\n * ### .overwriteMethod(ctx, name, fn)\n *\n * Overwrites an already existing method and provides\n * access to previous function. Must return function\n * to be used for name.\n *\n * utils.overwriteMethod(chai.Assertion.prototype, 'equal', function (_super) {\n * return function (str) {\n * var obj = utils.flag(this, 'object');\n * if (obj instanceof Foo) {\n * new chai.Assertion(obj.value).to.equal(str);\n * } else {\n * _super.apply(this, arguments);\n * }\n * }\n * });\n *\n * Can also be accessed directly from `chai.Assertion`.\n *\n * chai.Assertion.overwriteMethod('foo', fn);\n *\n * Then can be used as any other assertion.\n *\n * expect(myFoo).to.equal('bar');\n *\n * @param {Object} ctx object whose method is to be overwritten\n * @param {String} name of method to overwrite\n * @param {Function} method function that returns a function to be used for name\n * @namespace Utils\n * @name overwriteMethod\n * @api public\n */\n\nmodule.exports = function overwriteMethod(ctx, name, method) {\n var _method = ctx[name]\n , _super = function () {\n throw new Error(name + ' is not a function');\n };\n\n if (_method && 'function' === typeof _method)\n _super = _method;\n\n var overwritingMethodWrapper = function () {\n // Setting the `ssfi` flag to `overwritingMethodWrapper` causes this\n // function to be the starting point for removing implementation frames from\n // the stack trace of a failed assertion.\n //\n // However, we only want to use this function as the starting point if the\n // `lockSsfi` flag isn't set.\n //\n // If the `lockSsfi` flag is set, then either this assertion has been\n // overwritten by another assertion, or this assertion is being invoked from\n // inside of another assertion. In the first case, the `ssfi` flag has\n // already been set by the overwriting assertion. In the second case, the\n // `ssfi` flag has already been set by the outer assertion.\n if (!flag(this, 'lockSsfi')) {\n flag(this, 'ssfi', overwritingMethodWrapper);\n }\n\n // Setting the `lockSsfi` flag to `true` prevents the overwritten assertion\n // from changing the `ssfi` flag. By this point, the `ssfi` flag is already\n // set to the correct starting point for this assertion.\n var origLockSsfi = flag(this, 'lockSsfi');\n flag(this, 'lockSsfi', true);\n var result = method(_super).apply(this, arguments);\n flag(this, 'lockSsfi', origLockSsfi);\n\n if (result !== undefined) {\n return result;\n }\n\n var newAssertion = new chai.Assertion();\n transferFlags(this, newAssertion);\n return newAssertion;\n }\n\n addLengthGuard(overwritingMethodWrapper, name, false);\n ctx[name] = proxify(overwritingMethodWrapper, name);\n};\n","/*!\n * Chai - addChainingMethod utility\n * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\n/*!\n * Module dependencies\n */\n\nvar addLengthGuard = require('./addLengthGuard');\nvar chai = require('../../chai');\nvar flag = require('./flag');\nvar proxify = require('./proxify');\nvar transferFlags = require('./transferFlags');\n\n/*!\n * Module variables\n */\n\n// Check whether `Object.setPrototypeOf` is supported\nvar canSetPrototype = typeof Object.setPrototypeOf === 'function';\n\n// Without `Object.setPrototypeOf` support, this module will need to add properties to a function.\n// However, some of functions' own props are not configurable and should be skipped.\nvar testFn = function() {};\nvar excludeNames = Object.getOwnPropertyNames(testFn).filter(function(name) {\n var propDesc = Object.getOwnPropertyDescriptor(testFn, name);\n\n // Note: PhantomJS 1.x includes `callee` as one of `testFn`'s own properties,\n // but then returns `undefined` as the property descriptor for `callee`. As a\n // workaround, we perform an otherwise unnecessary type-check for `propDesc`,\n // and then filter it out if it's not an object as it should be.\n if (typeof propDesc !== 'object')\n return true;\n\n return !propDesc.configurable;\n});\n\n// Cache `Function` properties\nvar call = Function.prototype.call,\n apply = Function.prototype.apply;\n\n/**\n * ### .addChainableMethod(ctx, name, method, chainingBehavior)\n *\n * Adds a method to an object, such that the method can also be chained.\n *\n * utils.addChainableMethod(chai.Assertion.prototype, 'foo', function (str) {\n * var obj = utils.flag(this, 'object');\n * new chai.Assertion(obj).to.be.equal(str);\n * });\n *\n * Can also be accessed directly from `chai.Assertion`.\n *\n * chai.Assertion.addChainableMethod('foo', fn, chainingBehavior);\n *\n * The result can then be used as both a method assertion, executing both `method` and\n * `chainingBehavior`, or as a language chain, which only executes `chainingBehavior`.\n *\n * expect(fooStr).to.be.foo('bar');\n * expect(fooStr).to.be.foo.equal('foo');\n *\n * @param {Object} ctx object to which the method is added\n * @param {String} name of method to add\n * @param {Function} method function to be used for `name`, when called\n * @param {Function} chainingBehavior function to be called every time the property is accessed\n * @namespace Utils\n * @name addChainableMethod\n * @api public\n */\n\nmodule.exports = function addChainableMethod(ctx, name, method, chainingBehavior) {\n if (typeof chainingBehavior !== 'function') {\n chainingBehavior = function () { };\n }\n\n var chainableBehavior = {\n method: method\n , chainingBehavior: chainingBehavior\n };\n\n // save the methods so we can overwrite them later, if we need to.\n if (!ctx.__methods) {\n ctx.__methods = {};\n }\n ctx.__methods[name] = chainableBehavior;\n\n Object.defineProperty(ctx, name,\n { get: function chainableMethodGetter() {\n chainableBehavior.chainingBehavior.call(this);\n\n var chainableMethodWrapper = function () {\n // Setting the `ssfi` flag to `chainableMethodWrapper` causes this\n // function to be the starting point for removing implementation\n // frames from the stack trace of a failed assertion.\n //\n // However, we only want to use this function as the starting point if\n // the `lockSsfi` flag isn't set.\n //\n // If the `lockSsfi` flag is set, then this assertion is being\n // invoked from inside of another assertion. In this case, the `ssfi`\n // flag has already been set by the outer assertion.\n //\n // Note that overwriting a chainable method merely replaces the saved\n // methods in `ctx.__methods` instead of completely replacing the\n // overwritten assertion. Therefore, an overwriting assertion won't\n // set the `ssfi` or `lockSsfi` flags.\n if (!flag(this, 'lockSsfi')) {\n flag(this, 'ssfi', chainableMethodWrapper);\n }\n\n var result = chainableBehavior.method.apply(this, arguments);\n if (result !== undefined) {\n return result;\n }\n\n var newAssertion = new chai.Assertion();\n transferFlags(this, newAssertion);\n return newAssertion;\n };\n\n addLengthGuard(chainableMethodWrapper, name, true);\n\n // Use `Object.setPrototypeOf` if available\n if (canSetPrototype) {\n // Inherit all properties from the object by replacing the `Function` prototype\n var prototype = Object.create(this);\n // Restore the `call` and `apply` methods from `Function`\n prototype.call = call;\n prototype.apply = apply;\n Object.setPrototypeOf(chainableMethodWrapper, prototype);\n }\n // Otherwise, redefine all properties (slow!)\n else {\n var asserterNames = Object.getOwnPropertyNames(ctx);\n asserterNames.forEach(function (asserterName) {\n if (excludeNames.indexOf(asserterName) !== -1) {\n return;\n }\n\n var pd = Object.getOwnPropertyDescriptor(ctx, asserterName);\n Object.defineProperty(chainableMethodWrapper, asserterName, pd);\n });\n }\n\n transferFlags(this, chainableMethodWrapper);\n return proxify(chainableMethodWrapper);\n }\n , configurable: true\n });\n};\n","/*!\n * Chai - overwriteChainableMethod utility\n * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\nvar chai = require('../../chai');\nvar transferFlags = require('./transferFlags');\n\n/**\n * ### .overwriteChainableMethod(ctx, name, method, chainingBehavior)\n *\n * Overwrites an already existing chainable method\n * and provides access to the previous function or\n * property. Must return functions to be used for\n * name.\n *\n * utils.overwriteChainableMethod(chai.Assertion.prototype, 'lengthOf',\n * function (_super) {\n * }\n * , function (_super) {\n * }\n * );\n *\n * Can also be accessed directly from `chai.Assertion`.\n *\n * chai.Assertion.overwriteChainableMethod('foo', fn, fn);\n *\n * Then can be used as any other assertion.\n *\n * expect(myFoo).to.have.lengthOf(3);\n * expect(myFoo).to.have.lengthOf.above(3);\n *\n * @param {Object} ctx object whose method / property is to be overwritten\n * @param {String} name of method / property to overwrite\n * @param {Function} method function that returns a function to be used for name\n * @param {Function} chainingBehavior function that returns a function to be used for property\n * @namespace Utils\n * @name overwriteChainableMethod\n * @api public\n */\n\nmodule.exports = function overwriteChainableMethod(ctx, name, method, chainingBehavior) {\n var chainableBehavior = ctx.__methods[name];\n\n var _chainingBehavior = chainableBehavior.chainingBehavior;\n chainableBehavior.chainingBehavior = function overwritingChainableMethodGetter() {\n var result = chainingBehavior(_chainingBehavior).call(this);\n if (result !== undefined) {\n return result;\n }\n\n var newAssertion = new chai.Assertion();\n transferFlags(this, newAssertion);\n return newAssertion;\n };\n\n var _method = chainableBehavior.method;\n chainableBehavior.method = function overwritingChainableMethodWrapper() {\n var result = method(_method).apply(this, arguments);\n if (result !== undefined) {\n return result;\n }\n\n var newAssertion = new chai.Assertion();\n transferFlags(this, newAssertion);\n return newAssertion;\n };\n};\n","/*!\n * Chai - compareByInspect utility\n * Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\n/*!\n * Module dependencies\n */\n\nvar inspect = require('./inspect');\n\n/**\n * ### .compareByInspect(mixed, mixed)\n *\n * To be used as a compareFunction with Array.prototype.sort. Compares elements\n * using inspect instead of default behavior of using toString so that Symbols\n * and objects with irregular/missing toString can still be sorted without a\n * TypeError.\n *\n * @param {Mixed} first element to compare\n * @param {Mixed} second element to compare\n * @returns {Number} -1 if 'a' should come before 'b'; otherwise 1\n * @name compareByInspect\n * @namespace Utils\n * @api public\n */\n\nmodule.exports = function compareByInspect(a, b) {\n return inspect(a) < inspect(b) ? -1 : 1;\n};\n","/*!\n * Chai - getOwnEnumerablePropertySymbols utility\n * Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\n/**\n * ### .getOwnEnumerablePropertySymbols(object)\n *\n * This allows the retrieval of directly-owned enumerable property symbols of an\n * object. This function is necessary because Object.getOwnPropertySymbols\n * returns both enumerable and non-enumerable property symbols.\n *\n * @param {Object} object\n * @returns {Array}\n * @namespace Utils\n * @name getOwnEnumerablePropertySymbols\n * @api public\n */\n\nmodule.exports = function getOwnEnumerablePropertySymbols(obj) {\n if (typeof Object.getOwnPropertySymbols !== 'function') return [];\n\n return Object.getOwnPropertySymbols(obj).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(obj, sym).enumerable;\n });\n};\n","/*!\n * Chai - getOwnEnumerableProperties utility\n * Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\n/*!\n * Module dependencies\n */\n\nvar getOwnEnumerablePropertySymbols = require('./getOwnEnumerablePropertySymbols');\n\n/**\n * ### .getOwnEnumerableProperties(object)\n *\n * This allows the retrieval of directly-owned enumerable property names and\n * symbols of an object. This function is necessary because Object.keys only\n * returns enumerable property names, not enumerable property symbols.\n *\n * @param {Object} object\n * @returns {Array}\n * @namespace Utils\n * @name getOwnEnumerableProperties\n * @api public\n */\n\nmodule.exports = function getOwnEnumerableProperties(obj) {\n return Object.keys(obj).concat(getOwnEnumerablePropertySymbols(obj));\n};\n","'use strict';\n\n/* !\n * Chai - checkError utility\n * Copyright(c) 2012-2016 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\n/**\n * ### .checkError\n *\n * Checks that an error conforms to a given set of criteria and/or retrieves information about it.\n *\n * @api public\n */\n\n/**\n * ### .compatibleInstance(thrown, errorLike)\n *\n * Checks if two instances are compatible (strict equal).\n * Returns false if errorLike is not an instance of Error, because instances\n * can only be compatible if they're both error instances.\n *\n * @name compatibleInstance\n * @param {Error} thrown error\n * @param {Error|ErrorConstructor} errorLike object to compare against\n * @namespace Utils\n * @api public\n */\n\nfunction compatibleInstance(thrown, errorLike) {\n return errorLike instanceof Error && thrown === errorLike;\n}\n\n/**\n * ### .compatibleConstructor(thrown, errorLike)\n *\n * Checks if two constructors are compatible.\n * This function can receive either an error constructor or\n * an error instance as the `errorLike` argument.\n * Constructors are compatible if they're the same or if one is\n * an instance of another.\n *\n * @name compatibleConstructor\n * @param {Error} thrown error\n * @param {Error|ErrorConstructor} errorLike object to compare against\n * @namespace Utils\n * @api public\n */\n\nfunction compatibleConstructor(thrown, errorLike) {\n if (errorLike instanceof Error) {\n // If `errorLike` is an instance of any error we compare their constructors\n return thrown.constructor === errorLike.constructor || thrown instanceof errorLike.constructor;\n } else if (errorLike.prototype instanceof Error || errorLike === Error) {\n // If `errorLike` is a constructor that inherits from Error, we compare `thrown` to `errorLike` directly\n return thrown.constructor === errorLike || thrown instanceof errorLike;\n }\n\n return false;\n}\n\n/**\n * ### .compatibleMessage(thrown, errMatcher)\n *\n * Checks if an error's message is compatible with a matcher (String or RegExp).\n * If the message contains the String or passes the RegExp test,\n * it is considered compatible.\n *\n * @name compatibleMessage\n * @param {Error} thrown error\n * @param {String|RegExp} errMatcher to look for into the message\n * @namespace Utils\n * @api public\n */\n\nfunction compatibleMessage(thrown, errMatcher) {\n var comparisonString = typeof thrown === 'string' ? thrown : thrown.message;\n if (errMatcher instanceof RegExp) {\n return errMatcher.test(comparisonString);\n } else if (typeof errMatcher === 'string') {\n return comparisonString.indexOf(errMatcher) !== -1; // eslint-disable-line no-magic-numbers\n }\n\n return false;\n}\n\n/**\n * ### .getFunctionName(constructorFn)\n *\n * Returns the name of a function.\n * This also includes a polyfill function if `constructorFn.name` is not defined.\n *\n * @name getFunctionName\n * @param {Function} constructorFn\n * @namespace Utils\n * @api private\n */\n\nvar functionNameMatch = /\\s*function(?:\\s|\\s*\\/\\*[^(?:*\\/)]+\\*\\/\\s*)*([^\\(\\/]+)/;\nfunction getFunctionName(constructorFn) {\n var name = '';\n if (typeof constructorFn.name === 'undefined') {\n // Here we run a polyfill if constructorFn.name is not defined\n var match = String(constructorFn).match(functionNameMatch);\n if (match) {\n name = match[1];\n }\n } else {\n name = constructorFn.name;\n }\n\n return name;\n}\n\n/**\n * ### .getConstructorName(errorLike)\n *\n * Gets the constructor name for an Error instance or constructor itself.\n *\n * @name getConstructorName\n * @param {Error|ErrorConstructor} errorLike\n * @namespace Utils\n * @api public\n */\n\nfunction getConstructorName(errorLike) {\n var constructorName = errorLike;\n if (errorLike instanceof Error) {\n constructorName = getFunctionName(errorLike.constructor);\n } else if (typeof errorLike === 'function') {\n // If `err` is not an instance of Error it is an error constructor itself or another function.\n // If we've got a common function we get its name, otherwise we may need to create a new instance\n // of the error just in case it's a poorly-constructed error. Please see chaijs/chai/issues/45 to know more.\n constructorName = getFunctionName(errorLike).trim() ||\n getFunctionName(new errorLike()); // eslint-disable-line new-cap\n }\n\n return constructorName;\n}\n\n/**\n * ### .getMessage(errorLike)\n *\n * Gets the error message from an error.\n * If `err` is a String itself, we return it.\n * If the error has no message, we return an empty string.\n *\n * @name getMessage\n * @param {Error|String} errorLike\n * @namespace Utils\n * @api public\n */\n\nfunction getMessage(errorLike) {\n var msg = '';\n if (errorLike && errorLike.message) {\n msg = errorLike.message;\n } else if (typeof errorLike === 'string') {\n msg = errorLike;\n }\n\n return msg;\n}\n\nmodule.exports = {\n compatibleInstance: compatibleInstance,\n compatibleConstructor: compatibleConstructor,\n compatibleMessage: compatibleMessage,\n getMessage: getMessage,\n getConstructorName: getConstructorName,\n};\n","/*!\n * Chai - isNaN utility\n * Copyright(c) 2012-2015 Sakthipriyan Vairamani <thechargingvolcano@gmail.com>\n * MIT Licensed\n */\n\n/**\n * ### .isNaN(value)\n *\n * Checks if the given value is NaN or not.\n *\n * utils.isNaN(NaN); // true\n *\n * @param {Value} The value which has to be checked if it is NaN\n * @name isNaN\n * @api private\n */\n\nfunction isNaN(value) {\n // Refer http://www.ecma-international.org/ecma-262/6.0/#sec-isnan-number\n // section's NOTE.\n return value !== value;\n}\n\n// If ECMAScript 6's Number.isNaN is present, prefer that.\nmodule.exports = Number.isNaN || isNaN;\n","/*!\n * chai\n * Copyright(c) 2011 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\n/*!\n * Dependencies that are used for multiple exports are required here only once\n */\n\nvar pathval = require('pathval');\n\n/*!\n * test utility\n */\n\nexports.test = require('./test');\n\n/*!\n * type utility\n */\n\nexports.type = require('type-detect');\n\n/*!\n * expectTypes utility\n */\nexports.expectTypes = require('./expectTypes');\n\n/*!\n * message utility\n */\n\nexports.getMessage = require('./getMessage');\n\n/*!\n * actual utility\n */\n\nexports.getActual = require('./getActual');\n\n/*!\n * Inspect util\n */\n\nexports.inspect = require('./inspect');\n\n/*!\n * Object Display util\n */\n\nexports.objDisplay = require('./objDisplay');\n\n/*!\n * Flag utility\n */\n\nexports.flag = require('./flag');\n\n/*!\n * Flag transferring utility\n */\n\nexports.transferFlags = require('./transferFlags');\n\n/*!\n * Deep equal utility\n */\n\nexports.eql = require('deep-eql');\n\n/*!\n * Deep path info\n */\n\nexports.getPathInfo = pathval.getPathInfo;\n\n/*!\n * Check if a property exists\n */\n\nexports.hasProperty = pathval.hasProperty;\n\n/*!\n * Function name\n */\n\nexports.getName = require('get-func-name');\n\n/*!\n * add Property\n */\n\nexports.addProperty = require('./addProperty');\n\n/*!\n * add Method\n */\n\nexports.addMethod = require('./addMethod');\n\n/*!\n * overwrite Property\n */\n\nexports.overwriteProperty = require('./overwriteProperty');\n\n/*!\n * overwrite Method\n */\n\nexports.overwriteMethod = require('./overwriteMethod');\n\n/*!\n * Add a chainable method\n */\n\nexports.addChainableMethod = require('./addChainableMethod');\n\n/*!\n * Overwrite chainable method\n */\n\nexports.overwriteChainableMethod = require('./overwriteChainableMethod');\n\n/*!\n * Compare by inspect method\n */\n\nexports.compareByInspect = require('./compareByInspect');\n\n/*!\n * Get own enumerable property symbols method\n */\n\nexports.getOwnEnumerablePropertySymbols = require('./getOwnEnumerablePropertySymbols');\n\n/*!\n * Get own enumerable properties method\n */\n\nexports.getOwnEnumerableProperties = require('./getOwnEnumerableProperties');\n\n/*!\n * Checks error against a given set of criteria\n */\n\nexports.checkError = require('check-error');\n\n/*!\n * Proxify util\n */\n\nexports.proxify = require('./proxify');\n\n/*!\n * addLengthGuard util\n */\n\nexports.addLengthGuard = require('./addLengthGuard');\n\n/*!\n * isProxyEnabled helper\n */\n\nexports.isProxyEnabled = require('./isProxyEnabled');\n\n/*!\n * isNaN method\n */\n\nexports.isNaN = require('./isNaN');\n","/*!\n * chai\n * http://chaijs.com\n * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\nvar config = require('./config');\n\nmodule.exports = function (_chai, util) {\n /*!\n * Module dependencies.\n */\n\n var AssertionError = _chai.AssertionError\n , flag = util.flag;\n\n /*!\n * Module export.\n */\n\n _chai.Assertion = Assertion;\n\n /*!\n * Assertion Constructor\n *\n * Creates object for chaining.\n *\n * `Assertion` objects contain metadata in the form of flags. Three flags can\n * be assigned during instantiation by passing arguments to this constructor:\n *\n * - `object`: This flag contains the target of the assertion. For example, in\n * the assertion `expect(numKittens).to.equal(7);`, the `object` flag will\n * contain `numKittens` so that the `equal` assertion can reference it when\n * needed.\n *\n * - `message`: This flag contains an optional custom error message to be\n * prepended to the error message that's generated by the assertion when it\n * fails.\n *\n * - `ssfi`: This flag stands for \"start stack function indicator\". It\n * contains a function reference that serves as the starting point for\n * removing frames from the stack trace of the error that's created by the\n * assertion when it fails. The goal is to provide a cleaner stack trace to\n * end users by removing Chai's internal functions. Note that it only works\n * in environments that support `Error.captureStackTrace`, and only when\n * `Chai.config.includeStack` hasn't been set to `false`.\n *\n * - `lockSsfi`: This flag controls whether or not the given `ssfi` flag\n * should retain its current value, even as assertions are chained off of\n * this object. This is usually set to `true` when creating a new assertion\n * from within another assertion. It's also temporarily set to `true` before\n * an overwritten assertion gets called by the overwriting assertion.\n *\n * @param {Mixed} obj target of the assertion\n * @param {String} msg (optional) custom error message\n * @param {Function} ssfi (optional) starting point for removing stack frames\n * @param {Boolean} lockSsfi (optional) whether or not the ssfi flag is locked\n * @api private\n */\n\n function Assertion (obj, msg, ssfi, lockSsfi) {\n flag(this, 'ssfi', ssfi || Assertion);\n flag(this, 'lockSsfi', lockSsfi);\n flag(this, 'object', obj);\n flag(this, 'message', msg);\n\n return util.proxify(this);\n }\n\n Object.defineProperty(Assertion, 'includeStack', {\n get: function() {\n console.warn('Assertion.includeStack is deprecated, use chai.config.includeStack instead.');\n return config.includeStack;\n },\n set: function(value) {\n console.warn('Assertion.includeStack is deprecated, use chai.config.includeStack instead.');\n config.includeStack = value;\n }\n });\n\n Object.defineProperty(Assertion, 'showDiff', {\n get: function() {\n console.warn('Assertion.showDiff is deprecated, use chai.config.showDiff instead.');\n return config.showDiff;\n },\n set: function(value) {\n console.warn('Assertion.showDiff is deprecated, use chai.config.showDiff instead.');\n config.showDiff = value;\n }\n });\n\n Assertion.addProperty = function (name, fn) {\n util.addProperty(this.prototype, name, fn);\n };\n\n Assertion.addMethod = function (name, fn) {\n util.addMethod(this.prototype, name, fn);\n };\n\n Assertion.addChainableMethod = function (name, fn, chainingBehavior) {\n util.addChainableMethod(this.prototype, name, fn, chainingBehavior);\n };\n\n Assertion.overwriteProperty = function (name, fn) {\n util.overwriteProperty(this.prototype, name, fn);\n };\n\n Assertion.overwriteMethod = function (name, fn) {\n util.overwriteMethod(this.prototype, name, fn);\n };\n\n Assertion.overwriteChainableMethod = function (name, fn, chainingBehavior) {\n util.overwriteChainableMethod(this.prototype, name, fn, chainingBehavior);\n };\n\n /**\n * ### .assert(expression, message, negateMessage, expected, actual, showDiff)\n *\n * Executes an expression and check expectations. Throws AssertionError for reporting if test doesn't pass.\n *\n * @name assert\n * @param {Philosophical} expression to be tested\n * @param {String|Function} message or function that returns message to display if expression fails\n * @param {String|Function} negatedMessage or function that returns negatedMessage to display if negated expression fails\n * @param {Mixed} expected value (remember to check for negation)\n * @param {Mixed} actual (optional) will default to `this.obj`\n * @param {Boolean} showDiff (optional) when set to `true`, assert will display a diff in addition to the message if expression fails\n * @api private\n */\n\n Assertion.prototype.assert = function (expr, msg, negateMsg, expected, _actual, showDiff) {\n var ok = util.test(this, arguments);\n if (false !== showDiff) showDiff = true;\n if (undefined === expected && undefined === _actual) showDiff = false;\n if (true !== config.showDiff) showDiff = false;\n\n if (!ok) {\n msg = util.getMessage(this, arguments);\n var actual = util.getActual(this, arguments);\n throw new AssertionError(msg, {\n actual: actual\n , expected: expected\n , showDiff: showDiff\n }, (config.includeStack) ? this.assert : flag(this, 'ssfi'));\n }\n };\n\n /*!\n * ### ._obj\n *\n * Quick reference to stored `actual` value for plugin developers.\n *\n * @api private\n */\n\n Object.defineProperty(Assertion.prototype, '_obj',\n { get: function () {\n return flag(this, 'object');\n }\n , set: function (val) {\n flag(this, 'object', val);\n }\n });\n};\n","/*!\n * chai\n * http://chaijs.com\n * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\nmodule.exports = function (chai, _) {\n var Assertion = chai.Assertion\n , AssertionError = chai.AssertionError\n , flag = _.flag;\n\n /**\n * ### Language Chains\n *\n * The following are provided as chainable getters to improve the readability\n * of your assertions.\n *\n * **Chains**\n *\n * - to\n * - be\n * - been\n * - is\n * - that\n * - which\n * - and\n * - has\n * - have\n * - with\n * - at\n * - of\n * - same\n * - but\n * - does\n * - still\n *\n * @name language chains\n * @namespace BDD\n * @api public\n */\n\n [ 'to', 'be', 'been', 'is'\n , 'and', 'has', 'have', 'with'\n , 'that', 'which', 'at', 'of'\n , 'same', 'but', 'does', 'still' ].forEach(function (chain) {\n Assertion.addProperty(chain);\n });\n\n /**\n * ### .not\n *\n * Negates all assertions that follow in the chain.\n *\n * expect(function () {}).to.not.throw();\n * expect({a: 1}).to.not.have.property('b');\n * expect([1, 2]).to.be.an('array').that.does.not.include(3);\n *\n * Just because you can negate any assertion with `.not` doesn't mean you\n * should. With great power comes great responsibility. It's often best to\n * assert that the one expected output was produced, rather than asserting\n * that one of countless unexpected outputs wasn't produced. See individual\n * assertions for specific guidance.\n *\n * expect(2).to.equal(2); // Recommended\n * expect(2).to.not.equal(1); // Not recommended\n *\n * @name not\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('not', function () {\n flag(this, 'negate', true);\n });\n\n /**\n * ### .deep\n *\n * Causes all `.equal`, `.include`, `.members`, `.keys`, and `.property`\n * assertions that follow in the chain to use deep equality instead of strict\n * (`===`) equality. See the `deep-eql` project page for info on the deep\n * equality algorithm: https://github.com/chaijs/deep-eql.\n *\n * // Target object deeply (but not strictly) equals `{a: 1}`\n * expect({a: 1}).to.deep.equal({a: 1});\n * expect({a: 1}).to.not.equal({a: 1});\n *\n * // Target array deeply (but not strictly) includes `{a: 1}`\n * expect([{a: 1}]).to.deep.include({a: 1});\n * expect([{a: 1}]).to.not.include({a: 1});\n *\n * // Target object deeply (but not strictly) includes `x: {a: 1}`\n * expect({x: {a: 1}}).to.deep.include({x: {a: 1}});\n * expect({x: {a: 1}}).to.not.include({x: {a: 1}});\n *\n * // Target array deeply (but not strictly) has member `{a: 1}`\n * expect([{a: 1}]).to.have.deep.members([{a: 1}]);\n * expect([{a: 1}]).to.not.have.members([{a: 1}]);\n *\n * // Target set deeply (but not strictly) has key `{a: 1}`\n * expect(new Set([{a: 1}])).to.have.deep.keys([{a: 1}]);\n * expect(new Set([{a: 1}])).to.not.have.keys([{a: 1}]);\n *\n * // Target object deeply (but not strictly) has property `x: {a: 1}`\n * expect({x: {a: 1}}).to.have.deep.property('x', {a: 1});\n * expect({x: {a: 1}}).to.not.have.property('x', {a: 1});\n *\n * @name deep\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('deep', function () {\n flag(this, 'deep', true);\n });\n\n /**\n * ### .nested\n *\n * Enables dot- and bracket-notation in all `.property` and `.include`\n * assertions that follow in the chain.\n *\n * expect({a: {b: ['x', 'y']}}).to.have.nested.property('a.b[1]');\n * expect({a: {b: ['x', 'y']}}).to.nested.include({'a.b[1]': 'y'});\n *\n * If `.` or `[]` are part of an actual property name, they can be escaped by\n * adding two backslashes before them.\n *\n * expect({'.a': {'[b]': 'x'}}).to.have.nested.property('\\\\.a.\\\\[b\\\\]');\n * expect({'.a': {'[b]': 'x'}}).to.nested.include({'\\\\.a.\\\\[b\\\\]': 'x'});\n *\n * `.nested` cannot be combined with `.own`.\n *\n * @name nested\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('nested', function () {\n flag(this, 'nested', true);\n });\n\n /**\n * ### .own\n *\n * Causes all `.property` and `.include` assertions that follow in the chain\n * to ignore inherited properties.\n *\n * Object.prototype.b = 2;\n *\n * expect({a: 1}).to.have.own.property('a');\n * expect({a: 1}).to.have.property('b');\n * expect({a: 1}).to.not.have.own.property('b');\n *\n * expect({a: 1}).to.own.include({a: 1});\n * expect({a: 1}).to.include({b: 2}).but.not.own.include({b: 2});\n *\n * `.own` cannot be combined with `.nested`.\n *\n * @name own\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('own', function () {\n flag(this, 'own', true);\n });\n\n /**\n * ### .ordered\n *\n * Causes all `.members` assertions that follow in the chain to require that\n * members be in the same order.\n *\n * expect([1, 2]).to.have.ordered.members([1, 2])\n * .but.not.have.ordered.members([2, 1]);\n *\n * When `.include` and `.ordered` are combined, the ordering begins at the\n * start of both arrays.\n *\n * expect([1, 2, 3]).to.include.ordered.members([1, 2])\n * .but.not.include.ordered.members([2, 3]);\n *\n * @name ordered\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('ordered', function () {\n flag(this, 'ordered', true);\n });\n\n /**\n * ### .any\n *\n * Causes all `.keys` assertions that follow in the chain to only require that\n * the target have at least one of the given keys. This is the opposite of\n * `.all`, which requires that the target have all of the given keys.\n *\n * expect({a: 1, b: 2}).to.not.have.any.keys('c', 'd');\n *\n * See the `.keys` doc for guidance on when to use `.any` or `.all`.\n *\n * @name any\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('any', function () {\n flag(this, 'any', true);\n flag(this, 'all', false);\n });\n\n /**\n * ### .all\n *\n * Causes all `.keys` assertions that follow in the chain to require that the\n * target have all of the given keys. This is the opposite of `.any`, which\n * only requires that the target have at least one of the given keys.\n *\n * expect({a: 1, b: 2}).to.have.all.keys('a', 'b');\n *\n * Note that `.all` is used by default when neither `.all` nor `.any` are\n * added earlier in the chain. However, it's often best to add `.all` anyway\n * because it improves readability.\n *\n * See the `.keys` doc for guidance on when to use `.any` or `.all`.\n *\n * @name all\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('all', function () {\n flag(this, 'all', true);\n flag(this, 'any', false);\n });\n\n /**\n * ### .a(type[, msg])\n *\n * Asserts that the target's type is equal to the given string `type`. Types\n * are case insensitive. See the `type-detect` project page for info on the\n * type detection algorithm: https://github.com/chaijs/type-detect.\n *\n * expect('foo').to.be.a('string');\n * expect({a: 1}).to.be.an('object');\n * expect(null).to.be.a('null');\n * expect(undefined).to.be.an('undefined');\n * expect(new Error).to.be.an('error');\n * expect(Promise.resolve()).to.be.a('promise');\n * expect(new Float32Array).to.be.a('float32array');\n * expect(Symbol()).to.be.a('symbol');\n *\n * `.a` supports objects that have a custom type set via `Symbol.toStringTag`.\n *\n * var myObj = {\n * [Symbol.toStringTag]: 'myCustomType'\n * };\n *\n * expect(myObj).to.be.a('myCustomType').but.not.an('object');\n *\n * It's often best to use `.a` to check a target's type before making more\n * assertions on the same target. That way, you avoid unexpected behavior from\n * any assertion that does different things based on the target's type.\n *\n * expect([1, 2, 3]).to.be.an('array').that.includes(2);\n * expect([]).to.be.an('array').that.is.empty;\n *\n * Add `.not` earlier in the chain to negate `.a`. However, it's often best to\n * assert that the target is the expected type, rather than asserting that it\n * isn't one of many unexpected types.\n *\n * expect('foo').to.be.a('string'); // Recommended\n * expect('foo').to.not.be.an('array'); // Not recommended\n *\n * `.a` accepts an optional `msg` argument which is a custom error message to\n * show when the assertion fails. The message can also be given as the second\n * argument to `expect`.\n *\n * expect(1).to.be.a('string', 'nooo why fail??');\n * expect(1, 'nooo why fail??').to.be.a('string');\n *\n * `.a` can also be used as a language chain to improve the readability of\n * your assertions.\n *\n * expect({b: 2}).to.have.a.property('b');\n *\n * The alias `.an` can be used interchangeably with `.a`.\n *\n * @name a\n * @alias an\n * @param {String} type\n * @param {String} msg _optional_\n * @namespace BDD\n * @api public\n */\n\n function an (type, msg) {\n if (msg) flag(this, 'message', msg);\n type = type.toLowerCase();\n var obj = flag(this, 'object')\n , article = ~[ 'a', 'e', 'i', 'o', 'u' ].indexOf(type.charAt(0)) ? 'an ' : 'a ';\n\n this.assert(\n type === _.type(obj).toLowerCase()\n , 'expected #{this} to be ' + article + type\n , 'expected #{this} not to be ' + article + type\n );\n }\n\n Assertion.addChainableMethod('an', an);\n Assertion.addChainableMethod('a', an);\n\n /**\n * ### .include(val[, msg])\n *\n * When the target is a string, `.include` asserts that the given string `val`\n * is a substring of the target.\n *\n * expect('foobar').to.include('foo');\n *\n * When the target is an array, `.include` asserts that the given `val` is a\n * member of the target.\n *\n * expect([1, 2, 3]).to.include(2);\n *\n * When the target is an object, `.include` asserts that the given object\n * `val`'s properties are a subset of the target's properties.\n *\n * expect({a: 1, b: 2, c: 3}).to.include({a: 1, b: 2});\n *\n * When the target is a Set or WeakSet, `.include` asserts that the given `val` is a\n * member of the target. SameValueZero equality algorithm is used.\n *\n * expect(new Set([1, 2])).to.include(2);\n *\n * When the target is a Map, `.include` asserts that the given `val` is one of\n * the values of the target. SameValueZero equality algorithm is used.\n *\n * expect(new Map([['a', 1], ['b', 2]])).to.include(2);\n *\n * Because `.include` does different things based on the target's type, it's\n * important to check the target's type before using `.include`. See the `.a`\n * doc for info on testing a target's type.\n *\n * expect([1, 2, 3]).to.be.an('array').that.includes(2);\n *\n * By default, strict (`===`) equality is used to compare array members and\n * object properties. Add `.deep` earlier in the chain to use deep equality\n * instead (WeakSet targets are not supported). See the `deep-eql` project\n * page for info on the deep equality algorithm: https://github.com/chaijs/deep-eql.\n *\n * // Target array deeply (but not strictly) includes `{a: 1}`\n * expect([{a: 1}]).to.deep.include({a: 1});\n * expect([{a: 1}]).to.not.include({a: 1});\n *\n * // Target object deeply (but not strictly) includes `x: {a: 1}`\n * expect({x: {a: 1}}).to.deep.include({x: {a: 1}});\n * expect({x: {a: 1}}).to.not.include({x: {a: 1}});\n *\n * By default, all of the target's properties are searched when working with\n * objects. This includes properties that are inherited and/or non-enumerable.\n * Add `.own` earlier in the chain to exclude the target's inherited\n * properties from the search.\n *\n * Object.prototype.b = 2;\n *\n * expect({a: 1}).to.own.include({a: 1});\n * expect({a: 1}).to.include({b: 2}).but.not.own.include({b: 2});\n *\n * Note that a target object is always only searched for `val`'s own\n * enumerable properties.\n *\n * `.deep` and `.own` can be combined.\n *\n * expect({a: {b: 2}}).to.deep.own.include({a: {b: 2}});\n *\n * Add `.nested` earlier in the chain to enable dot- and bracket-notation when\n * referencing nested properties.\n *\n * expect({a: {b: ['x', 'y']}}).to.nested.include({'a.b[1]': 'y'});\n *\n * If `.` or `[]` are part of an actual property name, they can be escaped by\n * adding two backslashes before them.\n *\n * expect({'.a': {'[b]': 2}}).to.nested.include({'\\\\.a.\\\\[b\\\\]': 2});\n *\n * `.deep` and `.nested` can be combined.\n *\n * expect({a: {b: [{c: 3}]}}).to.deep.nested.include({'a.b[0]': {c: 3}});\n *\n * `.own` and `.nested` cannot be combined.\n *\n * Add `.not` earlier in the chain to negate `.include`.\n *\n * expect('foobar').to.not.include('taco');\n * expect([1, 2, 3]).to.not.include(4);\n *\n * However, it's dangerous to negate `.include` when the target is an object.\n * The problem is that it creates uncertain expectations by asserting that the\n * target object doesn't have all of `val`'s key/value pairs but may or may\n * not have some of them. It's often best to identify the exact output that's\n * expected, and then write an assertion that only accepts that exact output.\n *\n * When the target object isn't even expected to have `val`'s keys, it's\n * often best to assert exactly that.\n *\n * expect({c: 3}).to.not.have.any.keys('a', 'b'); // Recommended\n * expect({c: 3}).to.not.include({a: 1, b: 2}); // Not recommended\n *\n * When the target object is expected to have `val`'s keys, it's often best to\n * assert that each of the properties has its expected value, rather than\n * asserting that each property doesn't have one of many unexpected values.\n *\n * expect({a: 3, b: 4}).to.include({a: 3, b: 4}); // Recommended\n * expect({a: 3, b: 4}).to.not.include({a: 1, b: 2}); // Not recommended\n *\n * `.include` accepts an optional `msg` argument which is a custom error\n * message to show when the assertion fails. The message can also be given as\n * the second argument to `expect`.\n *\n * expect([1, 2, 3]).to.include(4, 'nooo why fail??');\n * expect([1, 2, 3], 'nooo why fail??').to.include(4);\n *\n * `.include` can also be used as a language chain, causing all `.members` and\n * `.keys` assertions that follow in the chain to require the target to be a\n * superset of the expected set, rather than an identical set. Note that\n * `.members` ignores duplicates in the subset when `.include` is added.\n *\n * // Target object's keys are a superset of ['a', 'b'] but not identical\n * expect({a: 1, b: 2, c: 3}).to.include.all.keys('a', 'b');\n * expect({a: 1, b: 2, c: 3}).to.not.have.all.keys('a', 'b');\n *\n * // Target array is a superset of [1, 2] but not identical\n * expect([1, 2, 3]).to.include.members([1, 2]);\n * expect([1, 2, 3]).to.not.have.members([1, 2]);\n *\n * // Duplicates in the subset are ignored\n * expect([1, 2, 3]).to.include.members([1, 2, 2, 2]);\n *\n * Note that adding `.any` earlier in the chain causes the `.keys` assertion\n * to ignore `.include`.\n *\n * // Both assertions are identical\n * expect({a: 1}).to.include.any.keys('a', 'b');\n * expect({a: 1}).to.have.any.keys('a', 'b');\n *\n * The aliases `.includes`, `.contain`, and `.contains` can be used\n * interchangeably with `.include`.\n *\n * @name include\n * @alias contain\n * @alias includes\n * @alias contains\n * @param {Mixed} val\n * @param {String} msg _optional_\n * @namespace BDD\n * @api public\n */\n\n function SameValueZero(a, b) {\n return (_.isNaN(a) && _.isNaN(b)) || a === b;\n }\n\n function includeChainingBehavior () {\n flag(this, 'contains', true);\n }\n\n function include (val, msg) {\n if (msg) flag(this, 'message', msg);\n\n var obj = flag(this, 'object')\n , objType = _.type(obj).toLowerCase()\n , flagMsg = flag(this, 'message')\n , negate = flag(this, 'negate')\n , ssfi = flag(this, 'ssfi')\n , isDeep = flag(this, 'deep')\n , descriptor = isDeep ? 'deep ' : '';\n\n flagMsg = flagMsg ? flagMsg + ': ' : '';\n\n var included = false;\n\n switch (objType) {\n case 'string':\n included = obj.indexOf(val) !== -1;\n break;\n\n case 'weakset':\n if (isDeep) {\n throw new AssertionError(\n flagMsg + 'unable to use .deep.include with WeakSet',\n undefined,\n ssfi\n );\n }\n\n included = obj.has(val);\n break;\n\n case 'map':\n var isEql = isDeep ? _.eql : SameValueZero;\n obj.forEach(function (item) {\n included = included || isEql(item, val);\n });\n break;\n\n case 'set':\n if (isDeep) {\n obj.forEach(function (item) {\n included = included || _.eql(item, val);\n });\n } else {\n included = obj.has(val);\n }\n break;\n\n case 'array':\n if (isDeep) {\n included = obj.some(function (item) {\n return _.eql(item, val);\n })\n } else {\n included = obj.indexOf(val) !== -1;\n }\n break;\n\n default:\n // This block is for asserting a subset of properties in an object.\n // `_.expectTypes` isn't used here because `.include` should work with\n // objects with a custom `@@toStringTag`.\n if (val !== Object(val)) {\n throw new AssertionError(\n flagMsg + 'object tested must be an array, a map, an object,'\n + ' a set, a string, or a weakset, but ' + objType + ' given',\n undefined,\n ssfi\n );\n }\n\n var props = Object.keys(val)\n , firstErr = null\n , numErrs = 0;\n\n props.forEach(function (prop) {\n var propAssertion = new Assertion(obj);\n _.transferFlags(this, propAssertion, true);\n flag(propAssertion, 'lockSsfi', true);\n\n if (!negate || props.length === 1) {\n propAssertion.property(prop, val[prop]);\n return;\n }\n\n try {\n propAssertion.property(prop, val[prop]);\n } catch (err) {\n if (!_.checkError.compatibleConstructor(err, AssertionError)) {\n throw err;\n }\n if (firstErr === null) firstErr = err;\n numErrs++;\n }\n }, this);\n\n // When validating .not.include with multiple properties, we only want\n // to throw an assertion error if all of the properties are included,\n // in which case we throw the first property assertion error that we\n // encountered.\n if (negate && props.length > 1 && numErrs === props.length) {\n throw firstErr;\n }\n return;\n }\n\n // Assert inclusion in collection or substring in a string.\n this.assert(\n included\n , 'expected #{this} to ' + descriptor + 'include ' + _.inspect(val)\n , 'expected #{this} to not ' + descriptor + 'include ' + _.inspect(val));\n }\n\n Assertion.addChainableMethod('include', include, includeChainingBehavior);\n Assertion.addChainableMethod('contain', include, includeChainingBehavior);\n Assertion.addChainableMethod('contains', include, includeChainingBehavior);\n Assertion.addChainableMethod('includes', include, includeChainingBehavior);\n\n /**\n * ### .ok\n *\n * Asserts that the target is a truthy value (considered `true` in boolean context).\n * However, it's often best to assert that the target is strictly (`===`) or\n * deeply equal to its expected value.\n *\n * expect(1).to.equal(1); // Recommended\n * expect(1).to.be.ok; // Not recommended\n *\n * expect(true).to.be.true; // Recommended\n * expect(true).to.be.ok; // Not recommended\n *\n * Add `.not` earlier in the chain to negate `.ok`.\n *\n * expect(0).to.equal(0); // Recommended\n * expect(0).to.not.be.ok; // Not recommended\n *\n * expect(false).to.be.false; // Recommended\n * expect(false).to.not.be.ok; // Not recommended\n *\n * expect(null).to.be.null; // Recommended\n * expect(null).to.not.be.ok; // Not recommended\n *\n * expect(undefined).to.be.undefined; // Recommended\n * expect(undefined).to.not.be.ok; // Not recommended\n *\n * A custom error message can be given as the second argument to `expect`.\n *\n * expect(false, 'nooo why fail??').to.be.ok;\n *\n * @name ok\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('ok', function () {\n this.assert(\n flag(this, 'object')\n , 'expected #{this} to be truthy'\n , 'expected #{this} to be falsy');\n });\n\n /**\n * ### .true\n *\n * Asserts that the target is strictly (`===`) equal to `true`.\n *\n * expect(true).to.be.true;\n *\n * Add `.not` earlier in the chain to negate `.true`. However, it's often best\n * to assert that the target is equal to its expected value, rather than not\n * equal to `true`.\n *\n * expect(false).to.be.false; // Recommended\n * expect(false).to.not.be.true; // Not recommended\n *\n * expect(1).to.equal(1); // Recommended\n * expect(1).to.not.be.true; // Not recommended\n *\n * A custom error message can be given as the second argument to `expect`.\n *\n * expect(false, 'nooo why fail??').to.be.true;\n *\n * @name true\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('true', function () {\n this.assert(\n true === flag(this, 'object')\n , 'expected #{this} to be true'\n , 'expected #{this} to be false'\n , flag(this, 'negate') ? false : true\n );\n });\n\n /**\n * ### .false\n *\n * Asserts that the target is strictly (`===`) equal to `false`.\n *\n * expect(false).to.be.false;\n *\n * Add `.not` earlier in the chain to negate `.false`. However, it's often\n * best to assert that the target is equal to its expected value, rather than\n * not equal to `false`.\n *\n * expect(true).to.be.true; // Recommended\n * expect(true).to.not.be.false; // Not recommended\n *\n * expect(1).to.equal(1); // Recommended\n * expect(1).to.not.be.false; // Not recommended\n *\n * A custom error message can be given as the second argument to `expect`.\n *\n * expect(true, 'nooo why fail??').to.be.false;\n *\n * @name false\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('false', function () {\n this.assert(\n false === flag(this, 'object')\n , 'expected #{this} to be false'\n , 'expected #{this} to be true'\n , flag(this, 'negate') ? true : false\n );\n });\n\n /**\n * ### .null\n *\n * Asserts that the target is strictly (`===`) equal to `null`.\n *\n * expect(null).to.be.null;\n *\n * Add `.not` earlier in the chain to negate `.null`. However, it's often best\n * to assert that the target is equal to its expected value, rather than not\n * equal to `null`.\n *\n * expect(1).to.equal(1); // Recommended\n * expect(1).to.not.be.null; // Not recommended\n *\n * A custom error message can be given as the second argument to `expect`.\n *\n * expect(42, 'nooo why fail??').to.be.null;\n *\n * @name null\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('null', function () {\n this.assert(\n null === flag(this, 'object')\n , 'expected #{this} to be null'\n , 'expected #{this} not to be null'\n );\n });\n\n /**\n * ### .undefined\n *\n * Asserts that the target is strictly (`===`) equal to `undefined`.\n *\n * expect(undefined).to.be.undefined;\n *\n * Add `.not` earlier in the chain to negate `.undefined`. However, it's often\n * best to assert that the target is equal to its expected value, rather than\n * not equal to `undefined`.\n *\n * expect(1).to.equal(1); // Recommended\n * expect(1).to.not.be.undefined; // Not recommended\n *\n * A custom error message can be given as the second argument to `expect`.\n *\n * expect(42, 'nooo why fail??').to.be.undefined;\n *\n * @name undefined\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('undefined', function () {\n this.assert(\n undefined === flag(this, 'object')\n , 'expected #{this} to be undefined'\n , 'expected #{this} not to be undefined'\n );\n });\n\n /**\n * ### .NaN\n *\n * Asserts that the target is exactly `NaN`.\n *\n * expect(NaN).to.be.NaN;\n *\n * Add `.not` earlier in the chain to negate `.NaN`. However, it's often best\n * to assert that the target is equal to its expected value, rather than not\n * equal to `NaN`.\n *\n * expect('foo').to.equal('foo'); // Recommended\n * expect('foo').to.not.be.NaN; // Not recommended\n *\n * A custom error message can be given as the second argument to `expect`.\n *\n * expect(42, 'nooo why fail??').to.be.NaN;\n *\n * @name NaN\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('NaN', function () {\n this.assert(\n _.isNaN(flag(this, 'object'))\n , 'expected #{this} to be NaN'\n , 'expected #{this} not to be NaN'\n );\n });\n\n /**\n * ### .exist\n *\n * Asserts that the target is not strictly (`===`) equal to either `null` or\n * `undefined`. However, it's often best to assert that the target is equal to\n * its expected value.\n *\n * expect(1).to.equal(1); // Recommended\n * expect(1).to.exist; // Not recommended\n *\n * expect(0).to.equal(0); // Recommended\n * expect(0).to.exist; // Not recommended\n *\n * Add `.not` earlier in the chain to negate `.exist`.\n *\n * expect(null).to.be.null; // Recommended\n * expect(null).to.not.exist; // Not recommended\n *\n * expect(undefined).to.be.undefined; // Recommended\n * expect(undefined).to.not.exist; // Not recommended\n *\n * A custom error message can be given as the second argument to `expect`.\n *\n * expect(null, 'nooo why fail??').to.exist;\n *\n * @name exist\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('exist', function () {\n var val = flag(this, 'object');\n this.assert(\n val !== null && val !== undefined\n , 'expected #{this} to exist'\n , 'expected #{this} to not exist'\n );\n });\n\n /**\n * ### .empty\n *\n * When the target is a string or array, `.empty` asserts that the target's\n * `length` property is strictly (`===`) equal to `0`.\n *\n * expect([]).to.be.empty;\n * expect('').to.be.empty;\n *\n * When the target is a map or set, `.empty` asserts that the target's `size`\n * property is strictly equal to `0`.\n *\n * expect(new Set()).to.be.empty;\n * expect(new Map()).to.be.empty;\n *\n * When the target is a non-function object, `.empty` asserts that the target\n * doesn't have any own enumerable properties. Properties with Symbol-based\n * keys are excluded from the count.\n *\n * expect({}).to.be.empty;\n *\n * Because `.empty` does different things based on the target's type, it's\n * important to check the target's type before using `.empty`. See the `.a`\n * doc for info on testing a target's type.\n *\n * expect([]).to.be.an('array').that.is.empty;\n *\n * Add `.not` earlier in the chain to negate `.empty`. However, it's often\n * best to assert that the target contains its expected number of values,\n * rather than asserting that it's not empty.\n *\n * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended\n * expect([1, 2, 3]).to.not.be.empty; // Not recommended\n *\n * expect(new Set([1, 2, 3])).to.have.property('size', 3); // Recommended\n * expect(new Set([1, 2, 3])).to.not.be.empty; // Not recommended\n *\n * expect(Object.keys({a: 1})).to.have.lengthOf(1); // Recommended\n * expect({a: 1}).to.not.be.empty; // Not recommended\n *\n * A custom error message can be given as the second argument to `expect`.\n *\n * expect([1, 2, 3], 'nooo why fail??').to.be.empty;\n *\n * @name empty\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('empty', function () {\n var val = flag(this, 'object')\n , ssfi = flag(this, 'ssfi')\n , flagMsg = flag(this, 'message')\n , itemsCount;\n\n flagMsg = flagMsg ? flagMsg + ': ' : '';\n\n switch (_.type(val).toLowerCase()) {\n case 'array':\n case 'string':\n itemsCount = val.length;\n break;\n case 'map':\n case 'set':\n itemsCount = val.size;\n break;\n case 'weakmap':\n case 'weakset':\n throw new AssertionError(\n flagMsg + '.empty was passed a weak collection',\n undefined,\n ssfi\n );\n case 'function':\n var msg = flagMsg + '.empty was passed a function ' + _.getName(val);\n throw new AssertionError(msg.trim(), undefined, ssfi);\n default:\n if (val !== Object(val)) {\n throw new AssertionError(\n flagMsg + '.empty was passed non-string primitive ' + _.inspect(val),\n undefined,\n ssfi\n );\n }\n itemsCount = Object.keys(val).length;\n }\n\n this.assert(\n 0 === itemsCount\n , 'expected #{this} to be empty'\n , 'expected #{this} not to be empty'\n );\n });\n\n /**\n * ### .arguments\n *\n * Asserts that the target is an `arguments` object.\n *\n * function test () {\n * expect(arguments).to.be.arguments;\n * }\n *\n * test();\n *\n * Add `.not` earlier in the chain to negate `.arguments`. However, it's often\n * best to assert which type the target is expected to be, rather than\n * asserting that its not an `arguments` object.\n *\n * expect('foo').to.be.a('string'); // Recommended\n * expect('foo').to.not.be.arguments; // Not recommended\n *\n * A custom error message can be given as the second argument to `expect`.\n *\n * expect({}, 'nooo why fail??').to.be.arguments;\n *\n * The alias `.Arguments` can be used interchangeably with `.arguments`.\n *\n * @name arguments\n * @alias Arguments\n * @namespace BDD\n * @api public\n */\n\n function checkArguments () {\n var obj = flag(this, 'object')\n , type = _.type(obj);\n this.assert(\n 'Arguments' === type\n , 'expected #{this} to be arguments but got ' + type\n , 'expected #{this} to not be arguments'\n );\n }\n\n Assertion.addProperty('arguments', checkArguments);\n Assertion.addProperty('Arguments', checkArguments);\n\n /**\n * ### .equal(val[, msg])\n *\n * Asserts that the target is strictly (`===`) equal to the given `val`.\n *\n * expect(1).to.equal(1);\n * expect('foo').to.equal('foo');\n *\n * Add `.deep` earlier in the chain to use deep equality instead. See the\n * `deep-eql` project page for info on the deep equality algorithm:\n * https://github.com/chaijs/deep-eql.\n *\n * // Target object deeply (but not strictly) equals `{a: 1}`\n * expect({a: 1}).to.deep.equal({a: 1});\n * expect({a: 1}).to.not.equal({a: 1});\n *\n * // Target array deeply (but not strictly) equals `[1, 2]`\n * expect([1, 2]).to.deep.equal([1, 2]);\n * expect([1, 2]).to.not.equal([1, 2]);\n *\n * Add `.not` earlier in the chain to negate `.equal`. However, it's often\n * best to assert that the target is equal to its expected value, rather than\n * not equal to one of countless unexpected values.\n *\n * expect(1).to.equal(1); // Recommended\n * expect(1).to.not.equal(2); // Not recommended\n *\n * `.equal` accepts an optional `msg` argument which is a custom error message\n * to show when the assertion fails. The message can also be given as the\n * second argument to `expect`.\n *\n * expect(1).to.equal(2, 'nooo why fail??');\n * expect(1, 'nooo why fail??').to.equal(2);\n *\n * The aliases `.equals` and `eq` can be used interchangeably with `.equal`.\n *\n * @name equal\n * @alias equals\n * @alias eq\n * @param {Mixed} val\n * @param {String} msg _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertEqual (val, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n if (flag(this, 'deep')) {\n var prevLockSsfi = flag(this, 'lockSsfi');\n flag(this, 'lockSsfi', true);\n this.eql(val);\n flag(this, 'lockSsfi', prevLockSsfi);\n } else {\n this.assert(\n val === obj\n , 'expected #{this} to equal #{exp}'\n , 'expected #{this} to not equal #{exp}'\n , val\n , this._obj\n , true\n );\n }\n }\n\n Assertion.addMethod('equal', assertEqual);\n Assertion.addMethod('equals', assertEqual);\n Assertion.addMethod('eq', assertEqual);\n\n /**\n * ### .eql(obj[, msg])\n *\n * Asserts that the target is deeply equal to the given `obj`. See the\n * `deep-eql` project page for info on the deep equality algorithm:\n * https://github.com/chaijs/deep-eql.\n *\n * // Target object is deeply (but not strictly) equal to {a: 1}\n * expect({a: 1}).to.eql({a: 1}).but.not.equal({a: 1});\n *\n * // Target array is deeply (but not strictly) equal to [1, 2]\n * expect([1, 2]).to.eql([1, 2]).but.not.equal([1, 2]);\n *\n * Add `.not` earlier in the chain to negate `.eql`. However, it's often best\n * to assert that the target is deeply equal to its expected value, rather\n * than not deeply equal to one of countless unexpected values.\n *\n * expect({a: 1}).to.eql({a: 1}); // Recommended\n * expect({a: 1}).to.not.eql({b: 2}); // Not recommended\n *\n * `.eql` accepts an optional `msg` argument which is a custom error message\n * to show when the assertion fails. The message can also be given as the\n * second argument to `expect`.\n *\n * expect({a: 1}).to.eql({b: 2}, 'nooo why fail??');\n * expect({a: 1}, 'nooo why fail??').to.eql({b: 2});\n *\n * The alias `.eqls` can be used interchangeably with `.eql`.\n *\n * The `.deep.equal` assertion is almost identical to `.eql` but with one\n * difference: `.deep.equal` causes deep equality comparisons to also be used\n * for any other assertions that follow in the chain.\n *\n * @name eql\n * @alias eqls\n * @param {Mixed} obj\n * @param {String} msg _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertEql(obj, msg) {\n if (msg) flag(this, 'message', msg);\n this.assert(\n _.eql(obj, flag(this, 'object'))\n , 'expected #{this} to deeply equal #{exp}'\n , 'expected #{this} to not deeply equal #{exp}'\n , obj\n , this._obj\n , true\n );\n }\n\n Assertion.addMethod('eql', assertEql);\n Assertion.addMethod('eqls', assertEql);\n\n /**\n * ### .above(n[, msg])\n *\n * Asserts that the target is a number or a date greater than the given number or date `n` respectively.\n * However, it's often best to assert that the target is equal to its expected\n * value.\n *\n * expect(2).to.equal(2); // Recommended\n * expect(2).to.be.above(1); // Not recommended\n *\n * Add `.lengthOf` earlier in the chain to assert that the target's `length`\n * or `size` is greater than the given number `n`.\n *\n * expect('foo').to.have.lengthOf(3); // Recommended\n * expect('foo').to.have.lengthOf.above(2); // Not recommended\n *\n * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended\n * expect([1, 2, 3]).to.have.lengthOf.above(2); // Not recommended\n *\n * Add `.not` earlier in the chain to negate `.above`.\n *\n * expect(2).to.equal(2); // Recommended\n * expect(1).to.not.be.above(2); // Not recommended\n *\n * `.above` accepts an optional `msg` argument which is a custom error message\n * to show when the assertion fails. The message can also be given as the\n * second argument to `expect`.\n *\n * expect(1).to.be.above(2, 'nooo why fail??');\n * expect(1, 'nooo why fail??').to.be.above(2);\n *\n * The aliases `.gt` and `.greaterThan` can be used interchangeably with\n * `.above`.\n *\n * @name above\n * @alias gt\n * @alias greaterThan\n * @param {Number} n\n * @param {String} msg _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertAbove (n, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object')\n , doLength = flag(this, 'doLength')\n , flagMsg = flag(this, 'message')\n , msgPrefix = ((flagMsg) ? flagMsg + ': ' : '')\n , ssfi = flag(this, 'ssfi')\n , objType = _.type(obj).toLowerCase()\n , nType = _.type(n).toLowerCase()\n , errorMessage\n , shouldThrow = true;\n\n if (doLength && objType !== 'map' && objType !== 'set') {\n new Assertion(obj, flagMsg, ssfi, true).to.have.property('length');\n }\n\n if (!doLength && (objType === 'date' && nType !== 'date')) {\n errorMessage = msgPrefix + 'the argument to above must be a date';\n } else if (nType !== 'number' && (doLength || objType === 'number')) {\n errorMessage = msgPrefix + 'the argument to above must be a number';\n } else if (!doLength && (objType !== 'date' && objType !== 'number')) {\n var printObj = (objType === 'string') ? \"'\" + obj + \"'\" : obj;\n errorMessage = msgPrefix + 'expected ' + printObj + ' to be a number or a date';\n } else {\n shouldThrow = false;\n }\n\n if (shouldThrow) {\n throw new AssertionError(errorMessage, undefined, ssfi);\n }\n\n if (doLength) {\n var descriptor = 'length'\n , itemsCount;\n if (objType === 'map' || objType === 'set') {\n descriptor = 'size';\n itemsCount = obj.size;\n } else {\n itemsCount = obj.length;\n }\n this.assert(\n itemsCount > n\n , 'expected #{this} to have a ' + descriptor + ' above #{exp} but got #{act}'\n , 'expected #{this} to not have a ' + descriptor + ' above #{exp}'\n , n\n , itemsCount\n );\n } else {\n this.assert(\n obj > n\n , 'expected #{this} to be above #{exp}'\n , 'expected #{this} to be at most #{exp}'\n , n\n );\n }\n }\n\n Assertion.addMethod('above', assertAbove);\n Assertion.addMethod('gt', assertAbove);\n Assertion.addMethod('greaterThan', assertAbove);\n\n /**\n * ### .least(n[, msg])\n *\n * Asserts that the target is a number or a date greater than or equal to the given\n * number or date `n` respectively. However, it's often best to assert that the target is equal to\n * its expected value.\n *\n * expect(2).to.equal(2); // Recommended\n * expect(2).to.be.at.least(1); // Not recommended\n * expect(2).to.be.at.least(2); // Not recommended\n *\n * Add `.lengthOf` earlier in the chain to assert that the target's `length`\n * or `size` is greater than or equal to the given number `n`.\n *\n * expect('foo').to.have.lengthOf(3); // Recommended\n * expect('foo').to.have.lengthOf.at.least(2); // Not recommended\n *\n * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended\n * expect([1, 2, 3]).to.have.lengthOf.at.least(2); // Not recommended\n *\n * Add `.not` earlier in the chain to negate `.least`.\n *\n * expect(1).to.equal(1); // Recommended\n * expect(1).to.not.be.at.least(2); // Not recommended\n *\n * `.least` accepts an optional `msg` argument which is a custom error message\n * to show when the assertion fails. The message can also be given as the\n * second argument to `expect`.\n *\n * expect(1).to.be.at.least(2, 'nooo why fail??');\n * expect(1, 'nooo why fail??').to.be.at.least(2);\n *\n * The alias `.gte` can be used interchangeably with `.least`.\n *\n * @name least\n * @alias gte\n * @param {Number} n\n * @param {String} msg _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertLeast (n, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object')\n , doLength = flag(this, 'doLength')\n , flagMsg = flag(this, 'message')\n , msgPrefix = ((flagMsg) ? flagMsg + ': ' : '')\n , ssfi = flag(this, 'ssfi')\n , objType = _.type(obj).toLowerCase()\n , nType = _.type(n).toLowerCase()\n , errorMessage\n , shouldThrow = true;\n\n if (doLength && objType !== 'map' && objType !== 'set') {\n new Assertion(obj, flagMsg, ssfi, true).to.have.property('length');\n }\n\n if (!doLength && (objType === 'date' && nType !== 'date')) {\n errorMessage = msgPrefix + 'the argument to least must be a date';\n } else if (nType !== 'number' && (doLength || objType === 'number')) {\n errorMessage = msgPrefix + 'the argument to least must be a number';\n } else if (!doLength && (objType !== 'date' && objType !== 'number')) {\n var printObj = (objType === 'string') ? \"'\" + obj + \"'\" : obj;\n errorMessage = msgPrefix + 'expected ' + printObj + ' to be a number or a date';\n } else {\n shouldThrow = false;\n }\n\n if (shouldThrow) {\n throw new AssertionError(errorMessage, undefined, ssfi);\n }\n\n if (doLength) {\n var descriptor = 'length'\n , itemsCount;\n if (objType === 'map' || objType === 'set') {\n descriptor = 'size';\n itemsCount = obj.size;\n } else {\n itemsCount = obj.length;\n }\n this.assert(\n itemsCount >= n\n , 'expected #{this} to have a ' + descriptor + ' at least #{exp} but got #{act}'\n , 'expected #{this} to have a ' + descriptor + ' below #{exp}'\n , n\n , itemsCount\n );\n } else {\n this.assert(\n obj >= n\n , 'expected #{this} to be at least #{exp}'\n , 'expected #{this} to be below #{exp}'\n , n\n );\n }\n }\n\n Assertion.addMethod('least', assertLeast);\n Assertion.addMethod('gte', assertLeast);\n\n /**\n * ### .below(n[, msg])\n *\n * Asserts that the target is a number or a date less than the given number or date `n` respectively.\n * However, it's often best to assert that the target is equal to its expected\n * value.\n *\n * expect(1).to.equal(1); // Recommended\n * expect(1).to.be.below(2); // Not recommended\n *\n * Add `.lengthOf` earlier in the chain to assert that the target's `length`\n * or `size` is less than the given number `n`.\n *\n * expect('foo').to.have.lengthOf(3); // Recommended\n * expect('foo').to.have.lengthOf.below(4); // Not recommended\n *\n * expect([1, 2, 3]).to.have.length(3); // Recommended\n * expect([1, 2, 3]).to.have.lengthOf.below(4); // Not recommended\n *\n * Add `.not` earlier in the chain to negate `.below`.\n *\n * expect(2).to.equal(2); // Recommended\n * expect(2).to.not.be.below(1); // Not recommended\n *\n * `.below` accepts an optional `msg` argument which is a custom error message\n * to show when the assertion fails. The message can also be given as the\n * second argument to `expect`.\n *\n * expect(2).to.be.below(1, 'nooo why fail??');\n * expect(2, 'nooo why fail??').to.be.below(1);\n *\n * The aliases `.lt` and `.lessThan` can be used interchangeably with\n * `.below`.\n *\n * @name below\n * @alias lt\n * @alias lessThan\n * @param {Number} n\n * @param {String} msg _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertBelow (n, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object')\n , doLength = flag(this, 'doLength')\n , flagMsg = flag(this, 'message')\n , msgPrefix = ((flagMsg) ? flagMsg + ': ' : '')\n , ssfi = flag(this, 'ssfi')\n , objType = _.type(obj).toLowerCase()\n , nType = _.type(n).toLowerCase()\n , errorMessage\n , shouldThrow = true;\n\n if (doLength && objType !== 'map' && objType !== 'set') {\n new Assertion(obj, flagMsg, ssfi, true).to.have.property('length');\n }\n\n if (!doLength && (objType === 'date' && nType !== 'date')) {\n errorMessage = msgPrefix + 'the argument to below must be a date';\n } else if (nType !== 'number' && (doLength || objType === 'number')) {\n errorMessage = msgPrefix + 'the argument to below must be a number';\n } else if (!doLength && (objType !== 'date' && objType !== 'number')) {\n var printObj = (objType === 'string') ? \"'\" + obj + \"'\" : obj;\n errorMessage = msgPrefix + 'expected ' + printObj + ' to be a number or a date';\n } else {\n shouldThrow = false;\n }\n\n if (shouldThrow) {\n throw new AssertionError(errorMessage, undefined, ssfi);\n }\n\n if (doLength) {\n var descriptor = 'length'\n , itemsCount;\n if (objType === 'map' || objType === 'set') {\n descriptor = 'size';\n itemsCount = obj.size;\n } else {\n itemsCount = obj.length;\n }\n this.assert(\n itemsCount < n\n , 'expected #{this} to have a ' + descriptor + ' below #{exp} but got #{act}'\n , 'expected #{this} to not have a ' + descriptor + ' below #{exp}'\n , n\n , itemsCount\n );\n } else {\n this.assert(\n obj < n\n , 'expected #{this} to be below #{exp}'\n , 'expected #{this} to be at least #{exp}'\n , n\n );\n }\n }\n\n Assertion.addMethod('below', assertBelow);\n Assertion.addMethod('lt', assertBelow);\n Assertion.addMethod('lessThan', assertBelow);\n\n /**\n * ### .most(n[, msg])\n *\n * Asserts that the target is a number or a date less than or equal to the given number\n * or date `n` respectively. However, it's often best to assert that the target is equal to its\n * expected value.\n *\n * expect(1).to.equal(1); // Recommended\n * expect(1).to.be.at.most(2); // Not recommended\n * expect(1).to.be.at.most(1); // Not recommended\n *\n * Add `.lengthOf` earlier in the chain to assert that the target's `length`\n * or `size` is less than or equal to the given number `n`.\n *\n * expect('foo').to.have.lengthOf(3); // Recommended\n * expect('foo').to.have.lengthOf.at.most(4); // Not recommended\n *\n * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended\n * expect([1, 2, 3]).to.have.lengthOf.at.most(4); // Not recommended\n *\n * Add `.not` earlier in the chain to negate `.most`.\n *\n * expect(2).to.equal(2); // Recommended\n * expect(2).to.not.be.at.most(1); // Not recommended\n *\n * `.most` accepts an optional `msg` argument which is a custom error message\n * to show when the assertion fails. The message can also be given as the\n * second argument to `expect`.\n *\n * expect(2).to.be.at.most(1, 'nooo why fail??');\n * expect(2, 'nooo why fail??').to.be.at.most(1);\n *\n * The alias `.lte` can be used interchangeably with `.most`.\n *\n * @name most\n * @alias lte\n * @param {Number} n\n * @param {String} msg _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertMost (n, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object')\n , doLength = flag(this, 'doLength')\n , flagMsg = flag(this, 'message')\n , msgPrefix = ((flagMsg) ? flagMsg + ': ' : '')\n , ssfi = flag(this, 'ssfi')\n , objType = _.type(obj).toLowerCase()\n , nType = _.type(n).toLowerCase()\n , errorMessage\n , shouldThrow = true;\n\n if (doLength && objType !== 'map' && objType !== 'set') {\n new Assertion(obj, flagMsg, ssfi, true).to.have.property('length');\n }\n\n if (!doLength && (objType === 'date' && nType !== 'date')) {\n errorMessage = msgPrefix + 'the argument to most must be a date';\n } else if (nType !== 'number' && (doLength || objType === 'number')) {\n errorMessage = msgPrefix + 'the argument to most must be a number';\n } else if (!doLength && (objType !== 'date' && objType !== 'number')) {\n var printObj = (objType === 'string') ? \"'\" + obj + \"'\" : obj;\n errorMessage = msgPrefix + 'expected ' + printObj + ' to be a number or a date';\n } else {\n shouldThrow = false;\n }\n\n if (shouldThrow) {\n throw new AssertionError(errorMessage, undefined, ssfi);\n }\n\n if (doLength) {\n var descriptor = 'length'\n , itemsCount;\n if (objType === 'map' || objType === 'set') {\n descriptor = 'size';\n itemsCount = obj.size;\n } else {\n itemsCount = obj.length;\n }\n this.assert(\n itemsCount <= n\n , 'expected #{this} to have a ' + descriptor + ' at most #{exp} but got #{act}'\n , 'expected #{this} to have a ' + descriptor + ' above #{exp}'\n , n\n , itemsCount\n );\n } else {\n this.assert(\n obj <= n\n , 'expected #{this} to be at most #{exp}'\n , 'expected #{this} to be above #{exp}'\n , n\n );\n }\n }\n\n Assertion.addMethod('most', assertMost);\n Assertion.addMethod('lte', assertMost);\n\n /**\n * ### .within(start, finish[, msg])\n *\n * Asserts that the target is a number or a date greater than or equal to the given\n * number or date `start`, and less than or equal to the given number or date `finish` respectively.\n * However, it's often best to assert that the target is equal to its expected\n * value.\n *\n * expect(2).to.equal(2); // Recommended\n * expect(2).to.be.within(1, 3); // Not recommended\n * expect(2).to.be.within(2, 3); // Not recommended\n * expect(2).to.be.within(1, 2); // Not recommended\n *\n * Add `.lengthOf` earlier in the chain to assert that the target's `length`\n * or `size` is greater than or equal to the given number `start`, and less\n * than or equal to the given number `finish`.\n *\n * expect('foo').to.have.lengthOf(3); // Recommended\n * expect('foo').to.have.lengthOf.within(2, 4); // Not recommended\n *\n * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended\n * expect([1, 2, 3]).to.have.lengthOf.within(2, 4); // Not recommended\n *\n * Add `.not` earlier in the chain to negate `.within`.\n *\n * expect(1).to.equal(1); // Recommended\n * expect(1).to.not.be.within(2, 4); // Not recommended\n *\n * `.within` accepts an optional `msg` argument which is a custom error\n * message to show when the assertion fails. The message can also be given as\n * the second argument to `expect`.\n *\n * expect(4).to.be.within(1, 3, 'nooo why fail??');\n * expect(4, 'nooo why fail??').to.be.within(1, 3);\n *\n * @name within\n * @param {Number} start lower bound inclusive\n * @param {Number} finish upper bound inclusive\n * @param {String} msg _optional_\n * @namespace BDD\n * @api public\n */\n\n Assertion.addMethod('within', function (start, finish, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object')\n , doLength = flag(this, 'doLength')\n , flagMsg = flag(this, 'message')\n , msgPrefix = ((flagMsg) ? flagMsg + ': ' : '')\n , ssfi = flag(this, 'ssfi')\n , objType = _.type(obj).toLowerCase()\n , startType = _.type(start).toLowerCase()\n , finishType = _.type(finish).toLowerCase()\n , errorMessage\n , shouldThrow = true\n , range = (startType === 'date' && finishType === 'date')\n ? start.toUTCString() + '..' + finish.toUTCString()\n : start + '..' + finish;\n\n if (doLength && objType !== 'map' && objType !== 'set') {\n new Assertion(obj, flagMsg, ssfi, true).to.have.property('length');\n }\n\n if (!doLength && (objType === 'date' && (startType !== 'date' || finishType !== 'date'))) {\n errorMessage = msgPrefix + 'the arguments to within must be dates';\n } else if ((startType !== 'number' || finishType !== 'number') && (doLength || objType === 'number')) {\n errorMessage = msgPrefix + 'the arguments to within must be numbers';\n } else if (!doLength && (objType !== 'date' && objType !== 'number')) {\n var printObj = (objType === 'string') ? \"'\" + obj + \"'\" : obj;\n errorMessage = msgPrefix + 'expected ' + printObj + ' to be a number or a date';\n } else {\n shouldThrow = false;\n }\n\n if (shouldThrow) {\n throw new AssertionError(errorMessage, undefined, ssfi);\n }\n\n if (doLength) {\n var descriptor = 'length'\n , itemsCount;\n if (objType === 'map' || objType === 'set') {\n descriptor = 'size';\n itemsCount = obj.size;\n } else {\n itemsCount = obj.length;\n }\n this.assert(\n itemsCount >= start && itemsCount <= finish\n , 'expected #{this} to have a ' + descriptor + ' within ' + range\n , 'expected #{this} to not have a ' + descriptor + ' within ' + range\n );\n } else {\n this.assert(\n obj >= start && obj <= finish\n , 'expected #{this} to be within ' + range\n , 'expected #{this} to not be within ' + range\n );\n }\n });\n\n /**\n * ### .instanceof(constructor[, msg])\n *\n * Asserts that the target is an instance of the given `constructor`.\n *\n * function Cat () { }\n *\n * expect(new Cat()).to.be.an.instanceof(Cat);\n * expect([1, 2]).to.be.an.instanceof(Array);\n *\n * Add `.not` earlier in the chain to negate `.instanceof`.\n *\n * expect({a: 1}).to.not.be.an.instanceof(Array);\n *\n * `.instanceof` accepts an optional `msg` argument which is a custom error\n * message to show when the assertion fails. The message can also be given as\n * the second argument to `expect`.\n *\n * expect(1).to.be.an.instanceof(Array, 'nooo why fail??');\n * expect(1, 'nooo why fail??').to.be.an.instanceof(Array);\n *\n * Due to limitations in ES5, `.instanceof` may not always work as expected\n * when using a transpiler such as Babel or TypeScript. In particular, it may\n * produce unexpected results when subclassing built-in object such as\n * `Array`, `Error`, and `Map`. See your transpiler's docs for details:\n *\n * - ([Babel](https://babeljs.io/docs/usage/caveats/#classes))\n * - ([TypeScript](https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work))\n *\n * The alias `.instanceOf` can be used interchangeably with `.instanceof`.\n *\n * @name instanceof\n * @param {Constructor} constructor\n * @param {String} msg _optional_\n * @alias instanceOf\n * @namespace BDD\n * @api public\n */\n\n function assertInstanceOf (constructor, msg) {\n if (msg) flag(this, 'message', msg);\n\n var target = flag(this, 'object')\n var ssfi = flag(this, 'ssfi');\n var flagMsg = flag(this, 'message');\n\n try {\n var isInstanceOf = target instanceof constructor;\n } catch (err) {\n if (err instanceof TypeError) {\n flagMsg = flagMsg ? flagMsg + ': ' : '';\n throw new AssertionError(\n flagMsg + 'The instanceof assertion needs a constructor but '\n + _.type(constructor) + ' was given.',\n undefined,\n ssfi\n );\n }\n throw err;\n }\n\n var name = _.getName(constructor);\n if (name === null) {\n name = 'an unnamed constructor';\n }\n\n this.assert(\n isInstanceOf\n , 'expected #{this} to be an instance of ' + name\n , 'expected #{this} to not be an instance of ' + name\n );\n };\n\n Assertion.addMethod('instanceof', assertInstanceOf);\n Assertion.addMethod('instanceOf', assertInstanceOf);\n\n /**\n * ### .property(name[, val[, msg]])\n *\n * Asserts that the target has a property with the given key `name`.\n *\n * expect({a: 1}).to.have.property('a');\n *\n * When `val` is provided, `.property` also asserts that the property's value\n * is equal to the given `val`.\n *\n * expect({a: 1}).to.have.property('a', 1);\n *\n * By default, strict (`===`) equality is used. Add `.deep` earlier in the\n * chain to use deep equality instead. See the `deep-eql` project page for\n * info on the deep equality algorithm: https://github.com/chaijs/deep-eql.\n *\n * // Target object deeply (but not strictly) has property `x: {a: 1}`\n * expect({x: {a: 1}}).to.have.deep.property('x', {a: 1});\n * expect({x: {a: 1}}).to.not.have.property('x', {a: 1});\n *\n * The target's enumerable and non-enumerable properties are always included\n * in the search. By default, both own and inherited properties are included.\n * Add `.own` earlier in the chain to exclude inherited properties from the\n * search.\n *\n * Object.prototype.b = 2;\n *\n * expect({a: 1}).to.have.own.property('a');\n * expect({a: 1}).to.have.own.property('a', 1);\n * expect({a: 1}).to.have.property('b');\n * expect({a: 1}).to.not.have.own.property('b');\n *\n * `.deep` and `.own` can be combined.\n *\n * expect({x: {a: 1}}).to.have.deep.own.property('x', {a: 1});\n *\n * Add `.nested` earlier in the chain to enable dot- and bracket-notation when\n * referencing nested properties.\n *\n * expect({a: {b: ['x', 'y']}}).to.have.nested.property('a.b[1]');\n * expect({a: {b: ['x', 'y']}}).to.have.nested.property('a.b[1]', 'y');\n *\n * If `.` or `[]` are part of an actual property name, they can be escaped by\n * adding two backslashes before them.\n *\n * expect({'.a': {'[b]': 'x'}}).to.have.nested.property('\\\\.a.\\\\[b\\\\]');\n *\n * `.deep` and `.nested` can be combined.\n *\n * expect({a: {b: [{c: 3}]}})\n * .to.have.deep.nested.property('a.b[0]', {c: 3});\n *\n * `.own` and `.nested` cannot be combined.\n *\n * Add `.not` earlier in the chain to negate `.property`.\n *\n * expect({a: 1}).to.not.have.property('b');\n *\n * However, it's dangerous to negate `.property` when providing `val`. The\n * problem is that it creates uncertain expectations by asserting that the\n * target either doesn't have a property with the given key `name`, or that it\n * does have a property with the given key `name` but its value isn't equal to\n * the given `val`. It's often best to identify the exact output that's\n * expected, and then write an assertion that only accepts that exact output.\n *\n * When the target isn't expected to have a property with the given key\n * `name`, it's often best to assert exactly that.\n *\n * expect({b: 2}).to.not.have.property('a'); // Recommended\n * expect({b: 2}).to.not.have.property('a', 1); // Not recommended\n *\n * When the target is expected to have a property with the given key `name`,\n * it's often best to assert that the property has its expected value, rather\n * than asserting that it doesn't have one of many unexpected values.\n *\n * expect({a: 3}).to.have.property('a', 3); // Recommended\n * expect({a: 3}).to.not.have.property('a', 1); // Not recommended\n *\n * `.property` changes the target of any assertions that follow in the chain\n * to be the value of the property from the original target object.\n *\n * expect({a: 1}).to.have.property('a').that.is.a('number');\n *\n * `.property` accepts an optional `msg` argument which is a custom error\n * message to show when the assertion fails. The message can also be given as\n * the second argument to `expect`. When not providing `val`, only use the\n * second form.\n *\n * // Recommended\n * expect({a: 1}).to.have.property('a', 2, 'nooo why fail??');\n * expect({a: 1}, 'nooo why fail??').to.have.property('a', 2);\n * expect({a: 1}, 'nooo why fail??').to.have.property('b');\n *\n * // Not recommended\n * expect({a: 1}).to.have.property('b', undefined, 'nooo why fail??');\n *\n * The above assertion isn't the same thing as not providing `val`. Instead,\n * it's asserting that the target object has a `b` property that's equal to\n * `undefined`.\n *\n * The assertions `.ownProperty` and `.haveOwnProperty` can be used\n * interchangeably with `.own.property`.\n *\n * @name property\n * @param {String} name\n * @param {Mixed} val (optional)\n * @param {String} msg _optional_\n * @returns value of property for chaining\n * @namespace BDD\n * @api public\n */\n\n function assertProperty (name, val, msg) {\n if (msg) flag(this, 'message', msg);\n\n var isNested = flag(this, 'nested')\n , isOwn = flag(this, 'own')\n , flagMsg = flag(this, 'message')\n , obj = flag(this, 'object')\n , ssfi = flag(this, 'ssfi')\n , nameType = typeof name;\n\n flagMsg = flagMsg ? flagMsg + ': ' : '';\n\n if (isNested) {\n if (nameType !== 'string') {\n throw new AssertionError(\n flagMsg + 'the argument to property must be a string when using nested syntax',\n undefined,\n ssfi\n );\n }\n } else {\n if (nameType !== 'string' && nameType !== 'number' && nameType !== 'symbol') {\n throw new AssertionError(\n flagMsg + 'the argument to property must be a string, number, or symbol',\n undefined,\n ssfi\n );\n }\n }\n\n if (isNested && isOwn) {\n throw new AssertionError(\n flagMsg + 'The \"nested\" and \"own\" flags cannot be combined.',\n undefined,\n ssfi\n );\n }\n\n if (obj === null || obj === undefined) {\n throw new AssertionError(\n flagMsg + 'Target cannot be null or undefined.',\n undefined,\n ssfi\n );\n }\n\n var isDeep = flag(this, 'deep')\n , negate = flag(this, 'negate')\n , pathInfo = isNested ? _.getPathInfo(obj, name) : null\n , value = isNested ? pathInfo.value : obj[name];\n\n var descriptor = '';\n if (isDeep) descriptor += 'deep ';\n if (isOwn) descriptor += 'own ';\n if (isNested) descriptor += 'nested ';\n descriptor += 'property ';\n\n var hasProperty;\n if (isOwn) hasProperty = Object.prototype.hasOwnProperty.call(obj, name);\n else if (isNested) hasProperty = pathInfo.exists;\n else hasProperty = _.hasProperty(obj, name);\n\n // When performing a negated assertion for both name and val, merely having\n // a property with the given name isn't enough to cause the assertion to\n // fail. It must both have a property with the given name, and the value of\n // that property must equal the given val. Therefore, skip this assertion in\n // favor of the next.\n if (!negate || arguments.length === 1) {\n this.assert(\n hasProperty\n , 'expected #{this} to have ' + descriptor + _.inspect(name)\n , 'expected #{this} to not have ' + descriptor + _.inspect(name));\n }\n\n if (arguments.length > 1) {\n this.assert(\n hasProperty && (isDeep ? _.eql(val, value) : val === value)\n , 'expected #{this} to have ' + descriptor + _.inspect(name) + ' of #{exp}, but got #{act}'\n , 'expected #{this} to not have ' + descriptor + _.inspect(name) + ' of #{act}'\n , val\n , value\n );\n }\n\n flag(this, 'object', value);\n }\n\n Assertion.addMethod('property', assertProperty);\n\n function assertOwnProperty (name, value, msg) {\n flag(this, 'own', true);\n assertProperty.apply(this, arguments);\n }\n\n Assertion.addMethod('ownProperty', assertOwnProperty);\n Assertion.addMethod('haveOwnProperty', assertOwnProperty);\n\n /**\n * ### .ownPropertyDescriptor(name[, descriptor[, msg]])\n *\n * Asserts that the target has its own property descriptor with the given key\n * `name`. Enumerable and non-enumerable properties are included in the\n * search.\n *\n * expect({a: 1}).to.have.ownPropertyDescriptor('a');\n *\n * When `descriptor` is provided, `.ownPropertyDescriptor` also asserts that\n * the property's descriptor is deeply equal to the given `descriptor`. See\n * the `deep-eql` project page for info on the deep equality algorithm:\n * https://github.com/chaijs/deep-eql.\n *\n * expect({a: 1}).to.have.ownPropertyDescriptor('a', {\n * configurable: true,\n * enumerable: true,\n * writable: true,\n * value: 1,\n * });\n *\n * Add `.not` earlier in the chain to negate `.ownPropertyDescriptor`.\n *\n * expect({a: 1}).to.not.have.ownPropertyDescriptor('b');\n *\n * However, it's dangerous to negate `.ownPropertyDescriptor` when providing\n * a `descriptor`. The problem is that it creates uncertain expectations by\n * asserting that the target either doesn't have a property descriptor with\n * the given key `name`, or that it does have a property descriptor with the\n * given key `name` but its not deeply equal to the given `descriptor`. It's\n * often best to identify the exact output that's expected, and then write an\n * assertion that only accepts that exact output.\n *\n * When the target isn't expected to have a property descriptor with the given\n * key `name`, it's often best to assert exactly that.\n *\n * // Recommended\n * expect({b: 2}).to.not.have.ownPropertyDescriptor('a');\n *\n * // Not recommended\n * expect({b: 2}).to.not.have.ownPropertyDescriptor('a', {\n * configurable: true,\n * enumerable: true,\n * writable: true,\n * value: 1,\n * });\n *\n * When the target is expected to have a property descriptor with the given\n * key `name`, it's often best to assert that the property has its expected\n * descriptor, rather than asserting that it doesn't have one of many\n * unexpected descriptors.\n *\n * // Recommended\n * expect({a: 3}).to.have.ownPropertyDescriptor('a', {\n * configurable: true,\n * enumerable: true,\n * writable: true,\n * value: 3,\n * });\n *\n * // Not recommended\n * expect({a: 3}).to.not.have.ownPropertyDescriptor('a', {\n * configurable: true,\n * enumerable: true,\n * writable: true,\n * value: 1,\n * });\n *\n * `.ownPropertyDescriptor` changes the target of any assertions that follow\n * in the chain to be the value of the property descriptor from the original\n * target object.\n *\n * expect({a: 1}).to.have.ownPropertyDescriptor('a')\n * .that.has.property('enumerable', true);\n *\n * `.ownPropertyDescriptor` accepts an optional `msg` argument which is a\n * custom error message to show when the assertion fails. The message can also\n * be given as the second argument to `expect`. When not providing\n * `descriptor`, only use the second form.\n *\n * // Recommended\n * expect({a: 1}).to.have.ownPropertyDescriptor('a', {\n * configurable: true,\n * enumerable: true,\n * writable: true,\n * value: 2,\n * }, 'nooo why fail??');\n *\n * // Recommended\n * expect({a: 1}, 'nooo why fail??').to.have.ownPropertyDescriptor('a', {\n * configurable: true,\n * enumerable: true,\n * writable: true,\n * value: 2,\n * });\n *\n * // Recommended\n * expect({a: 1}, 'nooo why fail??').to.have.ownPropertyDescriptor('b');\n *\n * // Not recommended\n * expect({a: 1})\n * .to.have.ownPropertyDescriptor('b', undefined, 'nooo why fail??');\n *\n * The above assertion isn't the same thing as not providing `descriptor`.\n * Instead, it's asserting that the target object has a `b` property\n * descriptor that's deeply equal to `undefined`.\n *\n * The alias `.haveOwnPropertyDescriptor` can be used interchangeably with\n * `.ownPropertyDescriptor`.\n *\n * @name ownPropertyDescriptor\n * @alias haveOwnPropertyDescriptor\n * @param {String} name\n * @param {Object} descriptor _optional_\n * @param {String} msg _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertOwnPropertyDescriptor (name, descriptor, msg) {\n if (typeof descriptor === 'string') {\n msg = descriptor;\n descriptor = null;\n }\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n var actualDescriptor = Object.getOwnPropertyDescriptor(Object(obj), name);\n if (actualDescriptor && descriptor) {\n this.assert(\n _.eql(descriptor, actualDescriptor)\n , 'expected the own property descriptor for ' + _.inspect(name) + ' on #{this} to match ' + _.inspect(descriptor) + ', got ' + _.inspect(actualDescriptor)\n , 'expected the own property descriptor for ' + _.inspect(name) + ' on #{this} to not match ' + _.inspect(descriptor)\n , descriptor\n , actualDescriptor\n , true\n );\n } else {\n this.assert(\n actualDescriptor\n , 'expected #{this} to have an own property descriptor for ' + _.inspect(name)\n , 'expected #{this} to not have an own property descriptor for ' + _.inspect(name)\n );\n }\n flag(this, 'object', actualDescriptor);\n }\n\n Assertion.addMethod('ownPropertyDescriptor', assertOwnPropertyDescriptor);\n Assertion.addMethod('haveOwnPropertyDescriptor', assertOwnPropertyDescriptor);\n\n /**\n * ### .lengthOf(n[, msg])\n *\n * Asserts that the target's `length` or `size` is equal to the given number\n * `n`.\n *\n * expect([1, 2, 3]).to.have.lengthOf(3);\n * expect('foo').to.have.lengthOf(3);\n * expect(new Set([1, 2, 3])).to.have.lengthOf(3);\n * expect(new Map([['a', 1], ['b', 2], ['c', 3]])).to.have.lengthOf(3);\n *\n * Add `.not` earlier in the chain to negate `.lengthOf`. However, it's often\n * best to assert that the target's `length` property is equal to its expected\n * value, rather than not equal to one of many unexpected values.\n *\n * expect('foo').to.have.lengthOf(3); // Recommended\n * expect('foo').to.not.have.lengthOf(4); // Not recommended\n *\n * `.lengthOf` accepts an optional `msg` argument which is a custom error\n * message to show when the assertion fails. The message can also be given as\n * the second argument to `expect`.\n *\n * expect([1, 2, 3]).to.have.lengthOf(2, 'nooo why fail??');\n * expect([1, 2, 3], 'nooo why fail??').to.have.lengthOf(2);\n *\n * `.lengthOf` can also be used as a language chain, causing all `.above`,\n * `.below`, `.least`, `.most`, and `.within` assertions that follow in the\n * chain to use the target's `length` property as the target. However, it's\n * often best to assert that the target's `length` property is equal to its\n * expected length, rather than asserting that its `length` property falls\n * within some range of values.\n *\n * // Recommended\n * expect([1, 2, 3]).to.have.lengthOf(3);\n *\n * // Not recommended\n * expect([1, 2, 3]).to.have.lengthOf.above(2);\n * expect([1, 2, 3]).to.have.lengthOf.below(4);\n * expect([1, 2, 3]).to.have.lengthOf.at.least(3);\n * expect([1, 2, 3]).to.have.lengthOf.at.most(3);\n * expect([1, 2, 3]).to.have.lengthOf.within(2,4);\n *\n * Due to a compatibility issue, the alias `.length` can't be chained directly\n * off of an uninvoked method such as `.a`. Therefore, `.length` can't be used\n * interchangeably with `.lengthOf` in every situation. It's recommended to\n * always use `.lengthOf` instead of `.length`.\n *\n * expect([1, 2, 3]).to.have.a.length(3); // incompatible; throws error\n * expect([1, 2, 3]).to.have.a.lengthOf(3); // passes as expected\n *\n * @name lengthOf\n * @alias length\n * @param {Number} n\n * @param {String} msg _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertLengthChain () {\n flag(this, 'doLength', true);\n }\n\n function assertLength (n, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object')\n , objType = _.type(obj).toLowerCase()\n , flagMsg = flag(this, 'message')\n , ssfi = flag(this, 'ssfi')\n , descriptor = 'length'\n , itemsCount;\n\n switch (objType) {\n case 'map':\n case 'set':\n descriptor = 'size';\n itemsCount = obj.size;\n break;\n default:\n new Assertion(obj, flagMsg, ssfi, true).to.have.property('length');\n itemsCount = obj.length;\n }\n\n this.assert(\n itemsCount == n\n , 'expected #{this} to have a ' + descriptor + ' of #{exp} but got #{act}'\n , 'expected #{this} to not have a ' + descriptor + ' of #{act}'\n , n\n , itemsCount\n );\n }\n\n Assertion.addChainableMethod('length', assertLength, assertLengthChain);\n Assertion.addChainableMethod('lengthOf', assertLength, assertLengthChain);\n\n /**\n * ### .match(re[, msg])\n *\n * Asserts that the target matches the given regular expression `re`.\n *\n * expect('foobar').to.match(/^foo/);\n *\n * Add `.not` earlier in the chain to negate `.match`.\n *\n * expect('foobar').to.not.match(/taco/);\n *\n * `.match` accepts an optional `msg` argument which is a custom error message\n * to show when the assertion fails. The message can also be given as the\n * second argument to `expect`.\n *\n * expect('foobar').to.match(/taco/, 'nooo why fail??');\n * expect('foobar', 'nooo why fail??').to.match(/taco/);\n *\n * The alias `.matches` can be used interchangeably with `.match`.\n *\n * @name match\n * @alias matches\n * @param {RegExp} re\n * @param {String} msg _optional_\n * @namespace BDD\n * @api public\n */\n function assertMatch(re, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n this.assert(\n re.exec(obj)\n , 'expected #{this} to match ' + re\n , 'expected #{this} not to match ' + re\n );\n }\n\n Assertion.addMethod('match', assertMatch);\n Assertion.addMethod('matches', assertMatch);\n\n /**\n * ### .string(str[, msg])\n *\n * Asserts that the target string contains the given substring `str`.\n *\n * expect('foobar').to.have.string('bar');\n *\n * Add `.not` earlier in the chain to negate `.string`.\n *\n * expect('foobar').to.not.have.string('taco');\n *\n * `.string` accepts an optional `msg` argument which is a custom error\n * message to show when the assertion fails. The message can also be given as\n * the second argument to `expect`.\n *\n * expect('foobar').to.have.string('taco', 'nooo why fail??');\n * expect('foobar', 'nooo why fail??').to.have.string('taco');\n *\n * @name string\n * @param {String} str\n * @param {String} msg _optional_\n * @namespace BDD\n * @api public\n */\n\n Assertion.addMethod('string', function (str, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object')\n , flagMsg = flag(this, 'message')\n , ssfi = flag(this, 'ssfi');\n new Assertion(obj, flagMsg, ssfi, true).is.a('string');\n\n this.assert(\n ~obj.indexOf(str)\n , 'expected #{this} to contain ' + _.inspect(str)\n , 'expected #{this} to not contain ' + _.inspect(str)\n );\n });\n\n /**\n * ### .keys(key1[, key2[, ...]])\n *\n * Asserts that the target object, array, map, or set has the given keys. Only\n * the target's own inherited properties are included in the search.\n *\n * When the target is an object or array, keys can be provided as one or more\n * string arguments, a single array argument, or a single object argument. In\n * the latter case, only the keys in the given object matter; the values are\n * ignored.\n *\n * expect({a: 1, b: 2}).to.have.all.keys('a', 'b');\n * expect(['x', 'y']).to.have.all.keys(0, 1);\n *\n * expect({a: 1, b: 2}).to.have.all.keys(['a', 'b']);\n * expect(['x', 'y']).to.have.all.keys([0, 1]);\n *\n * expect({a: 1, b: 2}).to.have.all.keys({a: 4, b: 5}); // ignore 4 and 5\n * expect(['x', 'y']).to.have.all.keys({0: 4, 1: 5}); // ignore 4 and 5\n *\n * When the target is a map or set, each key must be provided as a separate\n * argument.\n *\n * expect(new Map([['a', 1], ['b', 2]])).to.have.all.keys('a', 'b');\n * expect(new Set(['a', 'b'])).to.have.all.keys('a', 'b');\n *\n * Because `.keys` does different things based on the target's type, it's\n * important to check the target's type before using `.keys`. See the `.a` doc\n * for info on testing a target's type.\n *\n * expect({a: 1, b: 2}).to.be.an('object').that.has.all.keys('a', 'b');\n *\n * By default, strict (`===`) equality is used to compare keys of maps and\n * sets. Add `.deep` earlier in the chain to use deep equality instead. See\n * the `deep-eql` project page for info on the deep equality algorithm:\n * https://github.com/chaijs/deep-eql.\n *\n * // Target set deeply (but not strictly) has key `{a: 1}`\n * expect(new Set([{a: 1}])).to.have.all.deep.keys([{a: 1}]);\n * expect(new Set([{a: 1}])).to.not.have.all.keys([{a: 1}]);\n *\n * By default, the target must have all of the given keys and no more. Add\n * `.any` earlier in the chain to only require that the target have at least\n * one of the given keys. Also, add `.not` earlier in the chain to negate\n * `.keys`. It's often best to add `.any` when negating `.keys`, and to use\n * `.all` when asserting `.keys` without negation.\n *\n * When negating `.keys`, `.any` is preferred because `.not.any.keys` asserts\n * exactly what's expected of the output, whereas `.not.all.keys` creates\n * uncertain expectations.\n *\n * // Recommended; asserts that target doesn't have any of the given keys\n * expect({a: 1, b: 2}).to.not.have.any.keys('c', 'd');\n *\n * // Not recommended; asserts that target doesn't have all of the given\n * // keys but may or may not have some of them\n * expect({a: 1, b: 2}).to.not.have.all.keys('c', 'd');\n *\n * When asserting `.keys` without negation, `.all` is preferred because\n * `.all.keys` asserts exactly what's expected of the output, whereas\n * `.any.keys` creates uncertain expectations.\n *\n * // Recommended; asserts that target has all the given keys\n * expect({a: 1, b: 2}).to.have.all.keys('a', 'b');\n *\n * // Not recommended; asserts that target has at least one of the given\n * // keys but may or may not have more of them\n * expect({a: 1, b: 2}).to.have.any.keys('a', 'b');\n *\n * Note that `.all` is used by default when neither `.all` nor `.any` appear\n * earlier in the chain. However, it's often best to add `.all` anyway because\n * it improves readability.\n *\n * // Both assertions are identical\n * expect({a: 1, b: 2}).to.have.all.keys('a', 'b'); // Recommended\n * expect({a: 1, b: 2}).to.have.keys('a', 'b'); // Not recommended\n *\n * Add `.include` earlier in the chain to require that the target's keys be a\n * superset of the expected keys, rather than identical sets.\n *\n * // Target object's keys are a superset of ['a', 'b'] but not identical\n * expect({a: 1, b: 2, c: 3}).to.include.all.keys('a', 'b');\n * expect({a: 1, b: 2, c: 3}).to.not.have.all.keys('a', 'b');\n *\n * However, if `.any` and `.include` are combined, only the `.any` takes\n * effect. The `.include` is ignored in this case.\n *\n * // Both assertions are identical\n * expect({a: 1}).to.have.any.keys('a', 'b');\n * expect({a: 1}).to.include.any.keys('a', 'b');\n *\n * A custom error message can be given as the second argument to `expect`.\n *\n * expect({a: 1}, 'nooo why fail??').to.have.key('b');\n *\n * The alias `.key` can be used interchangeably with `.keys`.\n *\n * @name keys\n * @alias key\n * @param {...String|Array|Object} keys\n * @namespace BDD\n * @api public\n */\n\n function assertKeys (keys) {\n var obj = flag(this, 'object')\n , objType = _.type(obj)\n , keysType = _.type(keys)\n , ssfi = flag(this, 'ssfi')\n , isDeep = flag(this, 'deep')\n , str\n , deepStr = ''\n , actual\n , ok = true\n , flagMsg = flag(this, 'message');\n\n flagMsg = flagMsg ? flagMsg + ': ' : '';\n var mixedArgsMsg = flagMsg + 'when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments';\n\n if (objType === 'Map' || objType === 'Set') {\n deepStr = isDeep ? 'deeply ' : '';\n actual = [];\n\n // Map and Set '.keys' aren't supported in IE 11. Therefore, use .forEach.\n obj.forEach(function (val, key) { actual.push(key) });\n\n if (keysType !== 'Array') {\n keys = Array.prototype.slice.call(arguments);\n }\n } else {\n actual = _.getOwnEnumerableProperties(obj);\n\n switch (keysType) {\n case 'Array':\n if (arguments.length > 1) {\n throw new AssertionError(mixedArgsMsg, undefined, ssfi);\n }\n break;\n case 'Object':\n if (arguments.length > 1) {\n throw new AssertionError(mixedArgsMsg, undefined, ssfi);\n }\n keys = Object.keys(keys);\n break;\n default:\n keys = Array.prototype.slice.call(arguments);\n }\n\n // Only stringify non-Symbols because Symbols would become \"Symbol()\"\n keys = keys.map(function (val) {\n return typeof val === 'symbol' ? val : String(val);\n });\n }\n\n if (!keys.length) {\n throw new AssertionError(flagMsg + 'keys required', undefined, ssfi);\n }\n\n var len = keys.length\n , any = flag(this, 'any')\n , all = flag(this, 'all')\n , expected = keys;\n\n if (!any && !all) {\n all = true;\n }\n\n // Has any\n if (any) {\n ok = expected.some(function(expectedKey) {\n return actual.some(function(actualKey) {\n if (isDeep) {\n return _.eql(expectedKey, actualKey);\n } else {\n return expectedKey === actualKey;\n }\n });\n });\n }\n\n // Has all\n if (all) {\n ok = expected.every(function(expectedKey) {\n return actual.some(function(actualKey) {\n if (isDeep) {\n return _.eql(expectedKey, actualKey);\n } else {\n return expectedKey === actualKey;\n }\n });\n });\n\n if (!flag(this, 'contains')) {\n ok = ok && keys.length == actual.length;\n }\n }\n\n // Key string\n if (len > 1) {\n keys = keys.map(function(key) {\n return _.inspect(key);\n });\n var last = keys.pop();\n if (all) {\n str = keys.join(', ') + ', and ' + last;\n }\n if (any) {\n str = keys.join(', ') + ', or ' + last;\n }\n } else {\n str = _.inspect(keys[0]);\n }\n\n // Form\n str = (len > 1 ? 'keys ' : 'key ') + str;\n\n // Have / include\n str = (flag(this, 'contains') ? 'contain ' : 'have ') + str;\n\n // Assertion\n this.assert(\n ok\n , 'expected #{this} to ' + deepStr + str\n , 'expected #{this} to not ' + deepStr + str\n , expected.slice(0).sort(_.compareByInspect)\n , actual.sort(_.compareByInspect)\n , true\n );\n }\n\n Assertion.addMethod('keys', assertKeys);\n Assertion.addMethod('key', assertKeys);\n\n /**\n * ### .throw([errorLike], [errMsgMatcher], [msg])\n *\n * When no arguments are provided, `.throw` invokes the target function and\n * asserts that an error is thrown.\n *\n * var badFn = function () { throw new TypeError('Illegal salmon!'); };\n *\n * expect(badFn).to.throw();\n *\n * When one argument is provided, and it's an error constructor, `.throw`\n * invokes the target function and asserts that an error is thrown that's an\n * instance of that error constructor.\n *\n * var badFn = function () { throw new TypeError('Illegal salmon!'); };\n *\n * expect(badFn).to.throw(TypeError);\n *\n * When one argument is provided, and it's an error instance, `.throw` invokes\n * the target function and asserts that an error is thrown that's strictly\n * (`===`) equal to that error instance.\n *\n * var err = new TypeError('Illegal salmon!');\n * var badFn = function () { throw err; };\n *\n * expect(badFn).to.throw(err);\n *\n * When one argument is provided, and it's a string, `.throw` invokes the\n * target function and asserts that an error is thrown with a message that\n * contains that string.\n *\n * var badFn = function () { throw new TypeError('Illegal salmon!'); };\n *\n * expect(badFn).to.throw('salmon');\n *\n * When one argument is provided, and it's a regular expression, `.throw`\n * invokes the target function and asserts that an error is thrown with a\n * message that matches that regular expression.\n *\n * var badFn = function () { throw new TypeError('Illegal salmon!'); };\n *\n * expect(badFn).to.throw(/salmon/);\n *\n * When two arguments are provided, and the first is an error instance or\n * constructor, and the second is a string or regular expression, `.throw`\n * invokes the function and asserts that an error is thrown that fulfills both\n * conditions as described above.\n *\n * var err = new TypeError('Illegal salmon!');\n * var badFn = function () { throw err; };\n *\n * expect(badFn).to.throw(TypeError, 'salmon');\n * expect(badFn).to.throw(TypeError, /salmon/);\n * expect(badFn).to.throw(err, 'salmon');\n * expect(badFn).to.throw(err, /salmon/);\n *\n * Add `.not` earlier in the chain to negate `.throw`.\n *\n * var goodFn = function () {};\n *\n * expect(goodFn).to.not.throw();\n *\n * However, it's dangerous to negate `.throw` when providing any arguments.\n * The problem is that it creates uncertain expectations by asserting that the\n * target either doesn't throw an error, or that it throws an error but of a\n * different type than the given type, or that it throws an error of the given\n * type but with a message that doesn't include the given string. It's often\n * best to identify the exact output that's expected, and then write an\n * assertion that only accepts that exact output.\n *\n * When the target isn't expected to throw an error, it's often best to assert\n * exactly that.\n *\n * var goodFn = function () {};\n *\n * expect(goodFn).to.not.throw(); // Recommended\n * expect(goodFn).to.not.throw(ReferenceError, 'x'); // Not recommended\n *\n * When the target is expected to throw an error, it's often best to assert\n * that the error is of its expected type, and has a message that includes an\n * expected string, rather than asserting that it doesn't have one of many\n * unexpected types, and doesn't have a message that includes some string.\n *\n * var badFn = function () { throw new TypeError('Illegal salmon!'); };\n *\n * expect(badFn).to.throw(TypeError, 'salmon'); // Recommended\n * expect(badFn).to.not.throw(ReferenceError, 'x'); // Not recommended\n *\n * `.throw` changes the target of any assertions that follow in the chain to\n * be the error object that's thrown.\n *\n * var err = new TypeError('Illegal salmon!');\n * err.code = 42;\n * var badFn = function () { throw err; };\n *\n * expect(badFn).to.throw(TypeError).with.property('code', 42);\n *\n * `.throw` accepts an optional `msg` argument which is a custom error message\n * to show when the assertion fails. The message can also be given as the\n * second argument to `expect`. When not providing two arguments, always use\n * the second form.\n *\n * var goodFn = function () {};\n *\n * expect(goodFn).to.throw(TypeError, 'x', 'nooo why fail??');\n * expect(goodFn, 'nooo why fail??').to.throw();\n *\n * Due to limitations in ES5, `.throw` may not always work as expected when\n * using a transpiler such as Babel or TypeScript. In particular, it may\n * produce unexpected results when subclassing the built-in `Error` object and\n * then passing the subclassed constructor to `.throw`. See your transpiler's\n * docs for details:\n *\n * - ([Babel](https://babeljs.io/docs/usage/caveats/#classes))\n * - ([TypeScript](https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work))\n *\n * Beware of some common mistakes when using the `throw` assertion. One common\n * mistake is to accidentally invoke the function yourself instead of letting\n * the `throw` assertion invoke the function for you. For example, when\n * testing if a function named `fn` throws, provide `fn` instead of `fn()` as\n * the target for the assertion.\n *\n * expect(fn).to.throw(); // Good! Tests `fn` as desired\n * expect(fn()).to.throw(); // Bad! Tests result of `fn()`, not `fn`\n *\n * If you need to assert that your function `fn` throws when passed certain\n * arguments, then wrap a call to `fn` inside of another function.\n *\n * expect(function () { fn(42); }).to.throw(); // Function expression\n * expect(() => fn(42)).to.throw(); // ES6 arrow function\n *\n * Another common mistake is to provide an object method (or any stand-alone\n * function that relies on `this`) as the target of the assertion. Doing so is\n * problematic because the `this` context will be lost when the function is\n * invoked by `.throw`; there's no way for it to know what `this` is supposed\n * to be. There are two ways around this problem. One solution is to wrap the\n * method or function call inside of another function. Another solution is to\n * use `bind`.\n *\n * expect(function () { cat.meow(); }).to.throw(); // Function expression\n * expect(() => cat.meow()).to.throw(); // ES6 arrow function\n * expect(cat.meow.bind(cat)).to.throw(); // Bind\n *\n * Finally, it's worth mentioning that it's a best practice in JavaScript to\n * only throw `Error` and derivatives of `Error` such as `ReferenceError`,\n * `TypeError`, and user-defined objects that extend `Error`. No other type of\n * value will generate a stack trace when initialized. With that said, the\n * `throw` assertion does technically support any type of value being thrown,\n * not just `Error` and its derivatives.\n *\n * The aliases `.throws` and `.Throw` can be used interchangeably with\n * `.throw`.\n *\n * @name throw\n * @alias throws\n * @alias Throw\n * @param {Error|ErrorConstructor} errorLike\n * @param {String|RegExp} errMsgMatcher error message\n * @param {String} msg _optional_\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types\n * @returns error for chaining (null if no error)\n * @namespace BDD\n * @api public\n */\n\n function assertThrows (errorLike, errMsgMatcher, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object')\n , ssfi = flag(this, 'ssfi')\n , flagMsg = flag(this, 'message')\n , negate = flag(this, 'negate') || false;\n new Assertion(obj, flagMsg, ssfi, true).is.a('function');\n\n if (errorLike instanceof RegExp || typeof errorLike === 'string') {\n errMsgMatcher = errorLike;\n errorLike = null;\n }\n\n var caughtErr;\n try {\n obj();\n } catch (err) {\n caughtErr = err;\n }\n\n // If we have the negate flag enabled and at least one valid argument it means we do expect an error\n // but we want it to match a given set of criteria\n var everyArgIsUndefined = errorLike === undefined && errMsgMatcher === undefined;\n\n // If we've got the negate flag enabled and both args, we should only fail if both aren't compatible\n // See Issue #551 and PR #683@GitHub\n var everyArgIsDefined = Boolean(errorLike && errMsgMatcher);\n var errorLikeFail = false;\n var errMsgMatcherFail = false;\n\n // Checking if error was thrown\n if (everyArgIsUndefined || !everyArgIsUndefined && !negate) {\n // We need this to display results correctly according to their types\n var errorLikeString = 'an error';\n if (errorLike instanceof Error) {\n errorLikeString = '#{exp}';\n } else if (errorLike) {\n errorLikeString = _.checkError.getConstructorName(errorLike);\n }\n\n this.assert(\n caughtErr\n , 'expected #{this} to throw ' + errorLikeString\n , 'expected #{this} to not throw an error but #{act} was thrown'\n , errorLike && errorLike.toString()\n , (caughtErr instanceof Error ?\n caughtErr.toString() : (typeof caughtErr === 'string' ? caughtErr : caughtErr &&\n _.checkError.getConstructorName(caughtErr)))\n );\n }\n\n if (errorLike && caughtErr) {\n // We should compare instances only if `errorLike` is an instance of `Error`\n if (errorLike instanceof Error) {\n var isCompatibleInstance = _.checkError.compatibleInstance(caughtErr, errorLike);\n\n if (isCompatibleInstance === negate) {\n // These checks were created to ensure we won't fail too soon when we've got both args and a negate\n // See Issue #551 and PR #683@GitHub\n if (everyArgIsDefined && negate) {\n errorLikeFail = true;\n } else {\n this.assert(\n negate\n , 'expected #{this} to throw #{exp} but #{act} was thrown'\n , 'expected #{this} to not throw #{exp}' + (caughtErr && !negate ? ' but #{act} was thrown' : '')\n , errorLike.toString()\n , caughtErr.toString()\n );\n }\n }\n }\n\n var isCompatibleConstructor = _.checkError.compatibleConstructor(caughtErr, errorLike);\n if (isCompatibleConstructor === negate) {\n if (everyArgIsDefined && negate) {\n errorLikeFail = true;\n } else {\n this.assert(\n negate\n , 'expected #{this} to throw #{exp} but #{act} was thrown'\n , 'expected #{this} to not throw #{exp}' + (caughtErr ? ' but #{act} was thrown' : '')\n , (errorLike instanceof Error ? errorLike.toString() : errorLike && _.checkError.getConstructorName(errorLike))\n , (caughtErr instanceof Error ? caughtErr.toString() : caughtErr && _.checkError.getConstructorName(caughtErr))\n );\n }\n }\n }\n\n if (caughtErr && errMsgMatcher !== undefined && errMsgMatcher !== null) {\n // Here we check compatible messages\n var placeholder = 'including';\n if (errMsgMatcher instanceof RegExp) {\n placeholder = 'matching'\n }\n\n var isCompatibleMessage = _.checkError.compatibleMessage(caughtErr, errMsgMatcher);\n if (isCompatibleMessage === negate) {\n if (everyArgIsDefined && negate) {\n errMsgMatcherFail = true;\n } else {\n this.assert(\n negate\n , 'expected #{this} to throw error ' + placeholder + ' #{exp} but got #{act}'\n , 'expected #{this} to throw error not ' + placeholder + ' #{exp}'\n , errMsgMatcher\n , _.checkError.getMessage(caughtErr)\n );\n }\n }\n }\n\n // If both assertions failed and both should've matched we throw an error\n if (errorLikeFail && errMsgMatcherFail) {\n this.assert(\n negate\n , 'expected #{this} to throw #{exp} but #{act} was thrown'\n , 'expected #{this} to not throw #{exp}' + (caughtErr ? ' but #{act} was thrown' : '')\n , (errorLike instanceof Error ? errorLike.toString() : errorLike && _.checkError.getConstructorName(errorLike))\n , (caughtErr instanceof Error ? caughtErr.toString() : caughtErr && _.checkError.getConstructorName(caughtErr))\n );\n }\n\n flag(this, 'object', caughtErr);\n };\n\n Assertion.addMethod('throw', assertThrows);\n Assertion.addMethod('throws', assertThrows);\n Assertion.addMethod('Throw', assertThrows);\n\n /**\n * ### .respondTo(method[, msg])\n *\n * When the target is a non-function object, `.respondTo` asserts that the\n * target has a method with the given name `method`. The method can be own or\n * inherited, and it can be enumerable or non-enumerable.\n *\n * function Cat () {}\n * Cat.prototype.meow = function () {};\n *\n * expect(new Cat()).to.respondTo('meow');\n *\n * When the target is a function, `.respondTo` asserts that the target's\n * `prototype` property has a method with the given name `method`. Again, the\n * method can be own or inherited, and it can be enumerable or non-enumerable.\n *\n * function Cat () {}\n * Cat.prototype.meow = function () {};\n *\n * expect(Cat).to.respondTo('meow');\n *\n * Add `.itself` earlier in the chain to force `.respondTo` to treat the\n * target as a non-function object, even if it's a function. Thus, it asserts\n * that the target has a method with the given name `method`, rather than\n * asserting that the target's `prototype` property has a method with the\n * given name `method`.\n *\n * function Cat () {}\n * Cat.prototype.meow = function () {};\n * Cat.hiss = function () {};\n *\n * expect(Cat).itself.to.respondTo('hiss').but.not.respondTo('meow');\n *\n * When not adding `.itself`, it's important to check the target's type before\n * using `.respondTo`. See the `.a` doc for info on checking a target's type.\n *\n * function Cat () {}\n * Cat.prototype.meow = function () {};\n *\n * expect(new Cat()).to.be.an('object').that.respondsTo('meow');\n *\n * Add `.not` earlier in the chain to negate `.respondTo`.\n *\n * function Dog () {}\n * Dog.prototype.bark = function () {};\n *\n * expect(new Dog()).to.not.respondTo('meow');\n *\n * `.respondTo` accepts an optional `msg` argument which is a custom error\n * message to show when the assertion fails. The message can also be given as\n * the second argument to `expect`.\n *\n * expect({}).to.respondTo('meow', 'nooo why fail??');\n * expect({}, 'nooo why fail??').to.respondTo('meow');\n *\n * The alias `.respondsTo` can be used interchangeably with `.respondTo`.\n *\n * @name respondTo\n * @alias respondsTo\n * @param {String} method\n * @param {String} msg _optional_\n * @namespace BDD\n * @api public\n */\n\n function respondTo (method, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object')\n , itself = flag(this, 'itself')\n , context = ('function' === typeof obj && !itself)\n ? obj.prototype[method]\n : obj[method];\n\n this.assert(\n 'function' === typeof context\n , 'expected #{this} to respond to ' + _.inspect(method)\n , 'expected #{this} to not respond to ' + _.inspect(method)\n );\n }\n\n Assertion.addMethod('respondTo', respondTo);\n Assertion.addMethod('respondsTo', respondTo);\n\n /**\n * ### .itself\n *\n * Forces all `.respondTo` assertions that follow in the chain to behave as if\n * the target is a non-function object, even if it's a function. Thus, it\n * causes `.respondTo` to assert that the target has a method with the given\n * name, rather than asserting that the target's `prototype` property has a\n * method with the given name.\n *\n * function Cat () {}\n * Cat.prototype.meow = function () {};\n * Cat.hiss = function () {};\n *\n * expect(Cat).itself.to.respondTo('hiss').but.not.respondTo('meow');\n *\n * @name itself\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('itself', function () {\n flag(this, 'itself', true);\n });\n\n /**\n * ### .satisfy(matcher[, msg])\n *\n * Invokes the given `matcher` function with the target being passed as the\n * first argument, and asserts that the value returned is truthy.\n *\n * expect(1).to.satisfy(function(num) {\n * return num > 0;\n * });\n *\n * Add `.not` earlier in the chain to negate `.satisfy`.\n *\n * expect(1).to.not.satisfy(function(num) {\n * return num > 2;\n * });\n *\n * `.satisfy` accepts an optional `msg` argument which is a custom error\n * message to show when the assertion fails. The message can also be given as\n * the second argument to `expect`.\n *\n * expect(1).to.satisfy(function(num) {\n * return num > 2;\n * }, 'nooo why fail??');\n *\n * expect(1, 'nooo why fail??').to.satisfy(function(num) {\n * return num > 2;\n * });\n *\n * The alias `.satisfies` can be used interchangeably with `.satisfy`.\n *\n * @name satisfy\n * @alias satisfies\n * @param {Function} matcher\n * @param {String} msg _optional_\n * @namespace BDD\n * @api public\n */\n\n function satisfy (matcher, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n var result = matcher(obj);\n this.assert(\n result\n , 'expected #{this} to satisfy ' + _.objDisplay(matcher)\n , 'expected #{this} to not satisfy' + _.objDisplay(matcher)\n , flag(this, 'negate') ? false : true\n , result\n );\n }\n\n Assertion.addMethod('satisfy', satisfy);\n Assertion.addMethod('satisfies', satisfy);\n\n /**\n * ### .closeTo(expected, delta[, msg])\n *\n * Asserts that the target is a number that's within a given +/- `delta` range\n * of the given number `expected`. However, it's often best to assert that the\n * target is equal to its expected value.\n *\n * // Recommended\n * expect(1.5).to.equal(1.5);\n *\n * // Not recommended\n * expect(1.5).to.be.closeTo(1, 0.5);\n * expect(1.5).to.be.closeTo(2, 0.5);\n * expect(1.5).to.be.closeTo(1, 1);\n *\n * Add `.not` earlier in the chain to negate `.closeTo`.\n *\n * expect(1.5).to.equal(1.5); // Recommended\n * expect(1.5).to.not.be.closeTo(3, 1); // Not recommended\n *\n * `.closeTo` accepts an optional `msg` argument which is a custom error\n * message to show when the assertion fails. The message can also be given as\n * the second argument to `expect`.\n *\n * expect(1.5).to.be.closeTo(3, 1, 'nooo why fail??');\n * expect(1.5, 'nooo why fail??').to.be.closeTo(3, 1);\n *\n * The alias `.approximately` can be used interchangeably with `.closeTo`.\n *\n * @name closeTo\n * @alias approximately\n * @param {Number} expected\n * @param {Number} delta\n * @param {String} msg _optional_\n * @namespace BDD\n * @api public\n */\n\n function closeTo(expected, delta, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object')\n , flagMsg = flag(this, 'message')\n , ssfi = flag(this, 'ssfi');\n\n new Assertion(obj, flagMsg, ssfi, true).is.a('number');\n if (typeof expected !== 'number' || typeof delta !== 'number') {\n flagMsg = flagMsg ? flagMsg + ': ' : '';\n throw new AssertionError(\n flagMsg + 'the arguments to closeTo or approximately must be numbers',\n undefined,\n ssfi\n );\n }\n\n this.assert(\n Math.abs(obj - expected) <= delta\n , 'expected #{this} to be close to ' + expected + ' +/- ' + delta\n , 'expected #{this} not to be close to ' + expected + ' +/- ' + delta\n );\n }\n\n Assertion.addMethod('closeTo', closeTo);\n Assertion.addMethod('approximately', closeTo);\n\n // Note: Duplicates are ignored if testing for inclusion instead of sameness.\n function isSubsetOf(subset, superset, cmp, contains, ordered) {\n if (!contains) {\n if (subset.length !== superset.length) return false;\n superset = superset.slice();\n }\n\n return subset.every(function(elem, idx) {\n if (ordered) return cmp ? cmp(elem, superset[idx]) : elem === superset[idx];\n\n if (!cmp) {\n var matchIdx = superset.indexOf(elem);\n if (matchIdx === -1) return false;\n\n // Remove match from superset so not counted twice if duplicate in subset.\n if (!contains) superset.splice(matchIdx, 1);\n return true;\n }\n\n return superset.some(function(elem2, matchIdx) {\n if (!cmp(elem, elem2)) return false;\n\n // Remove match from superset so not counted twice if duplicate in subset.\n if (!contains) superset.splice(matchIdx, 1);\n return true;\n });\n });\n }\n\n /**\n * ### .members(set[, msg])\n *\n * Asserts that the target array has the same members as the given array\n * `set`.\n *\n * expect([1, 2, 3]).to.have.members([2, 1, 3]);\n * expect([1, 2, 2]).to.have.members([2, 1, 2]);\n *\n * By default, members are compared using strict (`===`) equality. Add `.deep`\n * earlier in the chain to use deep equality instead. See the `deep-eql`\n * project page for info on the deep equality algorithm:\n * https://github.com/chaijs/deep-eql.\n *\n * // Target array deeply (but not strictly) has member `{a: 1}`\n * expect([{a: 1}]).to.have.deep.members([{a: 1}]);\n * expect([{a: 1}]).to.not.have.members([{a: 1}]);\n *\n * By default, order doesn't matter. Add `.ordered` earlier in the chain to\n * require that members appear in the same order.\n *\n * expect([1, 2, 3]).to.have.ordered.members([1, 2, 3]);\n * expect([1, 2, 3]).to.have.members([2, 1, 3])\n * .but.not.ordered.members([2, 1, 3]);\n *\n * By default, both arrays must be the same size. Add `.include` earlier in\n * the chain to require that the target's members be a superset of the\n * expected members. Note that duplicates are ignored in the subset when\n * `.include` is added.\n *\n * // Target array is a superset of [1, 2] but not identical\n * expect([1, 2, 3]).to.include.members([1, 2]);\n * expect([1, 2, 3]).to.not.have.members([1, 2]);\n *\n * // Duplicates in the subset are ignored\n * expect([1, 2, 3]).to.include.members([1, 2, 2, 2]);\n *\n * `.deep`, `.ordered`, and `.include` can all be combined. However, if\n * `.include` and `.ordered` are combined, the ordering begins at the start of\n * both arrays.\n *\n * expect([{a: 1}, {b: 2}, {c: 3}])\n * .to.include.deep.ordered.members([{a: 1}, {b: 2}])\n * .but.not.include.deep.ordered.members([{b: 2}, {c: 3}]);\n *\n * Add `.not` earlier in the chain to negate `.members`. However, it's\n * dangerous to do so. The problem is that it creates uncertain expectations\n * by asserting that the target array doesn't have all of the same members as\n * the given array `set` but may or may not have some of them. It's often best\n * to identify the exact output that's expected, and then write an assertion\n * that only accepts that exact output.\n *\n * expect([1, 2]).to.not.include(3).and.not.include(4); // Recommended\n * expect([1, 2]).to.not.have.members([3, 4]); // Not recommended\n *\n * `.members` accepts an optional `msg` argument which is a custom error\n * message to show when the assertion fails. The message can also be given as\n * the second argument to `expect`.\n *\n * expect([1, 2]).to.have.members([1, 2, 3], 'nooo why fail??');\n * expect([1, 2], 'nooo why fail??').to.have.members([1, 2, 3]);\n *\n * @name members\n * @param {Array} set\n * @param {String} msg _optional_\n * @namespace BDD\n * @api public\n */\n\n Assertion.addMethod('members', function (subset, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object')\n , flagMsg = flag(this, 'message')\n , ssfi = flag(this, 'ssfi');\n\n new Assertion(obj, flagMsg, ssfi, true).to.be.an('array');\n new Assertion(subset, flagMsg, ssfi, true).to.be.an('array');\n\n var contains = flag(this, 'contains');\n var ordered = flag(this, 'ordered');\n\n var subject, failMsg, failNegateMsg;\n\n if (contains) {\n subject = ordered ? 'an ordered superset' : 'a superset';\n failMsg = 'expected #{this} to be ' + subject + ' of #{exp}';\n failNegateMsg = 'expected #{this} to not be ' + subject + ' of #{exp}';\n } else {\n subject = ordered ? 'ordered members' : 'members';\n failMsg = 'expected #{this} to have the same ' + subject + ' as #{exp}';\n failNegateMsg = 'expected #{this} to not have the same ' + subject + ' as #{exp}';\n }\n\n var cmp = flag(this, 'deep') ? _.eql : undefined;\n\n this.assert(\n isSubsetOf(subset, obj, cmp, contains, ordered)\n , failMsg\n , failNegateMsg\n , subset\n , obj\n , true\n );\n });\n\n /**\n * ### .oneOf(list[, msg])\n *\n * Asserts that the target is a member of the given array `list`. However,\n * it's often best to assert that the target is equal to its expected value.\n *\n * expect(1).to.equal(1); // Recommended\n * expect(1).to.be.oneOf([1, 2, 3]); // Not recommended\n *\n * Comparisons are performed using strict (`===`) equality.\n *\n * Add `.not` earlier in the chain to negate `.oneOf`.\n *\n * expect(1).to.equal(1); // Recommended\n * expect(1).to.not.be.oneOf([2, 3, 4]); // Not recommended\n *\n * `.oneOf` accepts an optional `msg` argument which is a custom error message\n * to show when the assertion fails. The message can also be given as the\n * second argument to `expect`.\n *\n * expect(1).to.be.oneOf([2, 3, 4], 'nooo why fail??');\n * expect(1, 'nooo why fail??').to.be.oneOf([2, 3, 4]);\n *\n * @name oneOf\n * @param {Array<*>} list\n * @param {String} msg _optional_\n * @namespace BDD\n * @api public\n */\n\n function oneOf (list, msg) {\n if (msg) flag(this, 'message', msg);\n var expected = flag(this, 'object')\n , flagMsg = flag(this, 'message')\n , ssfi = flag(this, 'ssfi');\n new Assertion(list, flagMsg, ssfi, true).to.be.an('array');\n\n this.assert(\n list.indexOf(expected) > -1\n , 'expected #{this} to be one of #{exp}'\n , 'expected #{this} to not be one of #{exp}'\n , list\n , expected\n );\n }\n\n Assertion.addMethod('oneOf', oneOf);\n\n /**\n * ### .change(subject[, prop[, msg]])\n *\n * When one argument is provided, `.change` asserts that the given function\n * `subject` returns a different value when it's invoked before the target\n * function compared to when it's invoked afterward. However, it's often best\n * to assert that `subject` is equal to its expected value.\n *\n * var dots = ''\n * , addDot = function () { dots += '.'; }\n * , getDots = function () { return dots; };\n *\n * // Recommended\n * expect(getDots()).to.equal('');\n * addDot();\n * expect(getDots()).to.equal('.');\n *\n * // Not recommended\n * expect(addDot).to.change(getDots);\n *\n * When two arguments are provided, `.change` asserts that the value of the\n * given object `subject`'s `prop` property is different before invoking the\n * target function compared to afterward.\n *\n * var myObj = {dots: ''}\n * , addDot = function () { myObj.dots += '.'; };\n *\n * // Recommended\n * expect(myObj).to.have.property('dots', '');\n * addDot();\n * expect(myObj).to.have.property('dots', '.');\n *\n * // Not recommended\n * expect(addDot).to.change(myObj, 'dots');\n *\n * Strict (`===`) equality is used to compare before and after values.\n *\n * Add `.not` earlier in the chain to negate `.change`.\n *\n * var dots = ''\n * , noop = function () {}\n * , getDots = function () { return dots; };\n *\n * expect(noop).to.not.change(getDots);\n *\n * var myObj = {dots: ''}\n * , noop = function () {};\n *\n * expect(noop).to.not.change(myObj, 'dots');\n *\n * `.change` accepts an optional `msg` argument which is a custom error\n * message to show when the assertion fails. The message can also be given as\n * the second argument to `expect`. When not providing two arguments, always\n * use the second form.\n *\n * var myObj = {dots: ''}\n * , addDot = function () { myObj.dots += '.'; };\n *\n * expect(addDot).to.not.change(myObj, 'dots', 'nooo why fail??');\n *\n * var dots = ''\n * , addDot = function () { dots += '.'; }\n * , getDots = function () { return dots; };\n *\n * expect(addDot, 'nooo why fail??').to.not.change(getDots);\n *\n * `.change` also causes all `.by` assertions that follow in the chain to\n * assert how much a numeric subject was increased or decreased by. However,\n * it's dangerous to use `.change.by`. The problem is that it creates\n * uncertain expectations by asserting that the subject either increases by\n * the given delta, or that it decreases by the given delta. It's often best\n * to identify the exact output that's expected, and then write an assertion\n * that only accepts that exact output.\n *\n * var myObj = {val: 1}\n * , addTwo = function () { myObj.val += 2; }\n * , subtractTwo = function () { myObj.val -= 2; };\n *\n * expect(addTwo).to.increase(myObj, 'val').by(2); // Recommended\n * expect(addTwo).to.change(myObj, 'val').by(2); // Not recommended\n *\n * expect(subtractTwo).to.decrease(myObj, 'val').by(2); // Recommended\n * expect(subtractTwo).to.change(myObj, 'val').by(2); // Not recommended\n *\n * The alias `.changes` can be used interchangeably with `.change`.\n *\n * @name change\n * @alias changes\n * @param {String} subject\n * @param {String} prop name _optional_\n * @param {String} msg _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertChanges (subject, prop, msg) {\n if (msg) flag(this, 'message', msg);\n var fn = flag(this, 'object')\n , flagMsg = flag(this, 'message')\n , ssfi = flag(this, 'ssfi');\n new Assertion(fn, flagMsg, ssfi, true).is.a('function');\n\n var initial;\n if (!prop) {\n new Assertion(subject, flagMsg, ssfi, true).is.a('function');\n initial = subject();\n } else {\n new Assertion(subject, flagMsg, ssfi, true).to.have.property(prop);\n initial = subject[prop];\n }\n\n fn();\n\n var final = prop === undefined || prop === null ? subject() : subject[prop];\n var msgObj = prop === undefined || prop === null ? initial : '.' + prop;\n\n // This gets flagged because of the .by(delta) assertion\n flag(this, 'deltaMsgObj', msgObj);\n flag(this, 'initialDeltaValue', initial);\n flag(this, 'finalDeltaValue', final);\n flag(this, 'deltaBehavior', 'change');\n flag(this, 'realDelta', final !== initial);\n\n this.assert(\n initial !== final\n , 'expected ' + msgObj + ' to change'\n , 'expected ' + msgObj + ' to not change'\n );\n }\n\n Assertion.addMethod('change', assertChanges);\n Assertion.addMethod('changes', assertChanges);\n\n /**\n * ### .increase(subject[, prop[, msg]])\n *\n * When one argument is provided, `.increase` asserts that the given function\n * `subject` returns a greater number when it's invoked after invoking the\n * target function compared to when it's invoked beforehand. `.increase` also\n * causes all `.by` assertions that follow in the chain to assert how much\n * greater of a number is returned. It's often best to assert that the return\n * value increased by the expected amount, rather than asserting it increased\n * by any amount.\n *\n * var val = 1\n * , addTwo = function () { val += 2; }\n * , getVal = function () { return val; };\n *\n * expect(addTwo).to.increase(getVal).by(2); // Recommended\n * expect(addTwo).to.increase(getVal); // Not recommended\n *\n * When two arguments are provided, `.increase` asserts that the value of the\n * given object `subject`'s `prop` property is greater after invoking the\n * target function compared to beforehand.\n *\n * var myObj = {val: 1}\n * , addTwo = function () { myObj.val += 2; };\n *\n * expect(addTwo).to.increase(myObj, 'val').by(2); // Recommended\n * expect(addTwo).to.increase(myObj, 'val'); // Not recommended\n *\n * Add `.not` earlier in the chain to negate `.increase`. However, it's\n * dangerous to do so. The problem is that it creates uncertain expectations\n * by asserting that the subject either decreases, or that it stays the same.\n * It's often best to identify the exact output that's expected, and then\n * write an assertion that only accepts that exact output.\n *\n * When the subject is expected to decrease, it's often best to assert that it\n * decreased by the expected amount.\n *\n * var myObj = {val: 1}\n * , subtractTwo = function () { myObj.val -= 2; };\n *\n * expect(subtractTwo).to.decrease(myObj, 'val').by(2); // Recommended\n * expect(subtractTwo).to.not.increase(myObj, 'val'); // Not recommended\n *\n * When the subject is expected to stay the same, it's often best to assert\n * exactly that.\n *\n * var myObj = {val: 1}\n * , noop = function () {};\n *\n * expect(noop).to.not.change(myObj, 'val'); // Recommended\n * expect(noop).to.not.increase(myObj, 'val'); // Not recommended\n *\n * `.increase` accepts an optional `msg` argument which is a custom error\n * message to show when the assertion fails. The message can also be given as\n * the second argument to `expect`. When not providing two arguments, always\n * use the second form.\n *\n * var myObj = {val: 1}\n * , noop = function () {};\n *\n * expect(noop).to.increase(myObj, 'val', 'nooo why fail??');\n *\n * var val = 1\n * , noop = function () {}\n * , getVal = function () { return val; };\n *\n * expect(noop, 'nooo why fail??').to.increase(getVal);\n *\n * The alias `.increases` can be used interchangeably with `.increase`.\n *\n * @name increase\n * @alias increases\n * @param {String|Function} subject\n * @param {String} prop name _optional_\n * @param {String} msg _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertIncreases (subject, prop, msg) {\n if (msg) flag(this, 'message', msg);\n var fn = flag(this, 'object')\n , flagMsg = flag(this, 'message')\n , ssfi = flag(this, 'ssfi');\n new Assertion(fn, flagMsg, ssfi, true).is.a('function');\n\n var initial;\n if (!prop) {\n new Assertion(subject, flagMsg, ssfi, true).is.a('function');\n initial = subject();\n } else {\n new Assertion(subject, flagMsg, ssfi, true).to.have.property(prop);\n initial = subject[prop];\n }\n\n // Make sure that the target is a number\n new Assertion(initial, flagMsg, ssfi, true).is.a('number');\n\n fn();\n\n var final = prop === undefined || prop === null ? subject() : subject[prop];\n var msgObj = prop === undefined || prop === null ? initial : '.' + prop;\n\n flag(this, 'deltaMsgObj', msgObj);\n flag(this, 'initialDeltaValue', initial);\n flag(this, 'finalDeltaValue', final);\n flag(this, 'deltaBehavior', 'increase');\n flag(this, 'realDelta', final - initial);\n\n this.assert(\n final - initial > 0\n , 'expected ' + msgObj + ' to increase'\n , 'expected ' + msgObj + ' to not increase'\n );\n }\n\n Assertion.addMethod('increase', assertIncreases);\n Assertion.addMethod('increases', assertIncreases);\n\n /**\n * ### .decrease(subject[, prop[, msg]])\n *\n * When one argument is provided, `.decrease` asserts that the given function\n * `subject` returns a lesser number when it's invoked after invoking the\n * target function compared to when it's invoked beforehand. `.decrease` also\n * causes all `.by` assertions that follow in the chain to assert how much\n * lesser of a number is returned. It's often best to assert that the return\n * value decreased by the expected amount, rather than asserting it decreased\n * by any amount.\n *\n * var val = 1\n * , subtractTwo = function () { val -= 2; }\n * , getVal = function () { return val; };\n *\n * expect(subtractTwo).to.decrease(getVal).by(2); // Recommended\n * expect(subtractTwo).to.decrease(getVal); // Not recommended\n *\n * When two arguments are provided, `.decrease` asserts that the value of the\n * given object `subject`'s `prop` property is lesser after invoking the\n * target function compared to beforehand.\n *\n * var myObj = {val: 1}\n * , subtractTwo = function () { myObj.val -= 2; };\n *\n * expect(subtractTwo).to.decrease(myObj, 'val').by(2); // Recommended\n * expect(subtractTwo).to.decrease(myObj, 'val'); // Not recommended\n *\n * Add `.not` earlier in the chain to negate `.decrease`. However, it's\n * dangerous to do so. The problem is that it creates uncertain expectations\n * by asserting that the subject either increases, or that it stays the same.\n * It's often best to identify the exact output that's expected, and then\n * write an assertion that only accepts that exact output.\n *\n * When the subject is expected to increase, it's often best to assert that it\n * increased by the expected amount.\n *\n * var myObj = {val: 1}\n * , addTwo = function () { myObj.val += 2; };\n *\n * expect(addTwo).to.increase(myObj, 'val').by(2); // Recommended\n * expect(addTwo).to.not.decrease(myObj, 'val'); // Not recommended\n *\n * When the subject is expected to stay the same, it's often best to assert\n * exactly that.\n *\n * var myObj = {val: 1}\n * , noop = function () {};\n *\n * expect(noop).to.not.change(myObj, 'val'); // Recommended\n * expect(noop).to.not.decrease(myObj, 'val'); // Not recommended\n *\n * `.decrease` accepts an optional `msg` argument which is a custom error\n * message to show when the assertion fails. The message can also be given as\n * the second argument to `expect`. When not providing two arguments, always\n * use the second form.\n *\n * var myObj = {val: 1}\n * , noop = function () {};\n *\n * expect(noop).to.decrease(myObj, 'val', 'nooo why fail??');\n *\n * var val = 1\n * , noop = function () {}\n * , getVal = function () { return val; };\n *\n * expect(noop, 'nooo why fail??').to.decrease(getVal);\n *\n * The alias `.decreases` can be used interchangeably with `.decrease`.\n *\n * @name decrease\n * @alias decreases\n * @param {String|Function} subject\n * @param {String} prop name _optional_\n * @param {String} msg _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertDecreases (subject, prop, msg) {\n if (msg) flag(this, 'message', msg);\n var fn = flag(this, 'object')\n , flagMsg = flag(this, 'message')\n , ssfi = flag(this, 'ssfi');\n new Assertion(fn, flagMsg, ssfi, true).is.a('function');\n\n var initial;\n if (!prop) {\n new Assertion(subject, flagMsg, ssfi, true).is.a('function');\n initial = subject();\n } else {\n new Assertion(subject, flagMsg, ssfi, true).to.have.property(prop);\n initial = subject[prop];\n }\n\n // Make sure that the target is a number\n new Assertion(initial, flagMsg, ssfi, true).is.a('number');\n\n fn();\n\n var final = prop === undefined || prop === null ? subject() : subject[prop];\n var msgObj = prop === undefined || prop === null ? initial : '.' + prop;\n\n flag(this, 'deltaMsgObj', msgObj);\n flag(this, 'initialDeltaValue', initial);\n flag(this, 'finalDeltaValue', final);\n flag(this, 'deltaBehavior', 'decrease');\n flag(this, 'realDelta', initial - final);\n\n this.assert(\n final - initial < 0\n , 'expected ' + msgObj + ' to decrease'\n , 'expected ' + msgObj + ' to not decrease'\n );\n }\n\n Assertion.addMethod('decrease', assertDecreases);\n Assertion.addMethod('decreases', assertDecreases);\n\n /**\n * ### .by(delta[, msg])\n *\n * When following an `.increase` assertion in the chain, `.by` asserts that\n * the subject of the `.increase` assertion increased by the given `delta`.\n *\n * var myObj = {val: 1}\n * , addTwo = function () { myObj.val += 2; };\n *\n * expect(addTwo).to.increase(myObj, 'val').by(2);\n *\n * When following a `.decrease` assertion in the chain, `.by` asserts that the\n * subject of the `.decrease` assertion decreased by the given `delta`.\n *\n * var myObj = {val: 1}\n * , subtractTwo = function () { myObj.val -= 2; };\n *\n * expect(subtractTwo).to.decrease(myObj, 'val').by(2);\n *\n * When following a `.change` assertion in the chain, `.by` asserts that the\n * subject of the `.change` assertion either increased or decreased by the\n * given `delta`. However, it's dangerous to use `.change.by`. The problem is\n * that it creates uncertain expectations. It's often best to identify the\n * exact output that's expected, and then write an assertion that only accepts\n * that exact output.\n *\n * var myObj = {val: 1}\n * , addTwo = function () { myObj.val += 2; }\n * , subtractTwo = function () { myObj.val -= 2; };\n *\n * expect(addTwo).to.increase(myObj, 'val').by(2); // Recommended\n * expect(addTwo).to.change(myObj, 'val').by(2); // Not recommended\n *\n * expect(subtractTwo).to.decrease(myObj, 'val').by(2); // Recommended\n * expect(subtractTwo).to.change(myObj, 'val').by(2); // Not recommended\n *\n * Add `.not` earlier in the chain to negate `.by`. However, it's often best\n * to assert that the subject changed by its expected delta, rather than\n * asserting that it didn't change by one of countless unexpected deltas.\n *\n * var myObj = {val: 1}\n * , addTwo = function () { myObj.val += 2; };\n *\n * // Recommended\n * expect(addTwo).to.increase(myObj, 'val').by(2);\n *\n * // Not recommended\n * expect(addTwo).to.increase(myObj, 'val').but.not.by(3);\n *\n * `.by` accepts an optional `msg` argument which is a custom error message to\n * show when the assertion fails. The message can also be given as the second\n * argument to `expect`.\n *\n * var myObj = {val: 1}\n * , addTwo = function () { myObj.val += 2; };\n *\n * expect(addTwo).to.increase(myObj, 'val').by(3, 'nooo why fail??');\n * expect(addTwo, 'nooo why fail??').to.increase(myObj, 'val').by(3);\n *\n * @name by\n * @param {Number} delta\n * @param {String} msg _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertDelta(delta, msg) {\n if (msg) flag(this, 'message', msg);\n\n var msgObj = flag(this, 'deltaMsgObj');\n var initial = flag(this, 'initialDeltaValue');\n var final = flag(this, 'finalDeltaValue');\n var behavior = flag(this, 'deltaBehavior');\n var realDelta = flag(this, 'realDelta');\n\n var expression;\n if (behavior === 'change') {\n expression = Math.abs(final - initial) === Math.abs(delta);\n } else {\n expression = realDelta === Math.abs(delta);\n }\n\n this.assert(\n expression\n , 'expected ' + msgObj + ' to ' + behavior + ' by ' + delta\n , 'expected ' + msgObj + ' to not ' + behavior + ' by ' + delta\n );\n }\n\n Assertion.addMethod('by', assertDelta);\n\n /**\n * ### .extensible\n *\n * Asserts that the target is extensible, which means that new properties can\n * be added to it. Primitives are never extensible.\n *\n * expect({a: 1}).to.be.extensible;\n *\n * Add `.not` earlier in the chain to negate `.extensible`.\n *\n * var nonExtensibleObject = Object.preventExtensions({})\n * , sealedObject = Object.seal({})\n * , frozenObject = Object.freeze({});\n *\n * expect(nonExtensibleObject).to.not.be.extensible;\n * expect(sealedObject).to.not.be.extensible;\n * expect(frozenObject).to.not.be.extensible;\n * expect(1).to.not.be.extensible;\n *\n * A custom error message can be given as the second argument to `expect`.\n *\n * expect(1, 'nooo why fail??').to.be.extensible;\n *\n * @name extensible\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('extensible', function() {\n var obj = flag(this, 'object');\n\n // In ES5, if the argument to this method is a primitive, then it will cause a TypeError.\n // In ES6, a non-object argument will be treated as if it was a non-extensible ordinary object, simply return false.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible\n // The following provides ES6 behavior for ES5 environments.\n\n var isExtensible = obj === Object(obj) && Object.isExtensible(obj);\n\n this.assert(\n isExtensible\n , 'expected #{this} to be extensible'\n , 'expected #{this} to not be extensible'\n );\n });\n\n /**\n * ### .sealed\n *\n * Asserts that the target is sealed, which means that new properties can't be\n * added to it, and its existing properties can't be reconfigured or deleted.\n * However, it's possible that its existing properties can still be reassigned\n * to different values. Primitives are always sealed.\n *\n * var sealedObject = Object.seal({});\n * var frozenObject = Object.freeze({});\n *\n * expect(sealedObject).to.be.sealed;\n * expect(frozenObject).to.be.sealed;\n * expect(1).to.be.sealed;\n *\n * Add `.not` earlier in the chain to negate `.sealed`.\n *\n * expect({a: 1}).to.not.be.sealed;\n *\n * A custom error message can be given as the second argument to `expect`.\n *\n * expect({a: 1}, 'nooo why fail??').to.be.sealed;\n *\n * @name sealed\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('sealed', function() {\n var obj = flag(this, 'object');\n\n // In ES5, if the argument to this method is a primitive, then it will cause a TypeError.\n // In ES6, a non-object argument will be treated as if it was a sealed ordinary object, simply return true.\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isSealed\n // The following provides ES6 behavior for ES5 environments.\n\n var isSealed = obj === Object(obj) ? Object.isSealed(obj) : true;\n\n this.assert(\n isSealed\n , 'expected #{this} to be sealed'\n , 'expected #{this} to not be sealed'\n );\n });\n\n /**\n * ### .frozen\n *\n * Asserts that the target is frozen, which means that new properties can't be\n * added to it, and its existing properties can't be reassigned to different\n * values, reconfigured, or deleted. Primitives are always frozen.\n *\n * var frozenObject = Object.freeze({});\n *\n * expect(frozenObject).to.be.frozen;\n * expect(1).to.be.frozen;\n *\n * Add `.not` earlier in the chain to negate `.frozen`.\n *\n * expect({a: 1}).to.not.be.frozen;\n *\n * A custom error message can be given as the second argument to `expect`.\n *\n * expect({a: 1}, 'nooo why fail??').to.be.frozen;\n *\n * @name frozen\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('frozen', function() {\n var obj = flag(this, 'object');\n\n // In ES5, if the argument to this method is a primitive, then it will cause a TypeError.\n // In ES6, a non-object argument will be treated as if it was a frozen ordinary object, simply return true.\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isFrozen\n // The following provides ES6 behavior for ES5 environments.\n\n var isFrozen = obj === Object(obj) ? Object.isFrozen(obj) : true;\n\n this.assert(\n isFrozen\n , 'expected #{this} to be frozen'\n , 'expected #{this} to not be frozen'\n );\n });\n\n /**\n * ### .finite\n *\n * Asserts that the target is a number, and isn't `NaN` or positive/negative\n * `Infinity`.\n *\n * expect(1).to.be.finite;\n *\n * Add `.not` earlier in the chain to negate `.finite`. However, it's\n * dangerous to do so. The problem is that it creates uncertain expectations\n * by asserting that the subject either isn't a number, or that it's `NaN`, or\n * that it's positive `Infinity`, or that it's negative `Infinity`. It's often\n * best to identify the exact output that's expected, and then write an\n * assertion that only accepts that exact output.\n *\n * When the target isn't expected to be a number, it's often best to assert\n * that it's the expected type, rather than asserting that it isn't one of\n * many unexpected types.\n *\n * expect('foo').to.be.a('string'); // Recommended\n * expect('foo').to.not.be.finite; // Not recommended\n *\n * When the target is expected to be `NaN`, it's often best to assert exactly\n * that.\n *\n * expect(NaN).to.be.NaN; // Recommended\n * expect(NaN).to.not.be.finite; // Not recommended\n *\n * When the target is expected to be positive infinity, it's often best to\n * assert exactly that.\n *\n * expect(Infinity).to.equal(Infinity); // Recommended\n * expect(Infinity).to.not.be.finite; // Not recommended\n *\n * When the target is expected to be negative infinity, it's often best to\n * assert exactly that.\n *\n * expect(-Infinity).to.equal(-Infinity); // Recommended\n * expect(-Infinity).to.not.be.finite; // Not recommended\n *\n * A custom error message can be given as the second argument to `expect`.\n *\n * expect('foo', 'nooo why fail??').to.be.finite;\n *\n * @name finite\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('finite', function(msg) {\n var obj = flag(this, 'object');\n\n this.assert(\n typeof obj === 'number' && isFinite(obj)\n , 'expected #{this} to be a finite number'\n , 'expected #{this} to not be a finite number'\n );\n });\n};\n","/*!\n * chai\n * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\nmodule.exports = function (chai, util) {\n chai.expect = function (val, message) {\n return new chai.Assertion(val, message);\n };\n\n /**\n * ### .fail([message])\n * ### .fail(actual, expected, [message], [operator])\n *\n * Throw a failure.\n *\n * expect.fail();\n * expect.fail(\"custom error message\");\n * expect.fail(1, 2);\n * expect.fail(1, 2, \"custom error message\");\n * expect.fail(1, 2, \"custom error message\", \">\");\n * expect.fail(1, 2, undefined, \">\");\n *\n * @name fail\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @param {String} operator\n * @namespace BDD\n * @api public\n */\n\n chai.expect.fail = function (actual, expected, message, operator) {\n if (arguments.length < 2) {\n message = actual;\n actual = undefined;\n }\n\n message = message || 'expect.fail()';\n throw new chai.AssertionError(message, {\n actual: actual\n , expected: expected\n , operator: operator\n }, chai.expect.fail);\n };\n};\n","/*!\n * chai\n * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\nmodule.exports = function (chai, util) {\n var Assertion = chai.Assertion;\n\n function loadShould () {\n // explicitly define this method as function as to have it's name to include as `ssfi`\n function shouldGetter() {\n if (this instanceof String\n || this instanceof Number\n || this instanceof Boolean\n || typeof Symbol === 'function' && this instanceof Symbol) {\n return new Assertion(this.valueOf(), null, shouldGetter);\n }\n return new Assertion(this, null, shouldGetter);\n }\n function shouldSetter(value) {\n // See https://github.com/chaijs/chai/issues/86: this makes\n // `whatever.should = someValue` actually set `someValue`, which is\n // especially useful for `global.should = require('chai').should()`.\n //\n // Note that we have to use [[DefineProperty]] instead of [[Put]]\n // since otherwise we would trigger this very setter!\n Object.defineProperty(this, 'should', {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n }\n // modify Object.prototype to have `should`\n Object.defineProperty(Object.prototype, 'should', {\n set: shouldSetter\n , get: shouldGetter\n , configurable: true\n });\n\n var should = {};\n\n /**\n * ### .fail([message])\n * ### .fail(actual, expected, [message], [operator])\n *\n * Throw a failure.\n *\n * should.fail();\n * should.fail(\"custom error message\");\n * should.fail(1, 2);\n * should.fail(1, 2, \"custom error message\");\n * should.fail(1, 2, \"custom error message\", \">\");\n * should.fail(1, 2, undefined, \">\");\n *\n *\n * @name fail\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @param {String} operator\n * @namespace BDD\n * @api public\n */\n\n should.fail = function (actual, expected, message, operator) {\n if (arguments.length < 2) {\n message = actual;\n actual = undefined;\n }\n\n message = message || 'should.fail()';\n throw new chai.AssertionError(message, {\n actual: actual\n , expected: expected\n , operator: operator\n }, should.fail);\n };\n\n /**\n * ### .equal(actual, expected, [message])\n *\n * Asserts non-strict equality (`==`) of `actual` and `expected`.\n *\n * should.equal(3, '3', '== coerces values to strings');\n *\n * @name equal\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @namespace Should\n * @api public\n */\n\n should.equal = function (val1, val2, msg) {\n new Assertion(val1, msg).to.equal(val2);\n };\n\n /**\n * ### .throw(function, [constructor/string/regexp], [string/regexp], [message])\n *\n * Asserts that `function` will throw an error that is an instance of\n * `constructor`, or alternately that it will throw an error with message\n * matching `regexp`.\n *\n * should.throw(fn, 'function throws a reference error');\n * should.throw(fn, /function throws a reference error/);\n * should.throw(fn, ReferenceError);\n * should.throw(fn, ReferenceError, 'function throws a reference error');\n * should.throw(fn, ReferenceError, /function throws a reference error/);\n *\n * @name throw\n * @alias Throw\n * @param {Function} function\n * @param {ErrorConstructor} constructor\n * @param {RegExp} regexp\n * @param {String} message\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types\n * @namespace Should\n * @api public\n */\n\n should.Throw = function (fn, errt, errs, msg) {\n new Assertion(fn, msg).to.Throw(errt, errs);\n };\n\n /**\n * ### .exist\n *\n * Asserts that the target is neither `null` nor `undefined`.\n *\n * var foo = 'hi';\n *\n * should.exist(foo, 'foo exists');\n *\n * @name exist\n * @namespace Should\n * @api public\n */\n\n should.exist = function (val, msg) {\n new Assertion(val, msg).to.exist;\n }\n\n // negation\n should.not = {}\n\n /**\n * ### .not.equal(actual, expected, [message])\n *\n * Asserts non-strict inequality (`!=`) of `actual` and `expected`.\n *\n * should.not.equal(3, 4, 'these numbers are not equal');\n *\n * @name not.equal\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @namespace Should\n * @api public\n */\n\n should.not.equal = function (val1, val2, msg) {\n new Assertion(val1, msg).to.not.equal(val2);\n };\n\n /**\n * ### .throw(function, [constructor/regexp], [message])\n *\n * Asserts that `function` will _not_ throw an error that is an instance of\n * `constructor`, or alternately that it will not throw an error with message\n * matching `regexp`.\n *\n * should.not.throw(fn, Error, 'function does not throw');\n *\n * @name not.throw\n * @alias not.Throw\n * @param {Function} function\n * @param {ErrorConstructor} constructor\n * @param {RegExp} regexp\n * @param {String} message\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types\n * @namespace Should\n * @api public\n */\n\n should.not.Throw = function (fn, errt, errs, msg) {\n new Assertion(fn, msg).to.not.Throw(errt, errs);\n };\n\n /**\n * ### .not.exist\n *\n * Asserts that the target is neither `null` nor `undefined`.\n *\n * var bar = null;\n *\n * should.not.exist(bar, 'bar does not exist');\n *\n * @name not.exist\n * @namespace Should\n * @api public\n */\n\n should.not.exist = function (val, msg) {\n new Assertion(val, msg).to.not.exist;\n }\n\n should['throw'] = should['Throw'];\n should.not['throw'] = should.not['Throw'];\n\n return should;\n };\n\n chai.should = loadShould;\n chai.Should = loadShould;\n};\n","/*!\n * chai\n * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\nmodule.exports = function (chai, util) {\n /*!\n * Chai dependencies.\n */\n\n var Assertion = chai.Assertion\n , flag = util.flag;\n\n /*!\n * Module export.\n */\n\n /**\n * ### assert(expression, message)\n *\n * Write your own test expressions.\n *\n * assert('foo' !== 'bar', 'foo is not bar');\n * assert(Array.isArray([]), 'empty arrays are arrays');\n *\n * @param {Mixed} expression to test for truthiness\n * @param {String} message to display on error\n * @name assert\n * @namespace Assert\n * @api public\n */\n\n var assert = chai.assert = function (express, errmsg) {\n var test = new Assertion(null, null, chai.assert, true);\n test.assert(\n express\n , errmsg\n , '[ negation message unavailable ]'\n );\n };\n\n /**\n * ### .fail([message])\n * ### .fail(actual, expected, [message], [operator])\n *\n * Throw a failure. Node.js `assert` module-compatible.\n *\n * assert.fail();\n * assert.fail(\"custom error message\");\n * assert.fail(1, 2);\n * assert.fail(1, 2, \"custom error message\");\n * assert.fail(1, 2, \"custom error message\", \">\");\n * assert.fail(1, 2, undefined, \">\");\n *\n * @name fail\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @param {String} operator\n * @namespace Assert\n * @api public\n */\n\n assert.fail = function (actual, expected, message, operator) {\n if (arguments.length < 2) {\n // Comply with Node's fail([message]) interface\n\n message = actual;\n actual = undefined;\n }\n\n message = message || 'assert.fail()';\n throw new chai.AssertionError(message, {\n actual: actual\n , expected: expected\n , operator: operator\n }, assert.fail);\n };\n\n /**\n * ### .isOk(object, [message])\n *\n * Asserts that `object` is truthy.\n *\n * assert.isOk('everything', 'everything is ok');\n * assert.isOk(false, 'this will fail');\n *\n * @name isOk\n * @alias ok\n * @param {Mixed} object to test\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isOk = function (val, msg) {\n new Assertion(val, msg, assert.isOk, true).is.ok;\n };\n\n /**\n * ### .isNotOk(object, [message])\n *\n * Asserts that `object` is falsy.\n *\n * assert.isNotOk('everything', 'this will fail');\n * assert.isNotOk(false, 'this will pass');\n *\n * @name isNotOk\n * @alias notOk\n * @param {Mixed} object to test\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotOk = function (val, msg) {\n new Assertion(val, msg, assert.isNotOk, true).is.not.ok;\n };\n\n /**\n * ### .equal(actual, expected, [message])\n *\n * Asserts non-strict equality (`==`) of `actual` and `expected`.\n *\n * assert.equal(3, '3', '== coerces values to strings');\n *\n * @name equal\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.equal = function (act, exp, msg) {\n var test = new Assertion(act, msg, assert.equal, true);\n\n test.assert(\n exp == flag(test, 'object')\n , 'expected #{this} to equal #{exp}'\n , 'expected #{this} to not equal #{act}'\n , exp\n , act\n , true\n );\n };\n\n /**\n * ### .notEqual(actual, expected, [message])\n *\n * Asserts non-strict inequality (`!=`) of `actual` and `expected`.\n *\n * assert.notEqual(3, 4, 'these numbers are not equal');\n *\n * @name notEqual\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notEqual = function (act, exp, msg) {\n var test = new Assertion(act, msg, assert.notEqual, true);\n\n test.assert(\n exp != flag(test, 'object')\n , 'expected #{this} to not equal #{exp}'\n , 'expected #{this} to equal #{act}'\n , exp\n , act\n , true\n );\n };\n\n /**\n * ### .strictEqual(actual, expected, [message])\n *\n * Asserts strict equality (`===`) of `actual` and `expected`.\n *\n * assert.strictEqual(true, true, 'these booleans are strictly equal');\n *\n * @name strictEqual\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.strictEqual = function (act, exp, msg) {\n new Assertion(act, msg, assert.strictEqual, true).to.equal(exp);\n };\n\n /**\n * ### .notStrictEqual(actual, expected, [message])\n *\n * Asserts strict inequality (`!==`) of `actual` and `expected`.\n *\n * assert.notStrictEqual(3, '3', 'no coercion for strict equality');\n *\n * @name notStrictEqual\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notStrictEqual = function (act, exp, msg) {\n new Assertion(act, msg, assert.notStrictEqual, true).to.not.equal(exp);\n };\n\n /**\n * ### .deepEqual(actual, expected, [message])\n *\n * Asserts that `actual` is deeply equal to `expected`.\n *\n * assert.deepEqual({ tea: 'green' }, { tea: 'green' });\n *\n * @name deepEqual\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @alias deepStrictEqual\n * @namespace Assert\n * @api public\n */\n\n assert.deepEqual = assert.deepStrictEqual = function (act, exp, msg) {\n new Assertion(act, msg, assert.deepEqual, true).to.eql(exp);\n };\n\n /**\n * ### .notDeepEqual(actual, expected, [message])\n *\n * Assert that `actual` is not deeply equal to `expected`.\n *\n * assert.notDeepEqual({ tea: 'green' }, { tea: 'jasmine' });\n *\n * @name notDeepEqual\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notDeepEqual = function (act, exp, msg) {\n new Assertion(act, msg, assert.notDeepEqual, true).to.not.eql(exp);\n };\n\n /**\n * ### .isAbove(valueToCheck, valueToBeAbove, [message])\n *\n * Asserts `valueToCheck` is strictly greater than (>) `valueToBeAbove`.\n *\n * assert.isAbove(5, 2, '5 is strictly greater than 2');\n *\n * @name isAbove\n * @param {Mixed} valueToCheck\n * @param {Mixed} valueToBeAbove\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isAbove = function (val, abv, msg) {\n new Assertion(val, msg, assert.isAbove, true).to.be.above(abv);\n };\n\n /**\n * ### .isAtLeast(valueToCheck, valueToBeAtLeast, [message])\n *\n * Asserts `valueToCheck` is greater than or equal to (>=) `valueToBeAtLeast`.\n *\n * assert.isAtLeast(5, 2, '5 is greater or equal to 2');\n * assert.isAtLeast(3, 3, '3 is greater or equal to 3');\n *\n * @name isAtLeast\n * @param {Mixed} valueToCheck\n * @param {Mixed} valueToBeAtLeast\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isAtLeast = function (val, atlst, msg) {\n new Assertion(val, msg, assert.isAtLeast, true).to.be.least(atlst);\n };\n\n /**\n * ### .isBelow(valueToCheck, valueToBeBelow, [message])\n *\n * Asserts `valueToCheck` is strictly less than (<) `valueToBeBelow`.\n *\n * assert.isBelow(3, 6, '3 is strictly less than 6');\n *\n * @name isBelow\n * @param {Mixed} valueToCheck\n * @param {Mixed} valueToBeBelow\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isBelow = function (val, blw, msg) {\n new Assertion(val, msg, assert.isBelow, true).to.be.below(blw);\n };\n\n /**\n * ### .isAtMost(valueToCheck, valueToBeAtMost, [message])\n *\n * Asserts `valueToCheck` is less than or equal to (<=) `valueToBeAtMost`.\n *\n * assert.isAtMost(3, 6, '3 is less than or equal to 6');\n * assert.isAtMost(4, 4, '4 is less than or equal to 4');\n *\n * @name isAtMost\n * @param {Mixed} valueToCheck\n * @param {Mixed} valueToBeAtMost\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isAtMost = function (val, atmst, msg) {\n new Assertion(val, msg, assert.isAtMost, true).to.be.most(atmst);\n };\n\n /**\n * ### .isTrue(value, [message])\n *\n * Asserts that `value` is true.\n *\n * var teaServed = true;\n * assert.isTrue(teaServed, 'the tea has been served');\n *\n * @name isTrue\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isTrue = function (val, msg) {\n new Assertion(val, msg, assert.isTrue, true).is['true'];\n };\n\n /**\n * ### .isNotTrue(value, [message])\n *\n * Asserts that `value` is not true.\n *\n * var tea = 'tasty chai';\n * assert.isNotTrue(tea, 'great, time for tea!');\n *\n * @name isNotTrue\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotTrue = function (val, msg) {\n new Assertion(val, msg, assert.isNotTrue, true).to.not.equal(true);\n };\n\n /**\n * ### .isFalse(value, [message])\n *\n * Asserts that `value` is false.\n *\n * var teaServed = false;\n * assert.isFalse(teaServed, 'no tea yet? hmm...');\n *\n * @name isFalse\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isFalse = function (val, msg) {\n new Assertion(val, msg, assert.isFalse, true).is['false'];\n };\n\n /**\n * ### .isNotFalse(value, [message])\n *\n * Asserts that `value` is not false.\n *\n * var tea = 'tasty chai';\n * assert.isNotFalse(tea, 'great, time for tea!');\n *\n * @name isNotFalse\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotFalse = function (val, msg) {\n new Assertion(val, msg, assert.isNotFalse, true).to.not.equal(false);\n };\n\n /**\n * ### .isNull(value, [message])\n *\n * Asserts that `value` is null.\n *\n * assert.isNull(err, 'there was no error');\n *\n * @name isNull\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNull = function (val, msg) {\n new Assertion(val, msg, assert.isNull, true).to.equal(null);\n };\n\n /**\n * ### .isNotNull(value, [message])\n *\n * Asserts that `value` is not null.\n *\n * var tea = 'tasty chai';\n * assert.isNotNull(tea, 'great, time for tea!');\n *\n * @name isNotNull\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotNull = function (val, msg) {\n new Assertion(val, msg, assert.isNotNull, true).to.not.equal(null);\n };\n\n /**\n * ### .isNaN\n *\n * Asserts that value is NaN.\n *\n * assert.isNaN(NaN, 'NaN is NaN');\n *\n * @name isNaN\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNaN = function (val, msg) {\n new Assertion(val, msg, assert.isNaN, true).to.be.NaN;\n };\n\n /**\n * ### .isNotNaN\n *\n * Asserts that value is not NaN.\n *\n * assert.isNotNaN(4, '4 is not NaN');\n *\n * @name isNotNaN\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n assert.isNotNaN = function (val, msg) {\n new Assertion(val, msg, assert.isNotNaN, true).not.to.be.NaN;\n };\n\n /**\n * ### .exists\n *\n * Asserts that the target is neither `null` nor `undefined`.\n *\n * var foo = 'hi';\n *\n * assert.exists(foo, 'foo is neither `null` nor `undefined`');\n *\n * @name exists\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.exists = function (val, msg) {\n new Assertion(val, msg, assert.exists, true).to.exist;\n };\n\n /**\n * ### .notExists\n *\n * Asserts that the target is either `null` or `undefined`.\n *\n * var bar = null\n * , baz;\n *\n * assert.notExists(bar);\n * assert.notExists(baz, 'baz is either null or undefined');\n *\n * @name notExists\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notExists = function (val, msg) {\n new Assertion(val, msg, assert.notExists, true).to.not.exist;\n };\n\n /**\n * ### .isUndefined(value, [message])\n *\n * Asserts that `value` is `undefined`.\n *\n * var tea;\n * assert.isUndefined(tea, 'no tea defined');\n *\n * @name isUndefined\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isUndefined = function (val, msg) {\n new Assertion(val, msg, assert.isUndefined, true).to.equal(undefined);\n };\n\n /**\n * ### .isDefined(value, [message])\n *\n * Asserts that `value` is not `undefined`.\n *\n * var tea = 'cup of chai';\n * assert.isDefined(tea, 'tea has been defined');\n *\n * @name isDefined\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isDefined = function (val, msg) {\n new Assertion(val, msg, assert.isDefined, true).to.not.equal(undefined);\n };\n\n /**\n * ### .isFunction(value, [message])\n *\n * Asserts that `value` is a function.\n *\n * function serveTea() { return 'cup of tea'; };\n * assert.isFunction(serveTea, 'great, we can have tea now');\n *\n * @name isFunction\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isFunction = function (val, msg) {\n new Assertion(val, msg, assert.isFunction, true).to.be.a('function');\n };\n\n /**\n * ### .isNotFunction(value, [message])\n *\n * Asserts that `value` is _not_ a function.\n *\n * var serveTea = [ 'heat', 'pour', 'sip' ];\n * assert.isNotFunction(serveTea, 'great, we have listed the steps');\n *\n * @name isNotFunction\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotFunction = function (val, msg) {\n new Assertion(val, msg, assert.isNotFunction, true).to.not.be.a('function');\n };\n\n /**\n * ### .isObject(value, [message])\n *\n * Asserts that `value` is an object of type 'Object' (as revealed by `Object.prototype.toString`).\n * _The assertion does not match subclassed objects._\n *\n * var selection = { name: 'Chai', serve: 'with spices' };\n * assert.isObject(selection, 'tea selection is an object');\n *\n * @name isObject\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isObject = function (val, msg) {\n new Assertion(val, msg, assert.isObject, true).to.be.a('object');\n };\n\n /**\n * ### .isNotObject(value, [message])\n *\n * Asserts that `value` is _not_ an object of type 'Object' (as revealed by `Object.prototype.toString`).\n *\n * var selection = 'chai'\n * assert.isNotObject(selection, 'tea selection is not an object');\n * assert.isNotObject(null, 'null is not an object');\n *\n * @name isNotObject\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotObject = function (val, msg) {\n new Assertion(val, msg, assert.isNotObject, true).to.not.be.a('object');\n };\n\n /**\n * ### .isArray(value, [message])\n *\n * Asserts that `value` is an array.\n *\n * var menu = [ 'green', 'chai', 'oolong' ];\n * assert.isArray(menu, 'what kind of tea do we want?');\n *\n * @name isArray\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isArray = function (val, msg) {\n new Assertion(val, msg, assert.isArray, true).to.be.an('array');\n };\n\n /**\n * ### .isNotArray(value, [message])\n *\n * Asserts that `value` is _not_ an array.\n *\n * var menu = 'green|chai|oolong';\n * assert.isNotArray(menu, 'what kind of tea do we want?');\n *\n * @name isNotArray\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotArray = function (val, msg) {\n new Assertion(val, msg, assert.isNotArray, true).to.not.be.an('array');\n };\n\n /**\n * ### .isString(value, [message])\n *\n * Asserts that `value` is a string.\n *\n * var teaOrder = 'chai';\n * assert.isString(teaOrder, 'order placed');\n *\n * @name isString\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isString = function (val, msg) {\n new Assertion(val, msg, assert.isString, true).to.be.a('string');\n };\n\n /**\n * ### .isNotString(value, [message])\n *\n * Asserts that `value` is _not_ a string.\n *\n * var teaOrder = 4;\n * assert.isNotString(teaOrder, 'order placed');\n *\n * @name isNotString\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotString = function (val, msg) {\n new Assertion(val, msg, assert.isNotString, true).to.not.be.a('string');\n };\n\n /**\n * ### .isNumber(value, [message])\n *\n * Asserts that `value` is a number.\n *\n * var cups = 2;\n * assert.isNumber(cups, 'how many cups');\n *\n * @name isNumber\n * @param {Number} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNumber = function (val, msg) {\n new Assertion(val, msg, assert.isNumber, true).to.be.a('number');\n };\n\n /**\n * ### .isNotNumber(value, [message])\n *\n * Asserts that `value` is _not_ a number.\n *\n * var cups = '2 cups please';\n * assert.isNotNumber(cups, 'how many cups');\n *\n * @name isNotNumber\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotNumber = function (val, msg) {\n new Assertion(val, msg, assert.isNotNumber, true).to.not.be.a('number');\n };\n\n /**\n * ### .isFinite(value, [message])\n *\n * Asserts that `value` is a finite number. Unlike `.isNumber`, this will fail for `NaN` and `Infinity`.\n *\n * var cups = 2;\n * assert.isFinite(cups, 'how many cups');\n *\n * assert.isFinite(NaN); // throws\n *\n * @name isFinite\n * @param {Number} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isFinite = function (val, msg) {\n new Assertion(val, msg, assert.isFinite, true).to.be.finite;\n };\n\n /**\n * ### .isBoolean(value, [message])\n *\n * Asserts that `value` is a boolean.\n *\n * var teaReady = true\n * , teaServed = false;\n *\n * assert.isBoolean(teaReady, 'is the tea ready');\n * assert.isBoolean(teaServed, 'has tea been served');\n *\n * @name isBoolean\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isBoolean = function (val, msg) {\n new Assertion(val, msg, assert.isBoolean, true).to.be.a('boolean');\n };\n\n /**\n * ### .isNotBoolean(value, [message])\n *\n * Asserts that `value` is _not_ a boolean.\n *\n * var teaReady = 'yep'\n * , teaServed = 'nope';\n *\n * assert.isNotBoolean(teaReady, 'is the tea ready');\n * assert.isNotBoolean(teaServed, 'has tea been served');\n *\n * @name isNotBoolean\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotBoolean = function (val, msg) {\n new Assertion(val, msg, assert.isNotBoolean, true).to.not.be.a('boolean');\n };\n\n /**\n * ### .typeOf(value, name, [message])\n *\n * Asserts that `value`'s type is `name`, as determined by\n * `Object.prototype.toString`.\n *\n * assert.typeOf({ tea: 'chai' }, 'object', 'we have an object');\n * assert.typeOf(['chai', 'jasmine'], 'array', 'we have an array');\n * assert.typeOf('tea', 'string', 'we have a string');\n * assert.typeOf(/tea/, 'regexp', 'we have a regular expression');\n * assert.typeOf(null, 'null', 'we have a null');\n * assert.typeOf(undefined, 'undefined', 'we have an undefined');\n *\n * @name typeOf\n * @param {Mixed} value\n * @param {String} name\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.typeOf = function (val, type, msg) {\n new Assertion(val, msg, assert.typeOf, true).to.be.a(type);\n };\n\n /**\n * ### .notTypeOf(value, name, [message])\n *\n * Asserts that `value`'s type is _not_ `name`, as determined by\n * `Object.prototype.toString`.\n *\n * assert.notTypeOf('tea', 'number', 'strings are not numbers');\n *\n * @name notTypeOf\n * @param {Mixed} value\n * @param {String} typeof name\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notTypeOf = function (val, type, msg) {\n new Assertion(val, msg, assert.notTypeOf, true).to.not.be.a(type);\n };\n\n /**\n * ### .instanceOf(object, constructor, [message])\n *\n * Asserts that `value` is an instance of `constructor`.\n *\n * var Tea = function (name) { this.name = name; }\n * , chai = new Tea('chai');\n *\n * assert.instanceOf(chai, Tea, 'chai is an instance of tea');\n *\n * @name instanceOf\n * @param {Object} object\n * @param {Constructor} constructor\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.instanceOf = function (val, type, msg) {\n new Assertion(val, msg, assert.instanceOf, true).to.be.instanceOf(type);\n };\n\n /**\n * ### .notInstanceOf(object, constructor, [message])\n *\n * Asserts `value` is not an instance of `constructor`.\n *\n * var Tea = function (name) { this.name = name; }\n * , chai = new String('chai');\n *\n * assert.notInstanceOf(chai, Tea, 'chai is not an instance of tea');\n *\n * @name notInstanceOf\n * @param {Object} object\n * @param {Constructor} constructor\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notInstanceOf = function (val, type, msg) {\n new Assertion(val, msg, assert.notInstanceOf, true)\n .to.not.be.instanceOf(type);\n };\n\n /**\n * ### .include(haystack, needle, [message])\n *\n * Asserts that `haystack` includes `needle`. Can be used to assert the\n * inclusion of a value in an array, a substring in a string, or a subset of\n * properties in an object.\n *\n * assert.include([1,2,3], 2, 'array contains value');\n * assert.include('foobar', 'foo', 'string contains substring');\n * assert.include({ foo: 'bar', hello: 'universe' }, { foo: 'bar' }, 'object contains property');\n *\n * Strict equality (===) is used. When asserting the inclusion of a value in\n * an array, the array is searched for an element that's strictly equal to the\n * given value. When asserting a subset of properties in an object, the object\n * is searched for the given property keys, checking that each one is present\n * and strictly equal to the given property value. For instance:\n *\n * var obj1 = {a: 1}\n * , obj2 = {b: 2};\n * assert.include([obj1, obj2], obj1);\n * assert.include({foo: obj1, bar: obj2}, {foo: obj1});\n * assert.include({foo: obj1, bar: obj2}, {foo: obj1, bar: obj2});\n *\n * @name include\n * @param {Array|String} haystack\n * @param {Mixed} needle\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.include = function (exp, inc, msg) {\n new Assertion(exp, msg, assert.include, true).include(inc);\n };\n\n /**\n * ### .notInclude(haystack, needle, [message])\n *\n * Asserts that `haystack` does not include `needle`. Can be used to assert\n * the absence of a value in an array, a substring in a string, or a subset of\n * properties in an object.\n *\n * assert.notInclude([1,2,3], 4, \"array doesn't contain value\");\n * assert.notInclude('foobar', 'baz', \"string doesn't contain substring\");\n * assert.notInclude({ foo: 'bar', hello: 'universe' }, { foo: 'baz' }, 'object doesn't contain property');\n *\n * Strict equality (===) is used. When asserting the absence of a value in an\n * array, the array is searched to confirm the absence of an element that's\n * strictly equal to the given value. When asserting a subset of properties in\n * an object, the object is searched to confirm that at least one of the given\n * property keys is either not present or not strictly equal to the given\n * property value. For instance:\n *\n * var obj1 = {a: 1}\n * , obj2 = {b: 2};\n * assert.notInclude([obj1, obj2], {a: 1});\n * assert.notInclude({foo: obj1, bar: obj2}, {foo: {a: 1}});\n * assert.notInclude({foo: obj1, bar: obj2}, {foo: obj1, bar: {b: 2}});\n *\n * @name notInclude\n * @param {Array|String} haystack\n * @param {Mixed} needle\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notInclude = function (exp, inc, msg) {\n new Assertion(exp, msg, assert.notInclude, true).not.include(inc);\n };\n\n /**\n * ### .deepInclude(haystack, needle, [message])\n *\n * Asserts that `haystack` includes `needle`. Can be used to assert the\n * inclusion of a value in an array or a subset of properties in an object.\n * Deep equality is used.\n *\n * var obj1 = {a: 1}\n * , obj2 = {b: 2};\n * assert.deepInclude([obj1, obj2], {a: 1});\n * assert.deepInclude({foo: obj1, bar: obj2}, {foo: {a: 1}});\n * assert.deepInclude({foo: obj1, bar: obj2}, {foo: {a: 1}, bar: {b: 2}});\n *\n * @name deepInclude\n * @param {Array|String} haystack\n * @param {Mixed} needle\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.deepInclude = function (exp, inc, msg) {\n new Assertion(exp, msg, assert.deepInclude, true).deep.include(inc);\n };\n\n /**\n * ### .notDeepInclude(haystack, needle, [message])\n *\n * Asserts that `haystack` does not include `needle`. Can be used to assert\n * the absence of a value in an array or a subset of properties in an object.\n * Deep equality is used.\n *\n * var obj1 = {a: 1}\n * , obj2 = {b: 2};\n * assert.notDeepInclude([obj1, obj2], {a: 9});\n * assert.notDeepInclude({foo: obj1, bar: obj2}, {foo: {a: 9}});\n * assert.notDeepInclude({foo: obj1, bar: obj2}, {foo: {a: 1}, bar: {b: 9}});\n *\n * @name notDeepInclude\n * @param {Array|String} haystack\n * @param {Mixed} needle\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notDeepInclude = function (exp, inc, msg) {\n new Assertion(exp, msg, assert.notDeepInclude, true).not.deep.include(inc);\n };\n\n /**\n * ### .nestedInclude(haystack, needle, [message])\n *\n * Asserts that 'haystack' includes 'needle'.\n * Can be used to assert the inclusion of a subset of properties in an\n * object.\n * Enables the use of dot- and bracket-notation for referencing nested\n * properties.\n * '[]' and '.' in property names can be escaped using double backslashes.\n *\n * assert.nestedInclude({'.a': {'b': 'x'}}, {'\\\\.a.[b]': 'x'});\n * assert.nestedInclude({'a': {'[b]': 'x'}}, {'a.\\\\[b\\\\]': 'x'});\n *\n * @name nestedInclude\n * @param {Object} haystack\n * @param {Object} needle\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.nestedInclude = function (exp, inc, msg) {\n new Assertion(exp, msg, assert.nestedInclude, true).nested.include(inc);\n };\n\n /**\n * ### .notNestedInclude(haystack, needle, [message])\n *\n * Asserts that 'haystack' does not include 'needle'.\n * Can be used to assert the absence of a subset of properties in an\n * object.\n * Enables the use of dot- and bracket-notation for referencing nested\n * properties.\n * '[]' and '.' in property names can be escaped using double backslashes.\n *\n * assert.notNestedInclude({'.a': {'b': 'x'}}, {'\\\\.a.b': 'y'});\n * assert.notNestedInclude({'a': {'[b]': 'x'}}, {'a.\\\\[b\\\\]': 'y'});\n *\n * @name notNestedInclude\n * @param {Object} haystack\n * @param {Object} needle\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notNestedInclude = function (exp, inc, msg) {\n new Assertion(exp, msg, assert.notNestedInclude, true)\n .not.nested.include(inc);\n };\n\n /**\n * ### .deepNestedInclude(haystack, needle, [message])\n *\n * Asserts that 'haystack' includes 'needle'.\n * Can be used to assert the inclusion of a subset of properties in an\n * object while checking for deep equality.\n * Enables the use of dot- and bracket-notation for referencing nested\n * properties.\n * '[]' and '.' in property names can be escaped using double backslashes.\n *\n * assert.deepNestedInclude({a: {b: [{x: 1}]}}, {'a.b[0]': {x: 1}});\n * assert.deepNestedInclude({'.a': {'[b]': {x: 1}}}, {'\\\\.a.\\\\[b\\\\]': {x: 1}});\n *\n * @name deepNestedInclude\n * @param {Object} haystack\n * @param {Object} needle\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.deepNestedInclude = function(exp, inc, msg) {\n new Assertion(exp, msg, assert.deepNestedInclude, true)\n .deep.nested.include(inc);\n };\n\n /**\n * ### .notDeepNestedInclude(haystack, needle, [message])\n *\n * Asserts that 'haystack' does not include 'needle'.\n * Can be used to assert the absence of a subset of properties in an\n * object while checking for deep equality.\n * Enables the use of dot- and bracket-notation for referencing nested\n * properties.\n * '[]' and '.' in property names can be escaped using double backslashes.\n *\n * assert.notDeepNestedInclude({a: {b: [{x: 1}]}}, {'a.b[0]': {y: 1}})\n * assert.notDeepNestedInclude({'.a': {'[b]': {x: 1}}}, {'\\\\.a.\\\\[b\\\\]': {y: 2}});\n *\n * @name notDeepNestedInclude\n * @param {Object} haystack\n * @param {Object} needle\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notDeepNestedInclude = function(exp, inc, msg) {\n new Assertion(exp, msg, assert.notDeepNestedInclude, true)\n .not.deep.nested.include(inc);\n };\n\n /**\n * ### .ownInclude(haystack, needle, [message])\n *\n * Asserts that 'haystack' includes 'needle'.\n * Can be used to assert the inclusion of a subset of properties in an\n * object while ignoring inherited properties.\n *\n * assert.ownInclude({ a: 1 }, { a: 1 });\n *\n * @name ownInclude\n * @param {Object} haystack\n * @param {Object} needle\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.ownInclude = function(exp, inc, msg) {\n new Assertion(exp, msg, assert.ownInclude, true).own.include(inc);\n };\n\n /**\n * ### .notOwnInclude(haystack, needle, [message])\n *\n * Asserts that 'haystack' includes 'needle'.\n * Can be used to assert the absence of a subset of properties in an\n * object while ignoring inherited properties.\n *\n * Object.prototype.b = 2;\n *\n * assert.notOwnInclude({ a: 1 }, { b: 2 });\n *\n * @name notOwnInclude\n * @param {Object} haystack\n * @param {Object} needle\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notOwnInclude = function(exp, inc, msg) {\n new Assertion(exp, msg, assert.notOwnInclude, true).not.own.include(inc);\n };\n\n /**\n * ### .deepOwnInclude(haystack, needle, [message])\n *\n * Asserts that 'haystack' includes 'needle'.\n * Can be used to assert the inclusion of a subset of properties in an\n * object while ignoring inherited properties and checking for deep equality.\n *\n * assert.deepOwnInclude({a: {b: 2}}, {a: {b: 2}});\n *\n * @name deepOwnInclude\n * @param {Object} haystack\n * @param {Object} needle\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.deepOwnInclude = function(exp, inc, msg) {\n new Assertion(exp, msg, assert.deepOwnInclude, true)\n .deep.own.include(inc);\n };\n\n /**\n * ### .notDeepOwnInclude(haystack, needle, [message])\n *\n * Asserts that 'haystack' includes 'needle'.\n * Can be used to assert the absence of a subset of properties in an\n * object while ignoring inherited properties and checking for deep equality.\n *\n * assert.notDeepOwnInclude({a: {b: 2}}, {a: {c: 3}});\n *\n * @name notDeepOwnInclude\n * @param {Object} haystack\n * @param {Object} needle\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notDeepOwnInclude = function(exp, inc, msg) {\n new Assertion(exp, msg, assert.notDeepOwnInclude, true)\n .not.deep.own.include(inc);\n };\n\n /**\n * ### .match(value, regexp, [message])\n *\n * Asserts that `value` matches the regular expression `regexp`.\n *\n * assert.match('foobar', /^foo/, 'regexp matches');\n *\n * @name match\n * @param {Mixed} value\n * @param {RegExp} regexp\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.match = function (exp, re, msg) {\n new Assertion(exp, msg, assert.match, true).to.match(re);\n };\n\n /**\n * ### .notMatch(value, regexp, [message])\n *\n * Asserts that `value` does not match the regular expression `regexp`.\n *\n * assert.notMatch('foobar', /^foo/, 'regexp does not match');\n *\n * @name notMatch\n * @param {Mixed} value\n * @param {RegExp} regexp\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notMatch = function (exp, re, msg) {\n new Assertion(exp, msg, assert.notMatch, true).to.not.match(re);\n };\n\n /**\n * ### .property(object, property, [message])\n *\n * Asserts that `object` has a direct or inherited property named by\n * `property`.\n *\n * assert.property({ tea: { green: 'matcha' }}, 'tea');\n * assert.property({ tea: { green: 'matcha' }}, 'toString');\n *\n * @name property\n * @param {Object} object\n * @param {String} property\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.property = function (obj, prop, msg) {\n new Assertion(obj, msg, assert.property, true).to.have.property(prop);\n };\n\n /**\n * ### .notProperty(object, property, [message])\n *\n * Asserts that `object` does _not_ have a direct or inherited property named\n * by `property`.\n *\n * assert.notProperty({ tea: { green: 'matcha' }}, 'coffee');\n *\n * @name notProperty\n * @param {Object} object\n * @param {String} property\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notProperty = function (obj, prop, msg) {\n new Assertion(obj, msg, assert.notProperty, true)\n .to.not.have.property(prop);\n };\n\n /**\n * ### .propertyVal(object, property, value, [message])\n *\n * Asserts that `object` has a direct or inherited property named by\n * `property` with a value given by `value`. Uses a strict equality check\n * (===).\n *\n * assert.propertyVal({ tea: 'is good' }, 'tea', 'is good');\n *\n * @name propertyVal\n * @param {Object} object\n * @param {String} property\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.propertyVal = function (obj, prop, val, msg) {\n new Assertion(obj, msg, assert.propertyVal, true)\n .to.have.property(prop, val);\n };\n\n /**\n * ### .notPropertyVal(object, property, value, [message])\n *\n * Asserts that `object` does _not_ have a direct or inherited property named\n * by `property` with value given by `value`. Uses a strict equality check\n * (===).\n *\n * assert.notPropertyVal({ tea: 'is good' }, 'tea', 'is bad');\n * assert.notPropertyVal({ tea: 'is good' }, 'coffee', 'is good');\n *\n * @name notPropertyVal\n * @param {Object} object\n * @param {String} property\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notPropertyVal = function (obj, prop, val, msg) {\n new Assertion(obj, msg, assert.notPropertyVal, true)\n .to.not.have.property(prop, val);\n };\n\n /**\n * ### .deepPropertyVal(object, property, value, [message])\n *\n * Asserts that `object` has a direct or inherited property named by\n * `property` with a value given by `value`. Uses a deep equality check.\n *\n * assert.deepPropertyVal({ tea: { green: 'matcha' } }, 'tea', { green: 'matcha' });\n *\n * @name deepPropertyVal\n * @param {Object} object\n * @param {String} property\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.deepPropertyVal = function (obj, prop, val, msg) {\n new Assertion(obj, msg, assert.deepPropertyVal, true)\n .to.have.deep.property(prop, val);\n };\n\n /**\n * ### .notDeepPropertyVal(object, property, value, [message])\n *\n * Asserts that `object` does _not_ have a direct or inherited property named\n * by `property` with value given by `value`. Uses a deep equality check.\n *\n * assert.notDeepPropertyVal({ tea: { green: 'matcha' } }, 'tea', { black: 'matcha' });\n * assert.notDeepPropertyVal({ tea: { green: 'matcha' } }, 'tea', { green: 'oolong' });\n * assert.notDeepPropertyVal({ tea: { green: 'matcha' } }, 'coffee', { green: 'matcha' });\n *\n * @name notDeepPropertyVal\n * @param {Object} object\n * @param {String} property\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notDeepPropertyVal = function (obj, prop, val, msg) {\n new Assertion(obj, msg, assert.notDeepPropertyVal, true)\n .to.not.have.deep.property(prop, val);\n };\n\n /**\n * ### .ownProperty(object, property, [message])\n *\n * Asserts that `object` has a direct property named by `property`. Inherited\n * properties aren't checked.\n *\n * assert.ownProperty({ tea: { green: 'matcha' }}, 'tea');\n *\n * @name ownProperty\n * @param {Object} object\n * @param {String} property\n * @param {String} message\n * @api public\n */\n\n assert.ownProperty = function (obj, prop, msg) {\n new Assertion(obj, msg, assert.ownProperty, true)\n .to.have.own.property(prop);\n };\n\n /**\n * ### .notOwnProperty(object, property, [message])\n *\n * Asserts that `object` does _not_ have a direct property named by\n * `property`. Inherited properties aren't checked.\n *\n * assert.notOwnProperty({ tea: { green: 'matcha' }}, 'coffee');\n * assert.notOwnProperty({}, 'toString');\n *\n * @name notOwnProperty\n * @param {Object} object\n * @param {String} property\n * @param {String} message\n * @api public\n */\n\n assert.notOwnProperty = function (obj, prop, msg) {\n new Assertion(obj, msg, assert.notOwnProperty, true)\n .to.not.have.own.property(prop);\n };\n\n /**\n * ### .ownPropertyVal(object, property, value, [message])\n *\n * Asserts that `object` has a direct property named by `property` and a value\n * equal to the provided `value`. Uses a strict equality check (===).\n * Inherited properties aren't checked.\n *\n * assert.ownPropertyVal({ coffee: 'is good'}, 'coffee', 'is good');\n *\n * @name ownPropertyVal\n * @param {Object} object\n * @param {String} property\n * @param {Mixed} value\n * @param {String} message\n * @api public\n */\n\n assert.ownPropertyVal = function (obj, prop, value, msg) {\n new Assertion(obj, msg, assert.ownPropertyVal, true)\n .to.have.own.property(prop, value);\n };\n\n /**\n * ### .notOwnPropertyVal(object, property, value, [message])\n *\n * Asserts that `object` does _not_ have a direct property named by `property`\n * with a value equal to the provided `value`. Uses a strict equality check\n * (===). Inherited properties aren't checked.\n *\n * assert.notOwnPropertyVal({ tea: 'is better'}, 'tea', 'is worse');\n * assert.notOwnPropertyVal({}, 'toString', Object.prototype.toString);\n *\n * @name notOwnPropertyVal\n * @param {Object} object\n * @param {String} property\n * @param {Mixed} value\n * @param {String} message\n * @api public\n */\n\n assert.notOwnPropertyVal = function (obj, prop, value, msg) {\n new Assertion(obj, msg, assert.notOwnPropertyVal, true)\n .to.not.have.own.property(prop, value);\n };\n\n /**\n * ### .deepOwnPropertyVal(object, property, value, [message])\n *\n * Asserts that `object` has a direct property named by `property` and a value\n * equal to the provided `value`. Uses a deep equality check. Inherited\n * properties aren't checked.\n *\n * assert.deepOwnPropertyVal({ tea: { green: 'matcha' } }, 'tea', { green: 'matcha' });\n *\n * @name deepOwnPropertyVal\n * @param {Object} object\n * @param {String} property\n * @param {Mixed} value\n * @param {String} message\n * @api public\n */\n\n assert.deepOwnPropertyVal = function (obj, prop, value, msg) {\n new Assertion(obj, msg, assert.deepOwnPropertyVal, true)\n .to.have.deep.own.property(prop, value);\n };\n\n /**\n * ### .notDeepOwnPropertyVal(object, property, value, [message])\n *\n * Asserts that `object` does _not_ have a direct property named by `property`\n * with a value equal to the provided `value`. Uses a deep equality check.\n * Inherited properties aren't checked.\n *\n * assert.notDeepOwnPropertyVal({ tea: { green: 'matcha' } }, 'tea', { black: 'matcha' });\n * assert.notDeepOwnPropertyVal({ tea: { green: 'matcha' } }, 'tea', { green: 'oolong' });\n * assert.notDeepOwnPropertyVal({ tea: { green: 'matcha' } }, 'coffee', { green: 'matcha' });\n * assert.notDeepOwnPropertyVal({}, 'toString', Object.prototype.toString);\n *\n * @name notDeepOwnPropertyVal\n * @param {Object} object\n * @param {String} property\n * @param {Mixed} value\n * @param {String} message\n * @api public\n */\n\n assert.notDeepOwnPropertyVal = function (obj, prop, value, msg) {\n new Assertion(obj, msg, assert.notDeepOwnPropertyVal, true)\n .to.not.have.deep.own.property(prop, value);\n };\n\n /**\n * ### .nestedProperty(object, property, [message])\n *\n * Asserts that `object` has a direct or inherited property named by\n * `property`, which can be a string using dot- and bracket-notation for\n * nested reference.\n *\n * assert.nestedProperty({ tea: { green: 'matcha' }}, 'tea.green');\n *\n * @name nestedProperty\n * @param {Object} object\n * @param {String} property\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.nestedProperty = function (obj, prop, msg) {\n new Assertion(obj, msg, assert.nestedProperty, true)\n .to.have.nested.property(prop);\n };\n\n /**\n * ### .notNestedProperty(object, property, [message])\n *\n * Asserts that `object` does _not_ have a property named by `property`, which\n * can be a string using dot- and bracket-notation for nested reference. The\n * property cannot exist on the object nor anywhere in its prototype chain.\n *\n * assert.notNestedProperty({ tea: { green: 'matcha' }}, 'tea.oolong');\n *\n * @name notNestedProperty\n * @param {Object} object\n * @param {String} property\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notNestedProperty = function (obj, prop, msg) {\n new Assertion(obj, msg, assert.notNestedProperty, true)\n .to.not.have.nested.property(prop);\n };\n\n /**\n * ### .nestedPropertyVal(object, property, value, [message])\n *\n * Asserts that `object` has a property named by `property` with value given\n * by `value`. `property` can use dot- and bracket-notation for nested\n * reference. Uses a strict equality check (===).\n *\n * assert.nestedPropertyVal({ tea: { green: 'matcha' }}, 'tea.green', 'matcha');\n *\n * @name nestedPropertyVal\n * @param {Object} object\n * @param {String} property\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.nestedPropertyVal = function (obj, prop, val, msg) {\n new Assertion(obj, msg, assert.nestedPropertyVal, true)\n .to.have.nested.property(prop, val);\n };\n\n /**\n * ### .notNestedPropertyVal(object, property, value, [message])\n *\n * Asserts that `object` does _not_ have a property named by `property` with\n * value given by `value`. `property` can use dot- and bracket-notation for\n * nested reference. Uses a strict equality check (===).\n *\n * assert.notNestedPropertyVal({ tea: { green: 'matcha' }}, 'tea.green', 'konacha');\n * assert.notNestedPropertyVal({ tea: { green: 'matcha' }}, 'coffee.green', 'matcha');\n *\n * @name notNestedPropertyVal\n * @param {Object} object\n * @param {String} property\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notNestedPropertyVal = function (obj, prop, val, msg) {\n new Assertion(obj, msg, assert.notNestedPropertyVal, true)\n .to.not.have.nested.property(prop, val);\n };\n\n /**\n * ### .deepNestedPropertyVal(object, property, value, [message])\n *\n * Asserts that `object` has a property named by `property` with a value given\n * by `value`. `property` can use dot- and bracket-notation for nested\n * reference. Uses a deep equality check.\n *\n * assert.deepNestedPropertyVal({ tea: { green: { matcha: 'yum' } } }, 'tea.green', { matcha: 'yum' });\n *\n * @name deepNestedPropertyVal\n * @param {Object} object\n * @param {String} property\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.deepNestedPropertyVal = function (obj, prop, val, msg) {\n new Assertion(obj, msg, assert.deepNestedPropertyVal, true)\n .to.have.deep.nested.property(prop, val);\n };\n\n /**\n * ### .notDeepNestedPropertyVal(object, property, value, [message])\n *\n * Asserts that `object` does _not_ have a property named by `property` with\n * value given by `value`. `property` can use dot- and bracket-notation for\n * nested reference. Uses a deep equality check.\n *\n * assert.notDeepNestedPropertyVal({ tea: { green: { matcha: 'yum' } } }, 'tea.green', { oolong: 'yum' });\n * assert.notDeepNestedPropertyVal({ tea: { green: { matcha: 'yum' } } }, 'tea.green', { matcha: 'yuck' });\n * assert.notDeepNestedPropertyVal({ tea: { green: { matcha: 'yum' } } }, 'tea.black', { matcha: 'yum' });\n *\n * @name notDeepNestedPropertyVal\n * @param {Object} object\n * @param {String} property\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notDeepNestedPropertyVal = function (obj, prop, val, msg) {\n new Assertion(obj, msg, assert.notDeepNestedPropertyVal, true)\n .to.not.have.deep.nested.property(prop, val);\n }\n\n /**\n * ### .lengthOf(object, length, [message])\n *\n * Asserts that `object` has a `length` or `size` with the expected value.\n *\n * assert.lengthOf([1,2,3], 3, 'array has length of 3');\n * assert.lengthOf('foobar', 6, 'string has length of 6');\n * assert.lengthOf(new Set([1,2,3]), 3, 'set has size of 3');\n * assert.lengthOf(new Map([['a',1],['b',2],['c',3]]), 3, 'map has size of 3');\n *\n * @name lengthOf\n * @param {Mixed} object\n * @param {Number} length\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.lengthOf = function (exp, len, msg) {\n new Assertion(exp, msg, assert.lengthOf, true).to.have.lengthOf(len);\n };\n\n /**\n * ### .hasAnyKeys(object, [keys], [message])\n *\n * Asserts that `object` has at least one of the `keys` provided.\n * You can also provide a single object instead of a `keys` array and its keys\n * will be used as the expected set of keys.\n *\n * assert.hasAnyKeys({foo: 1, bar: 2, baz: 3}, ['foo', 'iDontExist', 'baz']);\n * assert.hasAnyKeys({foo: 1, bar: 2, baz: 3}, {foo: 30, iDontExist: 99, baz: 1337});\n * assert.hasAnyKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{foo: 1}, 'key']);\n * assert.hasAnyKeys(new Set([{foo: 'bar'}, 'anotherKey']), [{foo: 'bar'}, 'anotherKey']);\n *\n * @name hasAnyKeys\n * @param {Mixed} object\n * @param {Array|Object} keys\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.hasAnyKeys = function (obj, keys, msg) {\n new Assertion(obj, msg, assert.hasAnyKeys, true).to.have.any.keys(keys);\n }\n\n /**\n * ### .hasAllKeys(object, [keys], [message])\n *\n * Asserts that `object` has all and only all of the `keys` provided.\n * You can also provide a single object instead of a `keys` array and its keys\n * will be used as the expected set of keys.\n *\n * assert.hasAllKeys({foo: 1, bar: 2, baz: 3}, ['foo', 'bar', 'baz']);\n * assert.hasAllKeys({foo: 1, bar: 2, baz: 3}, {foo: 30, bar: 99, baz: 1337]);\n * assert.hasAllKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{foo: 1}, 'key']);\n * assert.hasAllKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{foo: 'bar'}, 'anotherKey']);\n *\n * @name hasAllKeys\n * @param {Mixed} object\n * @param {String[]} keys\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.hasAllKeys = function (obj, keys, msg) {\n new Assertion(obj, msg, assert.hasAllKeys, true).to.have.all.keys(keys);\n }\n\n /**\n * ### .containsAllKeys(object, [keys], [message])\n *\n * Asserts that `object` has all of the `keys` provided but may have more keys not listed.\n * You can also provide a single object instead of a `keys` array and its keys\n * will be used as the expected set of keys.\n *\n * assert.containsAllKeys({foo: 1, bar: 2, baz: 3}, ['foo', 'baz']);\n * assert.containsAllKeys({foo: 1, bar: 2, baz: 3}, ['foo', 'bar', 'baz']);\n * assert.containsAllKeys({foo: 1, bar: 2, baz: 3}, {foo: 30, baz: 1337});\n * assert.containsAllKeys({foo: 1, bar: 2, baz: 3}, {foo: 30, bar: 99, baz: 1337});\n * assert.containsAllKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{foo: 1}]);\n * assert.containsAllKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{foo: 1}, 'key']);\n * assert.containsAllKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{foo: 'bar'}]);\n * assert.containsAllKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{foo: 'bar'}, 'anotherKey']);\n *\n * @name containsAllKeys\n * @param {Mixed} object\n * @param {String[]} keys\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.containsAllKeys = function (obj, keys, msg) {\n new Assertion(obj, msg, assert.containsAllKeys, true)\n .to.contain.all.keys(keys);\n }\n\n /**\n * ### .doesNotHaveAnyKeys(object, [keys], [message])\n *\n * Asserts that `object` has none of the `keys` provided.\n * You can also provide a single object instead of a `keys` array and its keys\n * will be used as the expected set of keys.\n *\n * assert.doesNotHaveAnyKeys({foo: 1, bar: 2, baz: 3}, ['one', 'two', 'example']);\n * assert.doesNotHaveAnyKeys({foo: 1, bar: 2, baz: 3}, {one: 1, two: 2, example: 'foo'});\n * assert.doesNotHaveAnyKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{one: 'two'}, 'example']);\n * assert.doesNotHaveAnyKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{one: 'two'}, 'example']);\n *\n * @name doesNotHaveAnyKeys\n * @param {Mixed} object\n * @param {String[]} keys\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotHaveAnyKeys = function (obj, keys, msg) {\n new Assertion(obj, msg, assert.doesNotHaveAnyKeys, true)\n .to.not.have.any.keys(keys);\n }\n\n /**\n * ### .doesNotHaveAllKeys(object, [keys], [message])\n *\n * Asserts that `object` does not have at least one of the `keys` provided.\n * You can also provide a single object instead of a `keys` array and its keys\n * will be used as the expected set of keys.\n *\n * assert.doesNotHaveAllKeys({foo: 1, bar: 2, baz: 3}, ['one', 'two', 'example']);\n * assert.doesNotHaveAllKeys({foo: 1, bar: 2, baz: 3}, {one: 1, two: 2, example: 'foo'});\n * assert.doesNotHaveAllKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{one: 'two'}, 'example']);\n * assert.doesNotHaveAllKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{one: 'two'}, 'example']);\n *\n * @name doesNotHaveAllKeys\n * @param {Mixed} object\n * @param {String[]} keys\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotHaveAllKeys = function (obj, keys, msg) {\n new Assertion(obj, msg, assert.doesNotHaveAllKeys, true)\n .to.not.have.all.keys(keys);\n }\n\n /**\n * ### .hasAnyDeepKeys(object, [keys], [message])\n *\n * Asserts that `object` has at least one of the `keys` provided.\n * Since Sets and Maps can have objects as keys you can use this assertion to perform\n * a deep comparison.\n * You can also provide a single object instead of a `keys` array and its keys\n * will be used as the expected set of keys.\n *\n * assert.hasAnyDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [1, 2]]), {one: 'one'});\n * assert.hasAnyDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [1, 2]]), [{one: 'one'}, {two: 'two'}]);\n * assert.hasAnyDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [{two: 'two'}, 'valueTwo']]), [{one: 'one'}, {two: 'two'}]);\n * assert.hasAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), {one: 'one'});\n * assert.hasAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {three: 'three'}]);\n * assert.hasAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {two: 'two'}]);\n *\n * @name doesNotHaveAllKeys\n * @param {Mixed} object\n * @param {Array|Object} keys\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.hasAnyDeepKeys = function (obj, keys, msg) {\n new Assertion(obj, msg, assert.hasAnyDeepKeys, true)\n .to.have.any.deep.keys(keys);\n }\n\n /**\n * ### .hasAllDeepKeys(object, [keys], [message])\n *\n * Asserts that `object` has all and only all of the `keys` provided.\n * Since Sets and Maps can have objects as keys you can use this assertion to perform\n * a deep comparison.\n * You can also provide a single object instead of a `keys` array and its keys\n * will be used as the expected set of keys.\n *\n * assert.hasAllDeepKeys(new Map([[{one: 'one'}, 'valueOne']]), {one: 'one'});\n * assert.hasAllDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [{two: 'two'}, 'valueTwo']]), [{one: 'one'}, {two: 'two'}]);\n * assert.hasAllDeepKeys(new Set([{one: 'one'}]), {one: 'one'});\n * assert.hasAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {two: 'two'}]);\n *\n * @name hasAllDeepKeys\n * @param {Mixed} object\n * @param {Array|Object} keys\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.hasAllDeepKeys = function (obj, keys, msg) {\n new Assertion(obj, msg, assert.hasAllDeepKeys, true)\n .to.have.all.deep.keys(keys);\n }\n\n /**\n * ### .containsAllDeepKeys(object, [keys], [message])\n *\n * Asserts that `object` contains all of the `keys` provided.\n * Since Sets and Maps can have objects as keys you can use this assertion to perform\n * a deep comparison.\n * You can also provide a single object instead of a `keys` array and its keys\n * will be used as the expected set of keys.\n *\n * assert.containsAllDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [1, 2]]), {one: 'one'});\n * assert.containsAllDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [{two: 'two'}, 'valueTwo']]), [{one: 'one'}, {two: 'two'}]);\n * assert.containsAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), {one: 'one'});\n * assert.containsAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {two: 'two'}]);\n *\n * @name containsAllDeepKeys\n * @param {Mixed} object\n * @param {Array|Object} keys\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.containsAllDeepKeys = function (obj, keys, msg) {\n new Assertion(obj, msg, assert.containsAllDeepKeys, true)\n .to.contain.all.deep.keys(keys);\n }\n\n /**\n * ### .doesNotHaveAnyDeepKeys(object, [keys], [message])\n *\n * Asserts that `object` has none of the `keys` provided.\n * Since Sets and Maps can have objects as keys you can use this assertion to perform\n * a deep comparison.\n * You can also provide a single object instead of a `keys` array and its keys\n * will be used as the expected set of keys.\n *\n * assert.doesNotHaveAnyDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [1, 2]]), {thisDoesNot: 'exist'});\n * assert.doesNotHaveAnyDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [{two: 'two'}, 'valueTwo']]), [{twenty: 'twenty'}, {fifty: 'fifty'}]);\n * assert.doesNotHaveAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), {twenty: 'twenty'});\n * assert.doesNotHaveAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{twenty: 'twenty'}, {fifty: 'fifty'}]);\n *\n * @name doesNotHaveAnyDeepKeys\n * @param {Mixed} object\n * @param {Array|Object} keys\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotHaveAnyDeepKeys = function (obj, keys, msg) {\n new Assertion(obj, msg, assert.doesNotHaveAnyDeepKeys, true)\n .to.not.have.any.deep.keys(keys);\n }\n\n /**\n * ### .doesNotHaveAllDeepKeys(object, [keys], [message])\n *\n * Asserts that `object` does not have at least one of the `keys` provided.\n * Since Sets and Maps can have objects as keys you can use this assertion to perform\n * a deep comparison.\n * You can also provide a single object instead of a `keys` array and its keys\n * will be used as the expected set of keys.\n *\n * assert.doesNotHaveAllDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [1, 2]]), {thisDoesNot: 'exist'});\n * assert.doesNotHaveAllDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [{two: 'two'}, 'valueTwo']]), [{twenty: 'twenty'}, {one: 'one'}]);\n * assert.doesNotHaveAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), {twenty: 'twenty'});\n * assert.doesNotHaveAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {fifty: 'fifty'}]);\n *\n * @name doesNotHaveAllDeepKeys\n * @param {Mixed} object\n * @param {Array|Object} keys\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotHaveAllDeepKeys = function (obj, keys, msg) {\n new Assertion(obj, msg, assert.doesNotHaveAllDeepKeys, true)\n .to.not.have.all.deep.keys(keys);\n }\n\n /**\n * ### .throws(fn, [errorLike/string/regexp], [string/regexp], [message])\n *\n * If `errorLike` is an `Error` constructor, asserts that `fn` will throw an error that is an\n * instance of `errorLike`.\n * If `errorLike` is an `Error` instance, asserts that the error thrown is the same\n * instance as `errorLike`.\n * If `errMsgMatcher` is provided, it also asserts that the error thrown will have a\n * message matching `errMsgMatcher`.\n *\n * assert.throws(fn, 'Error thrown must have this msg');\n * assert.throws(fn, /Error thrown must have a msg that matches this/);\n * assert.throws(fn, ReferenceError);\n * assert.throws(fn, errorInstance);\n * assert.throws(fn, ReferenceError, 'Error thrown must be a ReferenceError and have this msg');\n * assert.throws(fn, errorInstance, 'Error thrown must be the same errorInstance and have this msg');\n * assert.throws(fn, ReferenceError, /Error thrown must be a ReferenceError and match this/);\n * assert.throws(fn, errorInstance, /Error thrown must be the same errorInstance and match this/);\n *\n * @name throws\n * @alias throw\n * @alias Throw\n * @param {Function} fn\n * @param {ErrorConstructor|Error} errorLike\n * @param {RegExp|String} errMsgMatcher\n * @param {String} message\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types\n * @namespace Assert\n * @api public\n */\n\n assert.throws = function (fn, errorLike, errMsgMatcher, msg) {\n if ('string' === typeof errorLike || errorLike instanceof RegExp) {\n errMsgMatcher = errorLike;\n errorLike = null;\n }\n\n var assertErr = new Assertion(fn, msg, assert.throws, true)\n .to.throw(errorLike, errMsgMatcher);\n return flag(assertErr, 'object');\n };\n\n /**\n * ### .doesNotThrow(fn, [errorLike/string/regexp], [string/regexp], [message])\n *\n * If `errorLike` is an `Error` constructor, asserts that `fn` will _not_ throw an error that is an\n * instance of `errorLike`.\n * If `errorLike` is an `Error` instance, asserts that the error thrown is _not_ the same\n * instance as `errorLike`.\n * If `errMsgMatcher` is provided, it also asserts that the error thrown will _not_ have a\n * message matching `errMsgMatcher`.\n *\n * assert.doesNotThrow(fn, 'Any Error thrown must not have this message');\n * assert.doesNotThrow(fn, /Any Error thrown must not match this/);\n * assert.doesNotThrow(fn, Error);\n * assert.doesNotThrow(fn, errorInstance);\n * assert.doesNotThrow(fn, Error, 'Error must not have this message');\n * assert.doesNotThrow(fn, errorInstance, 'Error must not have this message');\n * assert.doesNotThrow(fn, Error, /Error must not match this/);\n * assert.doesNotThrow(fn, errorInstance, /Error must not match this/);\n *\n * @name doesNotThrow\n * @param {Function} fn\n * @param {ErrorConstructor} errorLike\n * @param {RegExp|String} errMsgMatcher\n * @param {String} message\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotThrow = function (fn, errorLike, errMsgMatcher, msg) {\n if ('string' === typeof errorLike || errorLike instanceof RegExp) {\n errMsgMatcher = errorLike;\n errorLike = null;\n }\n\n new Assertion(fn, msg, assert.doesNotThrow, true)\n .to.not.throw(errorLike, errMsgMatcher);\n };\n\n /**\n * ### .operator(val1, operator, val2, [message])\n *\n * Compares two values using `operator`.\n *\n * assert.operator(1, '<', 2, 'everything is ok');\n * assert.operator(1, '>', 2, 'this will fail');\n *\n * @name operator\n * @param {Mixed} val1\n * @param {String} operator\n * @param {Mixed} val2\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.operator = function (val, operator, val2, msg) {\n var ok;\n switch(operator) {\n case '==':\n ok = val == val2;\n break;\n case '===':\n ok = val === val2;\n break;\n case '>':\n ok = val > val2;\n break;\n case '>=':\n ok = val >= val2;\n break;\n case '<':\n ok = val < val2;\n break;\n case '<=':\n ok = val <= val2;\n break;\n case '!=':\n ok = val != val2;\n break;\n case '!==':\n ok = val !== val2;\n break;\n default:\n msg = msg ? msg + ': ' : msg;\n throw new chai.AssertionError(\n msg + 'Invalid operator \"' + operator + '\"',\n undefined,\n assert.operator\n );\n }\n var test = new Assertion(ok, msg, assert.operator, true);\n test.assert(\n true === flag(test, 'object')\n , 'expected ' + util.inspect(val) + ' to be ' + operator + ' ' + util.inspect(val2)\n , 'expected ' + util.inspect(val) + ' to not be ' + operator + ' ' + util.inspect(val2) );\n };\n\n /**\n * ### .closeTo(actual, expected, delta, [message])\n *\n * Asserts that the target is equal `expected`, to within a +/- `delta` range.\n *\n * assert.closeTo(1.5, 1, 0.5, 'numbers are close');\n *\n * @name closeTo\n * @param {Number} actual\n * @param {Number} expected\n * @param {Number} delta\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.closeTo = function (act, exp, delta, msg) {\n new Assertion(act, msg, assert.closeTo, true).to.be.closeTo(exp, delta);\n };\n\n /**\n * ### .approximately(actual, expected, delta, [message])\n *\n * Asserts that the target is equal `expected`, to within a +/- `delta` range.\n *\n * assert.approximately(1.5, 1, 0.5, 'numbers are close');\n *\n * @name approximately\n * @param {Number} actual\n * @param {Number} expected\n * @param {Number} delta\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.approximately = function (act, exp, delta, msg) {\n new Assertion(act, msg, assert.approximately, true)\n .to.be.approximately(exp, delta);\n };\n\n /**\n * ### .sameMembers(set1, set2, [message])\n *\n * Asserts that `set1` and `set2` have the same members in any order. Uses a\n * strict equality check (===).\n *\n * assert.sameMembers([ 1, 2, 3 ], [ 2, 1, 3 ], 'same members');\n *\n * @name sameMembers\n * @param {Array} set1\n * @param {Array} set2\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.sameMembers = function (set1, set2, msg) {\n new Assertion(set1, msg, assert.sameMembers, true)\n .to.have.same.members(set2);\n }\n\n /**\n * ### .notSameMembers(set1, set2, [message])\n *\n * Asserts that `set1` and `set2` don't have the same members in any order.\n * Uses a strict equality check (===).\n *\n * assert.notSameMembers([ 1, 2, 3 ], [ 5, 1, 3 ], 'not same members');\n *\n * @name notSameMembers\n * @param {Array} set1\n * @param {Array} set2\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notSameMembers = function (set1, set2, msg) {\n new Assertion(set1, msg, assert.notSameMembers, true)\n .to.not.have.same.members(set2);\n }\n\n /**\n * ### .sameDeepMembers(set1, set2, [message])\n *\n * Asserts that `set1` and `set2` have the same members in any order. Uses a\n * deep equality check.\n *\n * assert.sameDeepMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [{ b: 2 }, { a: 1 }, { c: 3 }], 'same deep members');\n *\n * @name sameDeepMembers\n * @param {Array} set1\n * @param {Array} set2\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.sameDeepMembers = function (set1, set2, msg) {\n new Assertion(set1, msg, assert.sameDeepMembers, true)\n .to.have.same.deep.members(set2);\n }\n\n /**\n * ### .notSameDeepMembers(set1, set2, [message])\n *\n * Asserts that `set1` and `set2` don't have the same members in any order.\n * Uses a deep equality check.\n *\n * assert.notSameDeepMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [{ b: 2 }, { a: 1 }, { f: 5 }], 'not same deep members');\n *\n * @name notSameDeepMembers\n * @param {Array} set1\n * @param {Array} set2\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notSameDeepMembers = function (set1, set2, msg) {\n new Assertion(set1, msg, assert.notSameDeepMembers, true)\n .to.not.have.same.deep.members(set2);\n }\n\n /**\n * ### .sameOrderedMembers(set1, set2, [message])\n *\n * Asserts that `set1` and `set2` have the same members in the same order.\n * Uses a strict equality check (===).\n *\n * assert.sameOrderedMembers([ 1, 2, 3 ], [ 1, 2, 3 ], 'same ordered members');\n *\n * @name sameOrderedMembers\n * @param {Array} set1\n * @param {Array} set2\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.sameOrderedMembers = function (set1, set2, msg) {\n new Assertion(set1, msg, assert.sameOrderedMembers, true)\n .to.have.same.ordered.members(set2);\n }\n\n /**\n * ### .notSameOrderedMembers(set1, set2, [message])\n *\n * Asserts that `set1` and `set2` don't have the same members in the same\n * order. Uses a strict equality check (===).\n *\n * assert.notSameOrderedMembers([ 1, 2, 3 ], [ 2, 1, 3 ], 'not same ordered members');\n *\n * @name notSameOrderedMembers\n * @param {Array} set1\n * @param {Array} set2\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notSameOrderedMembers = function (set1, set2, msg) {\n new Assertion(set1, msg, assert.notSameOrderedMembers, true)\n .to.not.have.same.ordered.members(set2);\n }\n\n /**\n * ### .sameDeepOrderedMembers(set1, set2, [message])\n *\n * Asserts that `set1` and `set2` have the same members in the same order.\n * Uses a deep equality check.\n *\n * assert.sameDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { a: 1 }, { b: 2 }, { c: 3 } ], 'same deep ordered members');\n *\n * @name sameDeepOrderedMembers\n * @param {Array} set1\n * @param {Array} set2\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.sameDeepOrderedMembers = function (set1, set2, msg) {\n new Assertion(set1, msg, assert.sameDeepOrderedMembers, true)\n .to.have.same.deep.ordered.members(set2);\n }\n\n /**\n * ### .notSameDeepOrderedMembers(set1, set2, [message])\n *\n * Asserts that `set1` and `set2` don't have the same members in the same\n * order. Uses a deep equality check.\n *\n * assert.notSameDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { a: 1 }, { b: 2 }, { z: 5 } ], 'not same deep ordered members');\n * assert.notSameDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { b: 2 }, { a: 1 }, { c: 3 } ], 'not same deep ordered members');\n *\n * @name notSameDeepOrderedMembers\n * @param {Array} set1\n * @param {Array} set2\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notSameDeepOrderedMembers = function (set1, set2, msg) {\n new Assertion(set1, msg, assert.notSameDeepOrderedMembers, true)\n .to.not.have.same.deep.ordered.members(set2);\n }\n\n /**\n * ### .includeMembers(superset, subset, [message])\n *\n * Asserts that `subset` is included in `superset` in any order. Uses a\n * strict equality check (===). Duplicates are ignored.\n *\n * assert.includeMembers([ 1, 2, 3 ], [ 2, 1, 2 ], 'include members');\n *\n * @name includeMembers\n * @param {Array} superset\n * @param {Array} subset\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.includeMembers = function (superset, subset, msg) {\n new Assertion(superset, msg, assert.includeMembers, true)\n .to.include.members(subset);\n }\n\n /**\n * ### .notIncludeMembers(superset, subset, [message])\n *\n * Asserts that `subset` isn't included in `superset` in any order. Uses a\n * strict equality check (===). Duplicates are ignored.\n *\n * assert.notIncludeMembers([ 1, 2, 3 ], [ 5, 1 ], 'not include members');\n *\n * @name notIncludeMembers\n * @param {Array} superset\n * @param {Array} subset\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notIncludeMembers = function (superset, subset, msg) {\n new Assertion(superset, msg, assert.notIncludeMembers, true)\n .to.not.include.members(subset);\n }\n\n /**\n * ### .includeDeepMembers(superset, subset, [message])\n *\n * Asserts that `subset` is included in `superset` in any order. Uses a deep\n * equality check. Duplicates are ignored.\n *\n * assert.includeDeepMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { b: 2 }, { a: 1 }, { b: 2 } ], 'include deep members');\n *\n * @name includeDeepMembers\n * @param {Array} superset\n * @param {Array} subset\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.includeDeepMembers = function (superset, subset, msg) {\n new Assertion(superset, msg, assert.includeDeepMembers, true)\n .to.include.deep.members(subset);\n }\n\n /**\n * ### .notIncludeDeepMembers(superset, subset, [message])\n *\n * Asserts that `subset` isn't included in `superset` in any order. Uses a\n * deep equality check. Duplicates are ignored.\n *\n * assert.notIncludeDeepMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { b: 2 }, { f: 5 } ], 'not include deep members');\n *\n * @name notIncludeDeepMembers\n * @param {Array} superset\n * @param {Array} subset\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notIncludeDeepMembers = function (superset, subset, msg) {\n new Assertion(superset, msg, assert.notIncludeDeepMembers, true)\n .to.not.include.deep.members(subset);\n }\n\n /**\n * ### .includeOrderedMembers(superset, subset, [message])\n *\n * Asserts that `subset` is included in `superset` in the same order\n * beginning with the first element in `superset`. Uses a strict equality\n * check (===).\n *\n * assert.includeOrderedMembers([ 1, 2, 3 ], [ 1, 2 ], 'include ordered members');\n *\n * @name includeOrderedMembers\n * @param {Array} superset\n * @param {Array} subset\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.includeOrderedMembers = function (superset, subset, msg) {\n new Assertion(superset, msg, assert.includeOrderedMembers, true)\n .to.include.ordered.members(subset);\n }\n\n /**\n * ### .notIncludeOrderedMembers(superset, subset, [message])\n *\n * Asserts that `subset` isn't included in `superset` in the same order\n * beginning with the first element in `superset`. Uses a strict equality\n * check (===).\n *\n * assert.notIncludeOrderedMembers([ 1, 2, 3 ], [ 2, 1 ], 'not include ordered members');\n * assert.notIncludeOrderedMembers([ 1, 2, 3 ], [ 2, 3 ], 'not include ordered members');\n *\n * @name notIncludeOrderedMembers\n * @param {Array} superset\n * @param {Array} subset\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notIncludeOrderedMembers = function (superset, subset, msg) {\n new Assertion(superset, msg, assert.notIncludeOrderedMembers, true)\n .to.not.include.ordered.members(subset);\n }\n\n /**\n * ### .includeDeepOrderedMembers(superset, subset, [message])\n *\n * Asserts that `subset` is included in `superset` in the same order\n * beginning with the first element in `superset`. Uses a deep equality\n * check.\n *\n * assert.includeDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { a: 1 }, { b: 2 } ], 'include deep ordered members');\n *\n * @name includeDeepOrderedMembers\n * @param {Array} superset\n * @param {Array} subset\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.includeDeepOrderedMembers = function (superset, subset, msg) {\n new Assertion(superset, msg, assert.includeDeepOrderedMembers, true)\n .to.include.deep.ordered.members(subset);\n }\n\n /**\n * ### .notIncludeDeepOrderedMembers(superset, subset, [message])\n *\n * Asserts that `subset` isn't included in `superset` in the same order\n * beginning with the first element in `superset`. Uses a deep equality\n * check.\n *\n * assert.notIncludeDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { a: 1 }, { f: 5 } ], 'not include deep ordered members');\n * assert.notIncludeDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { b: 2 }, { a: 1 } ], 'not include deep ordered members');\n * assert.notIncludeDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { b: 2 }, { c: 3 } ], 'not include deep ordered members');\n *\n * @name notIncludeDeepOrderedMembers\n * @param {Array} superset\n * @param {Array} subset\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notIncludeDeepOrderedMembers = function (superset, subset, msg) {\n new Assertion(superset, msg, assert.notIncludeDeepOrderedMembers, true)\n .to.not.include.deep.ordered.members(subset);\n }\n\n /**\n * ### .oneOf(inList, list, [message])\n *\n * Asserts that non-object, non-array value `inList` appears in the flat array `list`.\n *\n * assert.oneOf(1, [ 2, 1 ], 'Not found in list');\n *\n * @name oneOf\n * @param {*} inList\n * @param {Array<*>} list\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.oneOf = function (inList, list, msg) {\n new Assertion(inList, msg, assert.oneOf, true).to.be.oneOf(list);\n }\n\n /**\n * ### .changes(function, object, property, [message])\n *\n * Asserts that a function changes the value of a property.\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 22 };\n * assert.changes(fn, obj, 'val');\n *\n * @name changes\n * @param {Function} modifier function\n * @param {Object} object or getter function\n * @param {String} property name _optional_\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.changes = function (fn, obj, prop, msg) {\n if (arguments.length === 3 && typeof obj === 'function') {\n msg = prop;\n prop = null;\n }\n\n new Assertion(fn, msg, assert.changes, true).to.change(obj, prop);\n }\n\n /**\n * ### .changesBy(function, object, property, delta, [message])\n *\n * Asserts that a function changes the value of a property by an amount (delta).\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val += 2 };\n * assert.changesBy(fn, obj, 'val', 2);\n *\n * @name changesBy\n * @param {Function} modifier function\n * @param {Object} object or getter function\n * @param {String} property name _optional_\n * @param {Number} change amount (delta)\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.changesBy = function (fn, obj, prop, delta, msg) {\n if (arguments.length === 4 && typeof obj === 'function') {\n var tmpMsg = delta;\n delta = prop;\n msg = tmpMsg;\n } else if (arguments.length === 3) {\n delta = prop;\n prop = null;\n }\n\n new Assertion(fn, msg, assert.changesBy, true)\n .to.change(obj, prop).by(delta);\n }\n\n /**\n * ### .doesNotChange(function, object, property, [message])\n *\n * Asserts that a function does not change the value of a property.\n *\n * var obj = { val: 10 };\n * var fn = function() { console.log('foo'); };\n * assert.doesNotChange(fn, obj, 'val');\n *\n * @name doesNotChange\n * @param {Function} modifier function\n * @param {Object} object or getter function\n * @param {String} property name _optional_\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotChange = function (fn, obj, prop, msg) {\n if (arguments.length === 3 && typeof obj === 'function') {\n msg = prop;\n prop = null;\n }\n\n return new Assertion(fn, msg, assert.doesNotChange, true)\n .to.not.change(obj, prop);\n }\n\n /**\n * ### .changesButNotBy(function, object, property, delta, [message])\n *\n * Asserts that a function does not change the value of a property or of a function's return value by an amount (delta)\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val += 10 };\n * assert.changesButNotBy(fn, obj, 'val', 5);\n *\n * @name changesButNotBy\n * @param {Function} modifier function\n * @param {Object} object or getter function\n * @param {String} property name _optional_\n * @param {Number} change amount (delta)\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.changesButNotBy = function (fn, obj, prop, delta, msg) {\n if (arguments.length === 4 && typeof obj === 'function') {\n var tmpMsg = delta;\n delta = prop;\n msg = tmpMsg;\n } else if (arguments.length === 3) {\n delta = prop;\n prop = null;\n }\n\n new Assertion(fn, msg, assert.changesButNotBy, true)\n .to.change(obj, prop).but.not.by(delta);\n }\n\n /**\n * ### .increases(function, object, property, [message])\n *\n * Asserts that a function increases a numeric object property.\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 13 };\n * assert.increases(fn, obj, 'val');\n *\n * @name increases\n * @param {Function} modifier function\n * @param {Object} object or getter function\n * @param {String} property name _optional_\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.increases = function (fn, obj, prop, msg) {\n if (arguments.length === 3 && typeof obj === 'function') {\n msg = prop;\n prop = null;\n }\n\n return new Assertion(fn, msg, assert.increases, true)\n .to.increase(obj, prop);\n }\n\n /**\n * ### .increasesBy(function, object, property, delta, [message])\n *\n * Asserts that a function increases a numeric object property or a function's return value by an amount (delta).\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val += 10 };\n * assert.increasesBy(fn, obj, 'val', 10);\n *\n * @name increasesBy\n * @param {Function} modifier function\n * @param {Object} object or getter function\n * @param {String} property name _optional_\n * @param {Number} change amount (delta)\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.increasesBy = function (fn, obj, prop, delta, msg) {\n if (arguments.length === 4 && typeof obj === 'function') {\n var tmpMsg = delta;\n delta = prop;\n msg = tmpMsg;\n } else if (arguments.length === 3) {\n delta = prop;\n prop = null;\n }\n\n new Assertion(fn, msg, assert.increasesBy, true)\n .to.increase(obj, prop).by(delta);\n }\n\n /**\n * ### .doesNotIncrease(function, object, property, [message])\n *\n * Asserts that a function does not increase a numeric object property.\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 8 };\n * assert.doesNotIncrease(fn, obj, 'val');\n *\n * @name doesNotIncrease\n * @param {Function} modifier function\n * @param {Object} object or getter function\n * @param {String} property name _optional_\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotIncrease = function (fn, obj, prop, msg) {\n if (arguments.length === 3 && typeof obj === 'function') {\n msg = prop;\n prop = null;\n }\n\n return new Assertion(fn, msg, assert.doesNotIncrease, true)\n .to.not.increase(obj, prop);\n }\n\n /**\n * ### .increasesButNotBy(function, object, property, [message])\n *\n * Asserts that a function does not increase a numeric object property or function's return value by an amount (delta).\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 15 };\n * assert.increasesButNotBy(fn, obj, 'val', 10);\n *\n * @name increasesButNotBy\n * @param {Function} modifier function\n * @param {Object} object or getter function\n * @param {String} property name _optional_\n * @param {Number} change amount (delta)\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.increasesButNotBy = function (fn, obj, prop, delta, msg) {\n if (arguments.length === 4 && typeof obj === 'function') {\n var tmpMsg = delta;\n delta = prop;\n msg = tmpMsg;\n } else if (arguments.length === 3) {\n delta = prop;\n prop = null;\n }\n\n new Assertion(fn, msg, assert.increasesButNotBy, true)\n .to.increase(obj, prop).but.not.by(delta);\n }\n\n /**\n * ### .decreases(function, object, property, [message])\n *\n * Asserts that a function decreases a numeric object property.\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 5 };\n * assert.decreases(fn, obj, 'val');\n *\n * @name decreases\n * @param {Function} modifier function\n * @param {Object} object or getter function\n * @param {String} property name _optional_\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.decreases = function (fn, obj, prop, msg) {\n if (arguments.length === 3 && typeof obj === 'function') {\n msg = prop;\n prop = null;\n }\n\n return new Assertion(fn, msg, assert.decreases, true)\n .to.decrease(obj, prop);\n }\n\n /**\n * ### .decreasesBy(function, object, property, delta, [message])\n *\n * Asserts that a function decreases a numeric object property or a function's return value by an amount (delta)\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val -= 5 };\n * assert.decreasesBy(fn, obj, 'val', 5);\n *\n * @name decreasesBy\n * @param {Function} modifier function\n * @param {Object} object or getter function\n * @param {String} property name _optional_\n * @param {Number} change amount (delta)\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.decreasesBy = function (fn, obj, prop, delta, msg) {\n if (arguments.length === 4 && typeof obj === 'function') {\n var tmpMsg = delta;\n delta = prop;\n msg = tmpMsg;\n } else if (arguments.length === 3) {\n delta = prop;\n prop = null;\n }\n\n new Assertion(fn, msg, assert.decreasesBy, true)\n .to.decrease(obj, prop).by(delta);\n }\n\n /**\n * ### .doesNotDecrease(function, object, property, [message])\n *\n * Asserts that a function does not decreases a numeric object property.\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 15 };\n * assert.doesNotDecrease(fn, obj, 'val');\n *\n * @name doesNotDecrease\n * @param {Function} modifier function\n * @param {Object} object or getter function\n * @param {String} property name _optional_\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotDecrease = function (fn, obj, prop, msg) {\n if (arguments.length === 3 && typeof obj === 'function') {\n msg = prop;\n prop = null;\n }\n\n return new Assertion(fn, msg, assert.doesNotDecrease, true)\n .to.not.decrease(obj, prop);\n }\n\n /**\n * ### .doesNotDecreaseBy(function, object, property, delta, [message])\n *\n * Asserts that a function does not decreases a numeric object property or a function's return value by an amount (delta)\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 5 };\n * assert.doesNotDecreaseBy(fn, obj, 'val', 1);\n *\n * @name doesNotDecrease\n * @param {Function} modifier function\n * @param {Object} object or getter function\n * @param {String} property name _optional_\n * @param {Number} change amount (delta)\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotDecreaseBy = function (fn, obj, prop, delta, msg) {\n if (arguments.length === 4 && typeof obj === 'function') {\n var tmpMsg = delta;\n delta = prop;\n msg = tmpMsg;\n } else if (arguments.length === 3) {\n delta = prop;\n prop = null;\n }\n\n return new Assertion(fn, msg, assert.doesNotDecreaseBy, true)\n .to.not.decrease(obj, prop).by(delta);\n }\n\n /**\n * ### .decreasesButNotBy(function, object, property, delta, [message])\n *\n * Asserts that a function does not decreases a numeric object property or a function's return value by an amount (delta)\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 5 };\n * assert.decreasesButNotBy(fn, obj, 'val', 1);\n *\n * @name decreasesButNotBy\n * @param {Function} modifier function\n * @param {Object} object or getter function\n * @param {String} property name _optional_\n * @param {Number} change amount (delta)\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.decreasesButNotBy = function (fn, obj, prop, delta, msg) {\n if (arguments.length === 4 && typeof obj === 'function') {\n var tmpMsg = delta;\n delta = prop;\n msg = tmpMsg;\n } else if (arguments.length === 3) {\n delta = prop;\n prop = null;\n }\n\n new Assertion(fn, msg, assert.decreasesButNotBy, true)\n .to.decrease(obj, prop).but.not.by(delta);\n }\n\n /*!\n * ### .ifError(object)\n *\n * Asserts if value is not a false value, and throws if it is a true value.\n * This is added to allow for chai to be a drop-in replacement for Node's\n * assert class.\n *\n * var err = new Error('I am a custom error');\n * assert.ifError(err); // Rethrows err!\n *\n * @name ifError\n * @param {Object} object\n * @namespace Assert\n * @api public\n */\n\n assert.ifError = function (val) {\n if (val) {\n throw(val);\n }\n };\n\n /**\n * ### .isExtensible(object)\n *\n * Asserts that `object` is extensible (can have new properties added to it).\n *\n * assert.isExtensible({});\n *\n * @name isExtensible\n * @alias extensible\n * @param {Object} object\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.isExtensible = function (obj, msg) {\n new Assertion(obj, msg, assert.isExtensible, true).to.be.extensible;\n };\n\n /**\n * ### .isNotExtensible(object)\n *\n * Asserts that `object` is _not_ extensible.\n *\n * var nonExtensibleObject = Object.preventExtensions({});\n * var sealedObject = Object.seal({});\n * var frozenObject = Object.freeze({});\n *\n * assert.isNotExtensible(nonExtensibleObject);\n * assert.isNotExtensible(sealedObject);\n * assert.isNotExtensible(frozenObject);\n *\n * @name isNotExtensible\n * @alias notExtensible\n * @param {Object} object\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.isNotExtensible = function (obj, msg) {\n new Assertion(obj, msg, assert.isNotExtensible, true).to.not.be.extensible;\n };\n\n /**\n * ### .isSealed(object)\n *\n * Asserts that `object` is sealed (cannot have new properties added to it\n * and its existing properties cannot be removed).\n *\n * var sealedObject = Object.seal({});\n * var frozenObject = Object.seal({});\n *\n * assert.isSealed(sealedObject);\n * assert.isSealed(frozenObject);\n *\n * @name isSealed\n * @alias sealed\n * @param {Object} object\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.isSealed = function (obj, msg) {\n new Assertion(obj, msg, assert.isSealed, true).to.be.sealed;\n };\n\n /**\n * ### .isNotSealed(object)\n *\n * Asserts that `object` is _not_ sealed.\n *\n * assert.isNotSealed({});\n *\n * @name isNotSealed\n * @alias notSealed\n * @param {Object} object\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.isNotSealed = function (obj, msg) {\n new Assertion(obj, msg, assert.isNotSealed, true).to.not.be.sealed;\n };\n\n /**\n * ### .isFrozen(object)\n *\n * Asserts that `object` is frozen (cannot have new properties added to it\n * and its existing properties cannot be modified).\n *\n * var frozenObject = Object.freeze({});\n * assert.frozen(frozenObject);\n *\n * @name isFrozen\n * @alias frozen\n * @param {Object} object\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.isFrozen = function (obj, msg) {\n new Assertion(obj, msg, assert.isFrozen, true).to.be.frozen;\n };\n\n /**\n * ### .isNotFrozen(object)\n *\n * Asserts that `object` is _not_ frozen.\n *\n * assert.isNotFrozen({});\n *\n * @name isNotFrozen\n * @alias notFrozen\n * @param {Object} object\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.isNotFrozen = function (obj, msg) {\n new Assertion(obj, msg, assert.isNotFrozen, true).to.not.be.frozen;\n };\n\n /**\n * ### .isEmpty(target)\n *\n * Asserts that the target does not contain any values.\n * For arrays and strings, it checks the `length` property.\n * For `Map` and `Set` instances, it checks the `size` property.\n * For non-function objects, it gets the count of own\n * enumerable string keys.\n *\n * assert.isEmpty([]);\n * assert.isEmpty('');\n * assert.isEmpty(new Map);\n * assert.isEmpty({});\n *\n * @name isEmpty\n * @alias empty\n * @param {Object|Array|String|Map|Set} target\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.isEmpty = function(val, msg) {\n new Assertion(val, msg, assert.isEmpty, true).to.be.empty;\n };\n\n /**\n * ### .isNotEmpty(target)\n *\n * Asserts that the target contains values.\n * For arrays and strings, it checks the `length` property.\n * For `Map` and `Set` instances, it checks the `size` property.\n * For non-function objects, it gets the count of own\n * enumerable string keys.\n *\n * assert.isNotEmpty([1, 2]);\n * assert.isNotEmpty('34');\n * assert.isNotEmpty(new Set([5, 6]));\n * assert.isNotEmpty({ key: 7 });\n *\n * @name isNotEmpty\n * @alias notEmpty\n * @param {Object|Array|String|Map|Set} target\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.isNotEmpty = function(val, msg) {\n new Assertion(val, msg, assert.isNotEmpty, true).to.not.be.empty;\n };\n\n /*!\n * Aliases.\n */\n\n (function alias(name, as){\n assert[as] = assert[name];\n return alias;\n })\n ('isOk', 'ok')\n ('isNotOk', 'notOk')\n ('throws', 'throw')\n ('throws', 'Throw')\n ('isExtensible', 'extensible')\n ('isNotExtensible', 'notExtensible')\n ('isSealed', 'sealed')\n ('isNotSealed', 'notSealed')\n ('isFrozen', 'frozen')\n ('isNotFrozen', 'notFrozen')\n ('isEmpty', 'empty')\n ('isNotEmpty', 'notEmpty');\n};\n","/*!\n * chai\n * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\nvar used = [];\n\n/*!\n * Chai version\n */\n\nexports.version = '4.2.0';\n\n/*!\n * Assertion Error\n */\n\nexports.AssertionError = require('assertion-error');\n\n/*!\n * Utils for plugins (not exported)\n */\n\nvar util = require('./chai/utils');\n\n/**\n * # .use(function)\n *\n * Provides a way to extend the internals of Chai.\n *\n * @param {Function}\n * @returns {this} for chaining\n * @api public\n */\n\nexports.use = function (fn) {\n if (!~used.indexOf(fn)) {\n fn(exports, util);\n used.push(fn);\n }\n\n return exports;\n};\n\n/*!\n * Utility Functions\n */\n\nexports.util = util;\n\n/*!\n * Configuration\n */\n\nvar config = require('./chai/config');\nexports.config = config;\n\n/*!\n * Primary `Assertion` prototype\n */\n\nvar assertion = require('./chai/assertion');\nexports.use(assertion);\n\n/*!\n * Core Assertions\n */\n\nvar core = require('./chai/core/assertions');\nexports.use(core);\n\n/*!\n * Expect interface\n */\n\nvar expect = require('./chai/interface/expect');\nexports.use(expect);\n\n/*!\n * Should interface\n */\n\nvar should = require('./chai/interface/should');\nexports.use(should);\n\n/*!\n * Assert interface\n */\n\nvar assert = require('./chai/interface/assert');\nexports.use(assert);\n","module.exports = require('./lib/chai');\n","\"use strict\";\n/* eslint-disable no-invalid-this */\nlet checkError = require(\"check-error\");\n\nmodule.exports = (chai, utils) => {\n const Assertion = chai.Assertion;\n const assert = chai.assert;\n const proxify = utils.proxify;\n\n // If we are using a version of Chai that has checkError on it,\n // we want to use that version to be consistent. Otherwise, we use\n // what was passed to the factory.\n if (utils.checkError) {\n checkError = utils.checkError;\n }\n\n function isLegacyJQueryPromise(thenable) {\n // jQuery promises are Promises/A+-compatible since 3.0.0. jQuery 3.0.0 is also the first version\n // to define the catch method.\n return typeof thenable.catch !== \"function\" &&\n typeof thenable.always === \"function\" &&\n typeof thenable.done === \"function\" &&\n typeof thenable.fail === \"function\" &&\n typeof thenable.pipe === \"function\" &&\n typeof thenable.progress === \"function\" &&\n typeof thenable.state === \"function\";\n }\n\n function assertIsAboutPromise(assertion) {\n if (typeof assertion._obj.then !== \"function\") {\n throw new TypeError(utils.inspect(assertion._obj) + \" is not a thenable.\");\n }\n if (isLegacyJQueryPromise(assertion._obj)) {\n throw new TypeError(\"Chai as Promised is incompatible with thenables of jQuery<3.0.0, sorry! Please \" +\n \"upgrade jQuery or use another Promises/A+ compatible library (see \" +\n \"http://promisesaplus.com/).\");\n }\n }\n\n function proxifyIfSupported(assertion) {\n return proxify === undefined ? assertion : proxify(assertion);\n }\n\n function method(name, asserter) {\n utils.addMethod(Assertion.prototype, name, function () {\n assertIsAboutPromise(this);\n return asserter.apply(this, arguments);\n });\n }\n\n function property(name, asserter) {\n utils.addProperty(Assertion.prototype, name, function () {\n assertIsAboutPromise(this);\n return proxifyIfSupported(asserter.apply(this, arguments));\n });\n }\n\n function doNotify(promise, done) {\n promise.then(() => done(), done);\n }\n\n // These are for clarity and to bypass Chai refusing to allow `undefined` as actual when used with `assert`.\n function assertIfNegated(assertion, message, extra) {\n assertion.assert(true, null, message, extra.expected, extra.actual);\n }\n\n function assertIfNotNegated(assertion, message, extra) {\n assertion.assert(false, message, null, extra.expected, extra.actual);\n }\n\n function getBasePromise(assertion) {\n // We need to chain subsequent asserters on top of ones in the chain already (consider\n // `eventually.have.property(\"foo\").that.equals(\"bar\")`), only running them after the existing ones pass.\n // So the first base-promise is `assertion._obj`, but after that we use the assertions themselves, i.e.\n // previously derived promises, to chain off of.\n return typeof assertion.then === \"function\" ? assertion : assertion._obj;\n }\n\n function getReasonName(reason) {\n return reason instanceof Error ? reason.toString() : checkError.getConstructorName(reason);\n }\n\n // Grab these first, before we modify `Assertion.prototype`.\n\n const propertyNames = Object.getOwnPropertyNames(Assertion.prototype);\n\n const propertyDescs = {};\n for (const name of propertyNames) {\n propertyDescs[name] = Object.getOwnPropertyDescriptor(Assertion.prototype, name);\n }\n\n property(\"fulfilled\", function () {\n const derivedPromise = getBasePromise(this).then(\n value => {\n assertIfNegated(this,\n \"expected promise not to be fulfilled but it was fulfilled with #{act}\",\n { actual: value });\n return value;\n },\n reason => {\n assertIfNotNegated(this,\n \"expected promise to be fulfilled but it was rejected with #{act}\",\n { actual: getReasonName(reason) });\n return reason;\n }\n );\n\n module.exports.transferPromiseness(this, derivedPromise);\n return this;\n });\n\n property(\"rejected\", function () {\n const derivedPromise = getBasePromise(this).then(\n value => {\n assertIfNotNegated(this,\n \"expected promise to be rejected but it was fulfilled with #{act}\",\n { actual: value });\n return value;\n },\n reason => {\n assertIfNegated(this,\n \"expected promise not to be rejected but it was rejected with #{act}\",\n { actual: getReasonName(reason) });\n\n // Return the reason, transforming this into a fulfillment, to allow further assertions, e.g.\n // `promise.should.be.rejected.and.eventually.equal(\"reason\")`.\n return reason;\n }\n );\n\n module.exports.transferPromiseness(this, derivedPromise);\n return this;\n });\n\n method(\"rejectedWith\", function (errorLike, errMsgMatcher, message) {\n let errorLikeName = null;\n const negate = utils.flag(this, \"negate\") || false;\n\n // rejectedWith with that is called without arguments is\n // the same as a plain \".rejected\" use.\n if (errorLike === undefined && errMsgMatcher === undefined &&\n message === undefined) {\n /* eslint-disable no-unused-expressions */\n return this.rejected;\n /* eslint-enable no-unused-expressions */\n }\n\n if (message !== undefined) {\n utils.flag(this, \"message\", message);\n }\n\n if (errorLike instanceof RegExp || typeof errorLike === \"string\") {\n errMsgMatcher = errorLike;\n errorLike = null;\n } else if (errorLike && errorLike instanceof Error) {\n errorLikeName = errorLike.toString();\n } else if (typeof errorLike === \"function\") {\n errorLikeName = checkError.getConstructorName(errorLike);\n } else {\n errorLike = null;\n }\n const everyArgIsDefined = Boolean(errorLike && errMsgMatcher);\n\n let matcherRelation = \"including\";\n if (errMsgMatcher instanceof RegExp) {\n matcherRelation = \"matching\";\n }\n\n const derivedPromise = getBasePromise(this).then(\n value => {\n let assertionMessage = null;\n let expected = null;\n\n if (errorLike) {\n assertionMessage = \"expected promise to be rejected with #{exp} but it was fulfilled with #{act}\";\n expected = errorLikeName;\n } else if (errMsgMatcher) {\n assertionMessage = `expected promise to be rejected with an error ${matcherRelation} #{exp} but ` +\n `it was fulfilled with #{act}`;\n expected = errMsgMatcher;\n }\n\n assertIfNotNegated(this, assertionMessage, { expected, actual: value });\n return value;\n },\n reason => {\n const errorLikeCompatible = errorLike && (errorLike instanceof Error ?\n checkError.compatibleInstance(reason, errorLike) :\n checkError.compatibleConstructor(reason, errorLike));\n\n const errMsgMatcherCompatible = errMsgMatcher && checkError.compatibleMessage(reason, errMsgMatcher);\n\n const reasonName = getReasonName(reason);\n\n if (negate && everyArgIsDefined) {\n if (errorLikeCompatible && errMsgMatcherCompatible) {\n this.assert(true,\n null,\n \"expected promise not to be rejected with #{exp} but it was rejected \" +\n \"with #{act}\",\n errorLikeName,\n reasonName);\n }\n } else {\n if (errorLike) {\n this.assert(errorLikeCompatible,\n \"expected promise to be rejected with #{exp} but it was rejected with #{act}\",\n \"expected promise not to be rejected with #{exp} but it was rejected \" +\n \"with #{act}\",\n errorLikeName,\n reasonName);\n }\n\n if (errMsgMatcher) {\n this.assert(errMsgMatcherCompatible,\n `expected promise to be rejected with an error ${matcherRelation} #{exp} but got ` +\n `#{act}`,\n `expected promise not to be rejected with an error ${matcherRelation} #{exp}`,\n errMsgMatcher,\n checkError.getMessage(reason));\n }\n }\n\n return reason;\n }\n );\n\n module.exports.transferPromiseness(this, derivedPromise);\n return this;\n });\n\n property(\"eventually\", function () {\n utils.flag(this, \"eventually\", true);\n return this;\n });\n\n method(\"notify\", function (done) {\n doNotify(getBasePromise(this), done);\n return this;\n });\n\n method(\"become\", function (value, message) {\n return this.eventually.deep.equal(value, message);\n });\n\n // ### `eventually`\n\n // We need to be careful not to trigger any getters, thus `Object.getOwnPropertyDescriptor` usage.\n const methodNames = propertyNames.filter(name => {\n return name !== \"assert\" && typeof propertyDescs[name].value === \"function\";\n });\n\n methodNames.forEach(methodName => {\n Assertion.overwriteMethod(methodName, originalMethod => function () {\n return doAsserterAsyncAndAddThen(originalMethod, this, arguments);\n });\n });\n\n const getterNames = propertyNames.filter(name => {\n return name !== \"_obj\" && typeof propertyDescs[name].get === \"function\";\n });\n\n getterNames.forEach(getterName => {\n // Chainable methods are things like `an`, which can work both for `.should.be.an.instanceOf` and as\n // `should.be.an(\"object\")`. We need to handle those specially.\n const isChainableMethod = Assertion.prototype.__methods.hasOwnProperty(getterName);\n\n if (isChainableMethod) {\n Assertion.overwriteChainableMethod(\n getterName,\n originalMethod => function () {\n return doAsserterAsyncAndAddThen(originalMethod, this, arguments);\n },\n originalGetter => function () {\n return doAsserterAsyncAndAddThen(originalGetter, this);\n }\n );\n } else {\n Assertion.overwriteProperty(getterName, originalGetter => function () {\n return proxifyIfSupported(doAsserterAsyncAndAddThen(originalGetter, this));\n });\n }\n });\n\n function doAsserterAsyncAndAddThen(asserter, assertion, args) {\n // Since we're intercepting all methods/properties, we need to just pass through if they don't want\n // `eventually`, or if we've already fulfilled the promise (see below).\n if (!utils.flag(assertion, \"eventually\")) {\n asserter.apply(assertion, args);\n return assertion;\n }\n\n const derivedPromise = getBasePromise(assertion).then(value => {\n // Set up the environment for the asserter to actually run: `_obj` should be the fulfillment value, and\n // now that we have the value, we're no longer in \"eventually\" mode, so we won't run any of this code,\n // just the base Chai code that we get to via the short-circuit above.\n assertion._obj = value;\n utils.flag(assertion, \"eventually\", false);\n\n return args ? module.exports.transformAsserterArgs(args) : args;\n }).then(newArgs => {\n asserter.apply(assertion, newArgs);\n\n // Because asserters, for example `property`, can change the value of `_obj` (i.e. change the \"object\"\n // flag), we need to communicate this value change to subsequent chained asserters. Since we build a\n // promise chain paralleling the asserter chain, we can use it to communicate such changes.\n return assertion._obj;\n });\n\n module.exports.transferPromiseness(assertion, derivedPromise);\n return assertion;\n }\n\n // ### Now use the `Assertion` framework to build an `assert` interface.\n const originalAssertMethods = Object.getOwnPropertyNames(assert).filter(propName => {\n return typeof assert[propName] === \"function\";\n });\n\n assert.isFulfilled = (promise, message) => (new Assertion(promise, message)).to.be.fulfilled;\n\n assert.isRejected = (promise, errorLike, errMsgMatcher, message) => {\n const assertion = new Assertion(promise, message);\n return assertion.to.be.rejectedWith(errorLike, errMsgMatcher, message);\n };\n\n assert.becomes = (promise, value, message) => assert.eventually.deepEqual(promise, value, message);\n\n assert.doesNotBecome = (promise, value, message) => assert.eventually.notDeepEqual(promise, value, message);\n\n assert.eventually = {};\n originalAssertMethods.forEach(assertMethodName => {\n assert.eventually[assertMethodName] = function (promise) {\n const otherArgs = Array.prototype.slice.call(arguments, 1);\n\n let customRejectionHandler;\n const message = arguments[assert[assertMethodName].length - 1];\n if (typeof message === \"string\") {\n customRejectionHandler = reason => {\n throw new chai.AssertionError(`${message}\\n\\nOriginal reason: ${utils.inspect(reason)}`);\n };\n }\n\n const returnedPromise = promise.then(\n fulfillmentValue => assert[assertMethodName].apply(assert, [fulfillmentValue].concat(otherArgs)),\n customRejectionHandler\n );\n\n returnedPromise.notify = done => {\n doNotify(returnedPromise, done);\n };\n\n return returnedPromise;\n };\n });\n};\n\nmodule.exports.transferPromiseness = (assertion, promise) => {\n assertion.then = promise.then.bind(promise);\n};\n\nmodule.exports.transformAsserterArgs = values => values;\n","(function (plugin) {\r\n if (typeof require === \"function\" && typeof exports === \"object\" && typeof module === \"object\") {\r\n // NodeJS\r\n module.exports = plugin;\r\n }\r\n else {\r\n if (typeof define === \"function\" && define.amd) {\r\n // AMD\r\n define(function () {\r\n return plugin;\r\n });\r\n }\r\n else {\r\n // Other environment (usually <script> tag): plug in to global chai instance directly.\r\n chai.use(plugin);\r\n }\r\n }\r\n}(function (chai, utils) {\r\n chai.string = chai.string || {};\r\n\r\n function isString(value) {\r\n return typeof value === 'string';\r\n }\r\n\r\n chai.string.startsWith = function (str, prefix) {\r\n if (!isString(str) || !isString(prefix)) {\r\n return false;\r\n }\r\n return str.indexOf(prefix) === 0;\r\n };\r\n\r\n chai.string.endsWith = function (str, suffix) {\r\n if (!isString(str) || !isString(suffix)) {\r\n return false;\r\n }\r\n return str.indexOf(suffix, str.length - suffix.length) !== -1;\r\n };\r\n\r\n chai.string.equalIgnoreCase = function (str1, str2) {\r\n if (!isString(str1) || !isString(str2)) {\r\n return false;\r\n }\r\n return str1.toLowerCase() === str2.toLowerCase();\r\n };\r\n\r\n chai.string.equalIgnoreSpaces = function (str1, str2) {\r\n if (!isString(str1) || !isString(str2)) {\r\n return false;\r\n }\r\n return str1.replace(/\\s/g, '') === str2.replace(/\\s/g, '');\r\n };\r\n\r\n chai.string.containIgnoreSpaces = function (str1, str2) {\r\n if (!isString(str1) || !isString(str2)) {\r\n return false;\r\n }\r\n return str1.replace(/\\s/g, '').indexOf(str2.replace(/\\s/g, '')) > -1;\r\n };\r\n\r\n chai.string.containIgnoreCase = function (str1, str2) {\r\n if (!isString(str1) || !isString(str2)) {\r\n return false;\r\n }\r\n return str1.toLowerCase().indexOf(str2.toLowerCase()) > -1;\r\n }\r\n\r\n chai.string.singleLine = function (str) {\r\n if (!isString(str)) {\r\n return false;\r\n }\r\n return str.trim().indexOf(\"\\n\") === -1;\r\n };\r\n\r\n chai.string.reverseOf = function (str, reversed) {\r\n if (!isString(str) || !isString(reversed)) {\r\n return false;\r\n }\r\n return str.split('').reverse().join('') === reversed;\r\n };\r\n\r\n chai.string.palindrome = function (str) {\r\n if (!isString(str)) {\r\n return false;\r\n }\r\n var len = str.length;\r\n for (var i = 0; i < Math.floor(len / 2); i++) {\r\n if (str[i] !== str[len - 1 - i]) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n };\r\n\r\n chai.string.entriesCount = function (str, substr, count) {\r\n var matches = 0;\r\n if (isString(str) && isString(substr)) {\r\n var i = 0;\r\n var len = str.length;\r\n while (i < len) {\r\n var indx = str.indexOf(substr, i);\r\n if (indx === -1) {\r\n break;\r\n }\r\n else {\r\n matches++;\r\n i = indx + 1;\r\n }\r\n }\r\n }\r\n return matches === count;\r\n };\r\n\r\n chai.string.indexOf = function (str, substr, index) {\r\n var indx = !isString(str) || !isString(substr) ? -1 : str.indexOf(substr);\r\n return indx === index;\r\n };\r\n\r\n var startsWithMethodWrapper = function (expected) {\r\n var actual = this._obj;\r\n\r\n return this.assert(\r\n chai.string.startsWith(actual, expected),\r\n 'expected ' + this._obj + ' to start with ' + expected,\r\n 'expected ' + this._obj + ' not to start with ' + expected\r\n );\r\n };\r\n\r\n chai.Assertion.addChainableMethod('startsWith', startsWithMethodWrapper);\r\n chai.Assertion.addChainableMethod('startWith', startsWithMethodWrapper);\r\n\r\n var endsWithMethodWrapper = function (expected) {\r\n var actual = this._obj;\r\n\r\n return this.assert(\r\n chai.string.endsWith(actual, expected),\r\n 'expected ' + this._obj + ' to end with ' + expected,\r\n 'expected ' + this._obj + ' not to end with ' + expected\r\n );\r\n };\r\n\r\n chai.Assertion.addChainableMethod('endsWith', endsWithMethodWrapper);\r\n chai.Assertion.addChainableMethod('endWith', endsWithMethodWrapper);\r\n\r\n chai.Assertion.addChainableMethod('equalIgnoreCase', function (expected) {\r\n var actual = this._obj;\r\n\r\n return this.assert(\r\n chai.string.equalIgnoreCase(actual, expected),\r\n 'expected ' + this._obj + ' to equal ' + expected + ' ignoring case',\r\n 'expected ' + this._obj + ' not to equal ' + expected + ' ignoring case'\r\n );\r\n });\r\n\r\n chai.Assertion.addChainableMethod('equalIgnoreSpaces', function (expected) {\r\n var actual = this._obj;\r\n\r\n return this.assert(\r\n chai.string.equalIgnoreSpaces(actual, expected),\r\n 'expected ' + this._obj + ' to equal ' + expected + ' ignoring spaces',\r\n 'expected ' + this._obj + ' not to equal ' + expected + ' ignoring spaces'\r\n );\r\n });\r\n\r\n chai.Assertion.addChainableMethod('containIgnoreSpaces', function (expected) {\r\n var actual = this._obj;\r\n\r\n return this.assert(\r\n chai.string.containIgnoreSpaces(actual, expected),\r\n 'expected ' + this._obj + ' to contain ' + expected + ' ignoring spaces',\r\n 'expected ' + this._obj + ' not to contain ' + expected + ' ignoring spaces'\r\n );\r\n });\r\n\r\n chai.Assertion.addChainableMethod('containIgnoreCase', function (expected) {\r\n var actual = this._obj;\r\n\r\n return this.assert(\r\n chai.string.containIgnoreCase(actual, expected),\r\n 'expected ' + this._obj + ' to contain ' + expected + ' ignoring case',\r\n 'expected ' + this._obj + ' not to contain ' + expected + ' ignoring case'\r\n );\r\n });\r\n\r\n chai.Assertion.addChainableMethod('singleLine', function () {\r\n var actual = this._obj;\r\n\r\n return this.assert(\r\n chai.string.singleLine(actual),\r\n 'expected ' + this._obj + ' to be a single line',\r\n 'expected ' + this._obj + ' not to be a single line'\r\n );\r\n });\r\n\r\n chai.Assertion.addChainableMethod('reverseOf', function (expected) {\r\n var actual = this._obj;\r\n\r\n return this.assert(\r\n chai.string.reverseOf(actual, expected),\r\n 'expected ' + this._obj + ' to be the reverse of ' + expected,\r\n 'expected ' + this._obj + ' not to be the reverse of ' + expected\r\n );\r\n });\r\n\r\n chai.Assertion.addChainableMethod('palindrome', function () {\r\n var actual = this._obj;\r\n\r\n return this.assert(\r\n chai.string.palindrome(actual),\r\n 'expected ' + this._obj + ' to be a palindrome',\r\n 'expected ' + this._obj + ' not to be a palindrome'\r\n );\r\n });\r\n\r\n chai.Assertion.addChainableMethod('entriesCount', function (substr, expected) {\r\n var actual = this._obj;\r\n\r\n return this.assert(\r\n chai.string.entriesCount(actual, substr, expected),\r\n 'expected ' + this._obj + ' to have ' + substr + ' ' + expected + ' time(s)',\r\n 'expected ' + this._obj + ' to not have ' + substr + ' ' + expected + ' time(s)'\r\n );\r\n });\r\n\r\n chai.Assertion.addChainableMethod('indexOf', function (substr, index) {\r\n var actual = this._obj;\r\n\r\n return this.assert(\r\n chai.string.indexOf(actual, substr, index),\r\n 'expected ' + this._obj + ' to have ' + substr + ' on index ' + index,\r\n 'expected ' + this._obj + ' to not have ' + substr + ' on index ' + index\r\n );\r\n });\r\n\r\n // Asserts\r\n var assert = chai.assert;\r\n\r\n assert.startsWith = function (val, exp, msg) {\r\n new chai.Assertion(val, msg).to.startsWith(exp);\r\n };\r\n\r\n assert.notStartsWith = function (val, exp, msg) {\r\n new chai.Assertion(val, msg).to.not.startsWith(exp);\r\n };\r\n\r\n assert.endsWith = function (val, exp, msg) {\r\n new chai.Assertion(val, msg).to.endsWith(exp);\r\n };\r\n\r\n assert.notEndsWith = function (val, exp, msg) {\r\n new chai.Assertion(val, msg).to.not.endsWith(exp);\r\n };\r\n\r\n assert.equalIgnoreCase = function (val, exp, msg) {\r\n new chai.Assertion(val, msg).to.be.equalIgnoreCase(exp);\r\n };\r\n\r\n assert.notEqualIgnoreCase = function (val, exp, msg) {\r\n new chai.Assertion(val, msg).to.not.be.equalIgnoreCase(exp);\r\n };\r\n\r\n assert.equalIgnoreSpaces = function (val, exp, msg) {\r\n new chai.Assertion(val, msg).to.be.equalIgnoreSpaces(exp);\r\n };\r\n\r\n assert.notEqualIgnoreSpaces = function (val, exp, msg) {\r\n new chai.Assertion(val, msg).to.not.be.equalIgnoreSpaces(exp);\r\n };\r\n\r\n assert.containIgnoreSpaces = function (val, exp, msg) {\r\n new chai.Assertion(val, msg).to.be.containIgnoreSpaces(exp);\r\n };\r\n\r\n assert.notContainIgnoreSpaces = function (val, exp, msg) {\r\n new chai.Assertion(val, msg).to.not.be.containIgnoreSpaces(exp);\r\n };\r\n\r\n assert.containIgnoreCase = function (val, exp, msg) {\r\n new chai.Assertion(val, msg).to.be.containIgnoreCase(exp);\r\n };\r\n\r\n assert.notContainIgnoreCase = function (val, exp, msg) {\r\n new chai.Assertion(val, msg).to.not.be.containIgnoreCase(exp);\r\n };\r\n\r\n assert.singleLine = function (val, exp, msg) {\r\n new chai.Assertion(val, msg).to.be.singleLine();\r\n };\r\n\r\n assert.notSingleLine = function (val, exp, msg) {\r\n new chai.Assertion(val, msg).to.not.be.singleLine();\r\n };\r\n\r\n assert.reverseOf = function (val, exp, msg) {\r\n new chai.Assertion(val, msg).to.be.reverseOf(exp);\r\n };\r\n\r\n assert.notReverseOf = function (val, exp, msg) {\r\n new chai.Assertion(val, msg).to.not.be.reverseOf(exp);\r\n };\r\n\r\n assert.palindrome = function (val, exp, msg) {\r\n new chai.Assertion(val, msg).to.be.palindrome();\r\n };\r\n\r\n assert.notPalindrome = function (val, exp, msg) {\r\n new chai.Assertion(val, msg).to.not.be.palindrome();\r\n };\r\n\r\n assert.entriesCount = function (str, substr, count, msg) {\r\n new chai.Assertion(str, msg).to.have.entriesCount(substr, count);\r\n };\r\n\r\n assert.indexOf = function (str, substr, index, msg) {\r\n new chai.Assertion(str, msg).to.have.indexOf(substr, index);\r\n };\r\n\r\n}));\r\n","import * as plugins from './beautybrowser.plugins';\nimport { ILogDestination, ILogPackage } from '@pushrocks/smartlog-interfaces';\n\n\nexport class SmartlogDestinationDevtools implements ILogDestination {\n public handleLog(logPackageArg: ILogPackage) {\n this.logInBrowser(logPackageArg);\n }\n\n private logInBrowser(logPackage: ILogPackage) {\n switch (logPackage.level) {\n case 'error':\n console.log(\n `%c Error: %c ${logPackage.message}`,\n 'background:#000000;color:#800000;',\n 'color:#000000;'\n );\n break;\n case 'info':\n console.log(\n `%c Info: %c ${logPackage.message}`,\n 'background:#EC407A;color:#ffffff;',\n 'color:#EC407A;'\n );\n break;\n case 'ok':\n console.log(\n `%c OK: %c ${logPackage.message}`,\n 'background:#000000;color:#8BC34A;',\n 'color:#000000;'\n );\n break;\n case 'success':\n console.log(\n `%c Success: %c ${logPackage.message}`,\n 'background:#8BC34A;color:#ffffff;',\n 'color:#8BC34A;'\n );\n break;\n case 'warn':\n console.log(\n `%c Warn: %c ${logPackage.message}`,\n 'background:#000000;color:#FB8C00;',\n 'color:#000000;'\n );\n break;\n case 'note':\n console.log(\n `%c Note: %c ${logPackage.message}`,\n 'background:#42A5F5;color:#ffffff',\n 'color:#42A5F5;'\n );\n break;\n default:\n console.log(`unknown logType for \"${logPackage.message}\"`);\n break;\n }\n }\n}\n","(function () {\n 'use strict';\n\n /*\n * Wrap the numbers 0 to 256 in their foreground or background terminal escape code\n */\n var fgcodes = Array.apply(null, new Array(256)).map(function (_, i) { return '\\x1b[38;5;' + i + 'm'; });\n var bgcodes = Array.apply(null, new Array(256)).map(function (_, i) { return '\\x1b[48;5;' + i + 'm'; });\n\n /*\n * Slice the foreground and background codes in their respective sections\n */\n var fg = module.exports.fg = {\n codes: fgcodes,\n standard: fgcodes.slice(0, 8),\n bright: fgcodes.slice(8, 16),\n rgb: fgcodes.slice(16, 232),\n grayscale: fgcodes.slice(232, 256),\n // get a red-green-blue value by index, in the ranged 0 to 6\n getRgb: function (r, g, b) { return fg.rgb[36*r + 6*g + b]; }\n };\n\n var bg = module.exports.bg = {\n codes: bgcodes,\n standard: bgcodes.slice(0, 8),\n bright: bgcodes.slice(8, 16),\n rgb: bgcodes.slice(16, 232),\n grayscale: bgcodes.slice(232, 256),\n // get a red-green-blue value by index, in the ranged 0 to 6\n getRgb: function (r, g, b) { return bg.rgb[36*r + 6*g + b]; }\n };\n\n var reset = module.exports.reset = '\\x1b[0m';\n\n}());\n","module.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.readUInt8 === 'function';\n}","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n // Allow for deprecating things in the process of starting up.\n if (isUndefined(global.process)) {\n return function() {\n return exports.deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n if (process.noDeprecation === true) {\n return fn;\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnviron;\nexports.debuglog = function(set) {\n if (isUndefined(debugEnviron))\n debugEnviron = process.env.NODE_DEBUG || '';\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (new RegExp('\\\\b' + set + '\\\\b', 'i').test(debugEnviron)) {\n var pid = process.pid;\n debugs[set] = function() {\n var msg = exports.format.apply(exports, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n exports._extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').substr(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('./support/isBuffer');\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = require('inherits');\n\nexports._extend = function(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n","import * as process from 'process';\n\n/**\n * easy high resolution time measurement\n */\nexport class HrtMeasurement {\n nanoSeconds: number = null;\n milliSeconds: number = null;\n private _hrTimeStart = null;\n private _hrTimeStopDiff = null;\n private _started: boolean = false;\n\n /**\n * start the measurement\n */\n start() {\n this._started = true;\n this._hrTimeStart = process.hrtime();\n }\n\n /**\n * stop the measurement\n */\n stop() {\n if (this._started === false) {\n console.log(\"Hasn't started yet\");\n return;\n }\n this._hrTimeStopDiff = process.hrtime(this._hrTimeStart);\n this.nanoSeconds = this._hrTimeStopDiff[0] * 1e9 + this._hrTimeStopDiff[1];\n this.milliSeconds = this.nanoSeconds / 1000000;\n return this;\n }\n\n /**\n * reset the measurement\n */\n reset() {\n this.nanoSeconds = null;\n this.milliSeconds = null;\n this._hrTimeStart = null;\n this._hrTimeStopDiff = null;\n this._started = false;\n }\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes, empty elements, or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = parts.length - 1; i >= 0; i--) {\n var last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nvar splitPathRe =\n /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;\nvar splitPath = function(filename) {\n return splitPathRe.exec(filename).slice(1);\n};\n\n// path.resolve([from ...], to)\n// posix version\nexports.resolve = function() {\n var resolvedPath = '',\n resolvedAbsolute = false;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path = (i >= 0) ? arguments[i] : process.cwd();\n\n // Skip empty and invalid entries\n if (typeof path !== 'string') {\n throw new TypeError('Arguments to path.resolve must be strings');\n } else if (!path) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {\n return !!p;\n }), !resolvedAbsolute).join('/');\n\n return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nexports.normalize = function(path) {\n var isAbsolute = exports.isAbsolute(path),\n trailingSlash = substr(path, -1) === '/';\n\n // Normalize the path\n path = normalizeArray(filter(path.split('/'), function(p) {\n return !!p;\n }), !isAbsolute).join('/');\n\n if (!path && !isAbsolute) {\n path = '.';\n }\n if (path && trailingSlash) {\n path += '/';\n }\n\n return (isAbsolute ? '/' : '') + path;\n};\n\n// posix version\nexports.isAbsolute = function(path) {\n return path.charAt(0) === '/';\n};\n\n// posix version\nexports.join = function() {\n var paths = Array.prototype.slice.call(arguments, 0);\n return exports.normalize(filter(paths, function(p, index) {\n if (typeof p !== 'string') {\n throw new TypeError('Arguments to path.join must be strings');\n }\n return p;\n }).join('/'));\n};\n\n\n// path.relative(from, to)\n// posix version\nexports.relative = function(from, to) {\n from = exports.resolve(from).substr(1);\n to = exports.resolve(to).substr(1);\n\n function trim(arr) {\n var start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') break;\n }\n\n var end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') break;\n }\n\n if (start > end) return [];\n return arr.slice(start, end - start + 1);\n }\n\n var fromParts = trim(from.split('/'));\n var toParts = trim(to.split('/'));\n\n var length = Math.min(fromParts.length, toParts.length);\n var samePartsLength = length;\n for (var i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n var outputParts = [];\n for (var i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n};\n\nexports.sep = '/';\nexports.delimiter = ':';\n\nexports.dirname = function(path) {\n var result = splitPath(path),\n root = result[0],\n dir = result[1];\n\n if (!root && !dir) {\n // No dirname whatsoever\n return '.';\n }\n\n if (dir) {\n // It has a dirname, strip trailing slash\n dir = dir.substr(0, dir.length - 1);\n }\n\n return root + dir;\n};\n\n\nexports.basename = function(path, ext) {\n var f = splitPath(path)[2];\n // TODO: make this comparison case-insensitive on windows?\n if (ext && f.substr(-1 * ext.length) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n};\n\n\nexports.extname = function(path) {\n return splitPath(path)[3];\n};\n\nfunction filter (xs, f) {\n if (xs.filter) return xs.filter(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n if (f(xs[i], i, xs)) res.push(xs[i]);\n }\n return res;\n}\n\n// String.prototype.substr - negative index don't work in IE8\nvar substr = 'ab'.substr(-1) === 'b'\n ? function (str, start, len) { return str.substr(start, len) }\n : function (str, start, len) {\n if (start < 0) start = str.length + start;\n return str.substr(start, len);\n }\n;\n","\n/**\n * Module dependencies.\n */\n\nvar fs = require('fs')\n , path = require('path')\n , join = path.join\n , dirname = path.dirname\n , exists = ((fs.accessSync && function (path) { try { fs.accessSync(path); } catch (e) { return false; } return true; })\n || fs.existsSync || path.existsSync)\n , defaults = {\n arrow: process.env.NODE_BINDINGS_ARROW || ' → '\n , compiled: process.env.NODE_BINDINGS_COMPILED_DIR || 'compiled'\n , platform: process.platform\n , arch: process.arch\n , version: process.versions.node\n , bindings: 'bindings.node'\n , try: [\n // node-gyp's linked version in the \"build\" dir\n [ 'module_root', 'build', 'bindings' ]\n // node-waf and gyp_addon (a.k.a node-gyp)\n , [ 'module_root', 'build', 'Debug', 'bindings' ]\n , [ 'module_root', 'build', 'Release', 'bindings' ]\n // Debug files, for development (legacy behavior, remove for node v0.9)\n , [ 'module_root', 'out', 'Debug', 'bindings' ]\n , [ 'module_root', 'Debug', 'bindings' ]\n // Release files, but manually compiled (legacy behavior, remove for node v0.9)\n , [ 'module_root', 'out', 'Release', 'bindings' ]\n , [ 'module_root', 'Release', 'bindings' ]\n // Legacy from node-waf, node <= 0.4.x\n , [ 'module_root', 'build', 'default', 'bindings' ]\n // Production \"Release\" buildtype binary (meh...)\n , [ 'module_root', 'compiled', 'version', 'platform', 'arch', 'bindings' ]\n ]\n }\n\n/**\n * The main `bindings()` function loads the compiled bindings for a given module.\n * It uses V8's Error API to determine the parent filename that this function is\n * being invoked from, which is then used to find the root directory.\n */\n\nfunction bindings (opts) {\n\n // Argument surgery\n if (typeof opts == 'string') {\n opts = { bindings: opts }\n } else if (!opts) {\n opts = {}\n }\n\n // maps `defaults` onto `opts` object\n Object.keys(defaults).map(function(i) {\n if (!(i in opts)) opts[i] = defaults[i];\n });\n\n // Get the module root\n if (!opts.module_root) {\n opts.module_root = exports.getRoot(exports.getFileName())\n }\n\n // Ensure the given bindings name ends with .node\n if (path.extname(opts.bindings) != '.node') {\n opts.bindings += '.node'\n }\n\n var tries = []\n , i = 0\n , l = opts.try.length\n , n\n , b\n , err\n\n for (; i<l; i++) {\n n = join.apply(null, opts.try[i].map(function (p) {\n return opts[p] || p\n }))\n tries.push(n)\n try {\n b = opts.path ? require.resolve(n) : require(n)\n if (!opts.path) {\n b.path = n\n }\n return b\n } catch (e) {\n if (!/not find/i.test(e.message)) {\n throw e\n }\n }\n }\n\n err = new Error('Could not locate the bindings file. Tried:\\n'\n + tries.map(function (a) { return opts.arrow + a }).join('\\n'))\n err.tries = tries\n throw err\n}\nmodule.exports = exports = bindings\n\n\n/**\n * Gets the filename of the JavaScript file that invokes this function.\n * Used to help find the root directory of a module.\n * Optionally accepts an filename argument to skip when searching for the invoking filename\n */\n\nexports.getFileName = function getFileName (calling_file) {\n var origPST = Error.prepareStackTrace\n , origSTL = Error.stackTraceLimit\n , dummy = {}\n , fileName\n\n Error.stackTraceLimit = 10\n\n Error.prepareStackTrace = function (e, st) {\n for (var i=0, l=st.length; i<l; i++) {\n fileName = st[i].getFileName()\n if (fileName !== __filename) {\n if (calling_file) {\n if (fileName !== calling_file) {\n return\n }\n } else {\n return\n }\n }\n }\n }\n\n // run the 'prepareStackTrace' function above\n Error.captureStackTrace(dummy)\n dummy.stack\n\n // cleanup\n Error.prepareStackTrace = origPST\n Error.stackTraceLimit = origSTL\n\n return fileName\n}\n\n/**\n * Gets the root directory of a module, given an arbitrary filename\n * somewhere in the module tree. The \"root directory\" is the directory\n * containing the `package.json` file.\n *\n * In: /home/nate/node-native-module/lib/index.js\n * Out: /home/nate/node-native-module\n */\n\nexports.getRoot = function getRoot (file) {\n var dir = dirname(file)\n , prev\n while (true) {\n if (dir === '.') {\n // Avoids an infinite loop in rare cases, like the REPL\n dir = process.cwd()\n }\n if (exists(join(dir, 'package.json')) || exists(join(dir, 'node_modules'))) {\n // Found the 'package.json' file or 'node_modules' dir; we're done\n return dir\n }\n if (prev === dir) {\n // Got to the top\n throw new Error('Could not find module root given file: \"' + file\n + '\". Do you have a `package.json` file? ')\n }\n // Try the parent dir next\n prev = dir\n dir = join(dir, '..')\n }\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nfunction EventEmitter() {\n this._events = this._events || {};\n this._maxListeners = this._maxListeners || undefined;\n}\nmodule.exports = EventEmitter;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nEventEmitter.defaultMaxListeners = 10;\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function(n) {\n if (!isNumber(n) || n < 0 || isNaN(n))\n throw TypeError('n must be a positive number');\n this._maxListeners = n;\n return this;\n};\n\nEventEmitter.prototype.emit = function(type) {\n var er, handler, len, args, i, listeners;\n\n if (!this._events)\n this._events = {};\n\n // If there is no 'error' event listener then throw.\n if (type === 'error') {\n if (!this._events.error ||\n (isObject(this._events.error) && !this._events.error.length)) {\n er = arguments[1];\n if (er instanceof Error) {\n throw er; // Unhandled 'error' event\n } else {\n // At least give some kind of context to the user\n var err = new Error('Uncaught, unspecified \"error\" event. (' + er + ')');\n err.context = er;\n throw err;\n }\n }\n }\n\n handler = this._events[type];\n\n if (isUndefined(handler))\n return false;\n\n if (isFunction(handler)) {\n switch (arguments.length) {\n // fast cases\n case 1:\n handler.call(this);\n break;\n case 2:\n handler.call(this, arguments[1]);\n break;\n case 3:\n handler.call(this, arguments[1], arguments[2]);\n break;\n // slower\n default:\n args = Array.prototype.slice.call(arguments, 1);\n handler.apply(this, args);\n }\n } else if (isObject(handler)) {\n args = Array.prototype.slice.call(arguments, 1);\n listeners = handler.slice();\n len = listeners.length;\n for (i = 0; i < len; i++)\n listeners[i].apply(this, args);\n }\n\n return true;\n};\n\nEventEmitter.prototype.addListener = function(type, listener) {\n var m;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events)\n this._events = {};\n\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (this._events.newListener)\n this.emit('newListener', type,\n isFunction(listener.listener) ?\n listener.listener : listener);\n\n if (!this._events[type])\n // Optimize the case of one listener. Don't need the extra array object.\n this._events[type] = listener;\n else if (isObject(this._events[type]))\n // If we've already got an array, just append.\n this._events[type].push(listener);\n else\n // Adding the second element, need to change to array.\n this._events[type] = [this._events[type], listener];\n\n // Check for listener leak\n if (isObject(this._events[type]) && !this._events[type].warned) {\n if (!isUndefined(this._maxListeners)) {\n m = this._maxListeners;\n } else {\n m = EventEmitter.defaultMaxListeners;\n }\n\n if (m && m > 0 && this._events[type].length > m) {\n this._events[type].warned = true;\n console.error('(node) warning: possible EventEmitter memory ' +\n 'leak detected. %d listeners added. ' +\n 'Use emitter.setMaxListeners() to increase limit.',\n this._events[type].length);\n if (typeof console.trace === 'function') {\n // not supported in IE 10\n console.trace();\n }\n }\n }\n\n return this;\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.once = function(type, listener) {\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n var fired = false;\n\n function g() {\n this.removeListener(type, g);\n\n if (!fired) {\n fired = true;\n listener.apply(this, arguments);\n }\n }\n\n g.listener = listener;\n this.on(type, g);\n\n return this;\n};\n\n// emits a 'removeListener' event iff the listener was removed\nEventEmitter.prototype.removeListener = function(type, listener) {\n var list, position, length, i;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events || !this._events[type])\n return this;\n\n list = this._events[type];\n length = list.length;\n position = -1;\n\n if (list === listener ||\n (isFunction(list.listener) && list.listener === listener)) {\n delete this._events[type];\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n\n } else if (isObject(list)) {\n for (i = length; i-- > 0;) {\n if (list[i] === listener ||\n (list[i].listener && list[i].listener === listener)) {\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (list.length === 1) {\n list.length = 0;\n delete this._events[type];\n } else {\n list.splice(position, 1);\n }\n\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n }\n\n return this;\n};\n\nEventEmitter.prototype.removeAllListeners = function(type) {\n var key, listeners;\n\n if (!this._events)\n return this;\n\n // not listening for removeListener, no need to emit\n if (!this._events.removeListener) {\n if (arguments.length === 0)\n this._events = {};\n else if (this._events[type])\n delete this._events[type];\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n for (key in this._events) {\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = {};\n return this;\n }\n\n listeners = this._events[type];\n\n if (isFunction(listeners)) {\n this.removeListener(type, listeners);\n } else if (listeners) {\n // LIFO order\n while (listeners.length)\n this.removeListener(type, listeners[listeners.length - 1]);\n }\n delete this._events[type];\n\n return this;\n};\n\nEventEmitter.prototype.listeners = function(type) {\n var ret;\n if (!this._events || !this._events[type])\n ret = [];\n else if (isFunction(this._events[type]))\n ret = [this._events[type]];\n else\n ret = this._events[type].slice();\n return ret;\n};\n\nEventEmitter.prototype.listenerCount = function(type) {\n if (this._events) {\n var evlistener = this._events[type];\n\n if (isFunction(evlistener))\n return 1;\n else if (evlistener)\n return evlistener.length;\n }\n return 0;\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n return emitter.listenerCount(type);\n};\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\n","const\nmagic = require('bindings')('memwatch'),\nevents = require('events');\n\nmodule.exports = new events.EventEmitter();\n\nmodule.exports.gc = magic.gc;\nmodule.exports.HeapDiff = magic.HeapDiff;\n\nmagic.upon_gc(function(event, data) {\n return module.exports.emit(event, data);\n});\n","module.exports = function (args, opts) {\n if (!opts) opts = {};\n \n var flags = { bools : {}, strings : {}, unknownFn: null };\n\n if (typeof opts['unknown'] === 'function') {\n flags.unknownFn = opts['unknown'];\n }\n\n if (typeof opts['boolean'] === 'boolean' && opts['boolean']) {\n flags.allBools = true;\n } else {\n [].concat(opts['boolean']).filter(Boolean).forEach(function (key) {\n flags.bools[key] = true;\n });\n }\n \n var aliases = {};\n Object.keys(opts.alias || {}).forEach(function (key) {\n aliases[key] = [].concat(opts.alias[key]);\n aliases[key].forEach(function (x) {\n aliases[x] = [key].concat(aliases[key].filter(function (y) {\n return x !== y;\n }));\n });\n });\n\n [].concat(opts.string).filter(Boolean).forEach(function (key) {\n flags.strings[key] = true;\n if (aliases[key]) {\n flags.strings[aliases[key]] = true;\n }\n });\n\n var defaults = opts['default'] || {};\n \n var argv = { _ : [] };\n Object.keys(flags.bools).forEach(function (key) {\n setArg(key, defaults[key] === undefined ? false : defaults[key]);\n });\n \n var notFlags = [];\n\n if (args.indexOf('--') !== -1) {\n notFlags = args.slice(args.indexOf('--')+1);\n args = args.slice(0, args.indexOf('--'));\n }\n\n function argDefined(key, arg) {\n return (flags.allBools && /^--[^=]+$/.test(arg)) ||\n flags.strings[key] || flags.bools[key] || aliases[key];\n }\n\n function setArg (key, val, arg) {\n if (arg && flags.unknownFn && !argDefined(key, arg)) {\n if (flags.unknownFn(arg) === false) return;\n }\n\n var value = !flags.strings[key] && isNumber(val)\n ? Number(val) : val\n ;\n setKey(argv, key.split('.'), value);\n \n (aliases[key] || []).forEach(function (x) {\n setKey(argv, x.split('.'), value);\n });\n }\n\n function setKey (obj, keys, value) {\n var o = obj;\n keys.slice(0,-1).forEach(function (key) {\n if (o[key] === undefined) o[key] = {};\n o = o[key];\n });\n\n var key = keys[keys.length - 1];\n if (o[key] === undefined || flags.bools[key] || typeof o[key] === 'boolean') {\n o[key] = value;\n }\n else if (Array.isArray(o[key])) {\n o[key].push(value);\n }\n else {\n o[key] = [ o[key], value ];\n }\n }\n \n function aliasIsBoolean(key) {\n return aliases[key].some(function (x) {\n return flags.bools[x];\n });\n }\n\n for (var i = 0; i < args.length; i++) {\n var arg = args[i];\n \n if (/^--.+=/.test(arg)) {\n // Using [\\s\\S] instead of . because js doesn't support the\n // 'dotall' regex modifier. See:\n // http://stackoverflow.com/a/1068308/13216\n var m = arg.match(/^--([^=]+)=([\\s\\S]*)$/);\n var key = m[1];\n var value = m[2];\n if (flags.bools[key]) {\n value = value !== 'false';\n }\n setArg(key, value, arg);\n }\n else if (/^--no-.+/.test(arg)) {\n var key = arg.match(/^--no-(.+)/)[1];\n setArg(key, false, arg);\n }\n else if (/^--.+/.test(arg)) {\n var key = arg.match(/^--(.+)/)[1];\n var next = args[i + 1];\n if (next !== undefined && !/^-/.test(next)\n && !flags.bools[key]\n && !flags.allBools\n && (aliases[key] ? !aliasIsBoolean(key) : true)) {\n setArg(key, next, arg);\n i++;\n }\n else if (/^(true|false)$/.test(next)) {\n setArg(key, next === 'true', arg);\n i++;\n }\n else {\n setArg(key, flags.strings[key] ? '' : true, arg);\n }\n }\n else if (/^-[^-]+/.test(arg)) {\n var letters = arg.slice(1,-1).split('');\n \n var broken = false;\n for (var j = 0; j < letters.length; j++) {\n var next = arg.slice(j+2);\n \n if (next === '-') {\n setArg(letters[j], next, arg)\n continue;\n }\n \n if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) {\n setArg(letters[j], next.split('=')[1], arg);\n broken = true;\n break;\n }\n \n if (/[A-Za-z]/.test(letters[j])\n && /-?\\d+(\\.\\d*)?(e-?\\d+)?$/.test(next)) {\n setArg(letters[j], next, arg);\n broken = true;\n break;\n }\n \n if (letters[j+1] && letters[j+1].match(/\\W/)) {\n setArg(letters[j], arg.slice(j+2), arg);\n broken = true;\n break;\n }\n else {\n setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg);\n }\n }\n \n var key = arg.slice(-1)[0];\n if (!broken && key !== '-') {\n if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1])\n && !flags.bools[key]\n && (aliases[key] ? !aliasIsBoolean(key) : true)) {\n setArg(key, args[i+1], arg);\n i++;\n }\n else if (args[i+1] && /true|false/.test(args[i+1])) {\n setArg(key, args[i+1] === 'true', arg);\n i++;\n }\n else {\n setArg(key, flags.strings[key] ? '' : true, arg);\n }\n }\n }\n else {\n if (!flags.unknownFn || flags.unknownFn(arg) !== false) {\n argv._.push(\n flags.strings['_'] || !isNumber(arg) ? arg : Number(arg)\n );\n }\n if (opts.stopEarly) {\n argv._.push.apply(argv._, args.slice(i + 1));\n break;\n }\n }\n }\n \n Object.keys(defaults).forEach(function (key) {\n if (!hasKey(argv, key.split('.'))) {\n setKey(argv, key.split('.'), defaults[key]);\n \n (aliases[key] || []).forEach(function (x) {\n setKey(argv, x.split('.'), defaults[key]);\n });\n }\n });\n \n if (opts['--']) {\n argv['--'] = new Array();\n notFlags.forEach(function(key) {\n argv['--'].push(key);\n });\n }\n else {\n notFlags.forEach(function(key) {\n argv._.push(key);\n });\n }\n\n return argv;\n};\n\nfunction hasKey (obj, keys) {\n var o = obj;\n keys.slice(0,-1).forEach(function (key) {\n o = (o[key] || {});\n });\n\n var key = keys[keys.length - 1];\n return key in o;\n}\n\nfunction isNumber (x) {\n if (typeof x === 'number') return true;\n if (/^0x[0-9a-f]+$/i.test(x)) return true;\n return /^[-+]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(e[-+]?\\d+)?$/.test(x);\n}\n\n","'use strict';\nconst UNITS = ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n\nmodule.exports = num => {\n\tif (!Number.isFinite(num)) {\n\t\tthrow new TypeError(`Expected a finite number, got ${typeof num}: ${num}`);\n\t}\n\n\tconst neg = num < 0;\n\n\tif (neg) {\n\t\tnum = -num;\n\t}\n\n\tif (num < 1) {\n\t\treturn (neg ? '-' : '') + num + ' B';\n\t}\n\n\tconst exponent = Math.min(Math.floor(Math.log(num) / Math.log(1000)), UNITS.length - 1);\n\tconst numStr = Number((num / Math.pow(1000, exponent)).toPrecision(3));\n\tconst unit = UNITS[exponent];\n\n\treturn (neg ? '-' : '') + numStr + ' ' + unit;\n};\n","const prettyBytes = require('pretty-bytes')\n\nmodule.exports = {\n createResult\n}\n\nclass Result {\n constructor (heapDiffs, gcollections, iterations) {\n this.heapDiffs = heapDiffs\n this.gcollections = gcollections\n this.iterations = iterations\n }\n\n printSummary (title, log = console.log) {\n const changesInBytes = this.heapDiffs.map(heapDiff => heapDiff.change.size_bytes)\n const average = changesInBytes.reduce((sum, change) => sum + change, 0) / changesInBytes.length\n const minimum = changesInBytes.reduce((min, change) => change < min ? change : min, Infinity)\n const maximum = changesInBytes.reduce((max, change) => change > max ? change : max, -Infinity)\n\n log(title ? `Leak test summary - ${title}:` : `Leak test summary:`)\n log(` Did ${this.gcollections} heap diffs, iterating ${this.iterations} times each.`)\n log(` Heap diff summary: ${formatDiffSize(average)} avg, ${formatDiffSize(minimum)} min, ${formatDiffSize(maximum)} max`)\n log(` Heap diffs: ${this.heapDiffs.map(heapDiff => formatDiffSize(heapDiff.change.size_bytes))}`)\n }\n}\n\nfunction createResult (heapDiffs, options) {\n const { gcollections, iterations } = options\n\n return new Result(heapDiffs, gcollections, iterations)\n}\n\nfunction formatDiffSize (size) {\n const formattedSize = prettyBytes(size)\n return size > 0 ? `+${formattedSize}` : formattedSize\n}\n","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nfunction _extendableBuiltin(cls) {\n function ExtendableBuiltin() {\n cls.apply(this, arguments);\n }\n\n ExtendableBuiltin.prototype = Object.create(cls.prototype, {\n constructor: {\n value: cls,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(ExtendableBuiltin, cls);\n } else {\n ExtendableBuiltin.__proto__ = cls;\n }\n\n return ExtendableBuiltin;\n}\n\nvar ExtendableError = function (_extendableBuiltin2) {\n _inherits(ExtendableError, _extendableBuiltin2);\n\n function ExtendableError() {\n var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n\n _classCallCheck(this, ExtendableError);\n\n // extending Error is weird and does not propagate `message`\n var _this = _possibleConstructorReturn(this, (ExtendableError.__proto__ || Object.getPrototypeOf(ExtendableError)).call(this, message));\n\n Object.defineProperty(_this, 'message', {\n configurable: true,\n enumerable: false,\n value: message,\n writable: true\n });\n\n Object.defineProperty(_this, 'name', {\n configurable: true,\n enumerable: false,\n value: _this.constructor.name,\n writable: true\n });\n\n if (Error.hasOwnProperty('captureStackTrace')) {\n Error.captureStackTrace(_this, _this.constructor);\n return _possibleConstructorReturn(_this);\n }\n\n Object.defineProperty(_this, 'stack', {\n configurable: true,\n enumerable: false,\n value: new Error(message).stack,\n writable: true\n });\n return _this;\n }\n\n return ExtendableError;\n}(_extendableBuiltin(Error));\n\nexport default ExtendableError;\n","/* This program is free software. It comes without any warranty, to\n * the extent permitted by applicable law. You can redistribute it\n * and/or modify it under the terms of the Do What The Fuck You Want\n * To Public License, Version 2, as published by Sam Hocevar. See\n * http://www.wtfpl.net/ for more details. */\n'use strict';\nmodule.exports = leftPad;\n\nvar cache = [\n '',\n ' ',\n ' ',\n ' ',\n ' ',\n ' ',\n ' ',\n ' ',\n ' ',\n ' '\n];\n\nfunction leftPad (str, len, ch) {\n // convert `str` to a `string`\n str = str + '';\n // `len` is the `pad`'s length now\n len = len - str.length;\n // doesn't need to pad\n if (len <= 0) return str;\n // `ch` defaults to `' '`\n if (!ch && ch !== 0) ch = ' ';\n // convert `ch` to a `string` cuz it could be a number\n ch = ch + '';\n // cache common use cases\n if (ch === ' ' && len < 10) return cache[len] + str;\n // `pad` starts with an empty string\n var pad = '';\n // loop\n while (true) {\n // add `ch` to `pad` if `len` is odd\n if (len & 1) pad += ch;\n // divide `len` by 2, ditch the remainder\n len >>= 1;\n // \"double\" the `ch` so this operation count grows logarithmically on `len`\n // each time `ch` is \"doubled\", the `len` would need to be \"doubled\" too\n // similar to finding a value in binary search tree, hence O(log(n))\n if (len) ch += ch;\n // `len` is 0, exit the loop\n else break;\n }\n // pad `str`!\n return pad + str;\n}\n","const ExtendableError = require('es6-error')\nconst leftPad = require('left-pad')\nconst prettyBytes = require('pretty-bytes')\n\nclass MemoryLeakError extends ExtendableError { }\n\nmodule.exports = {\n MemoryLeakError,\n testConstantHeapSize\n}\n\nfunction testConstantHeapSize (heapDiffs, { iterations, gcollections, sensitivity = 1024 }) {\n const subsequentHeapGrowths = getSubsequentHeapGrowths(heapDiffs, sensitivity)\n const throwOnSubsequentHeapGrowths = Math.floor(heapDiffs.length * 2 / 3)\n\n if (subsequentHeapGrowths.length > throwOnSubsequentHeapGrowths) {\n const lastHeapDiff = subsequentHeapGrowths[ subsequentHeapGrowths.length - 1 ]\n const heapGrowthIterations = Math.round(subsequentHeapGrowths.length * iterations)\n\n const growthInBytes = subsequentHeapGrowths\n .map(heapDiff => heapDiff.change.size_bytes)\n .reduce((total, heapGrowth) => (total + heapGrowth), 0)\n\n return new MemoryLeakError(\n `Heap grew on ${subsequentHeapGrowths.length} subsequent garbage collections ` +\n `(${formatInteger(heapGrowthIterations)} of ${iterations * gcollections} iterations) ` +\n `by ${prettyBytes(growthInBytes)}.\\n\\n` +\n ` Iterations between GCs: ${formatInteger(iterations)}\\n\\n` +\n ` Final GC details:\\n` +\n ` ${prettyHeapContents(lastHeapDiff).trimLeft()}\\n`\n )\n } else {\n return null\n }\n}\n\nfunction getSubsequentHeapGrowths (heapDiffs, sensitivity) {\n const growthSeriesSets = []\n let subsequentGrowths = []\n\n heapDiffs.forEach(heapDiff => {\n if (heapDiff.change.size_bytes > sensitivity) {\n subsequentGrowths.push(heapDiff)\n } else {\n if (subsequentGrowths.length > 0) {\n growthSeriesSets.push(subsequentGrowths)\n }\n subsequentGrowths = []\n }\n })\n\n if (subsequentGrowths.length > 0) {\n growthSeriesSets.push(subsequentGrowths)\n }\n\n return getLongestItem(growthSeriesSets, [])\n}\n\nfunction getLongestItem (array, defaultValue) {\n return array.reduce((longestItem, currentItem) => (\n currentItem.length > longestItem.length ? currentItem : longestItem\n ), defaultValue)\n}\n\nfunction prettyHeapContents (lastHeapDiff) {\n const byGrowth = (a, b) => (a.size_bytes < b.size_bytes ? 1 : -1)\n\n const formatHeapContent = (item) => (\n `[${leftPad(prettyBytes(item.size_bytes), 10)}] [+ ${leftPad(item['+'], 3)}x] [- ${leftPad(item['-'], 3)}x] ${item.what}`\n )\n\n const sortedDetails = [].concat(lastHeapDiff.change.details).sort(byGrowth)\n const formattedHeapContents = sortedDetails.map((heapContentItem) => formatHeapContent(heapContentItem))\n\n const heapContentLines = formattedHeapContents.length > 4\n ? formattedHeapContents.slice(0, 4).concat(`... (${formattedHeapContents.length - 4} more)`)\n : formattedHeapContents\n\n return heapContentLines\n .map((line) => ` ${line}`)\n .join('\\n')\n}\n\nfunction formatInteger (value) {\n return Math.round(value) !== value ? '~' + Math.round(value) : value\n}\n","/*\n * Disclaimer:\n *\n * The code in this file is quite ugly. Usually in a review I would be very\n * unhappy if I saw something like this.\n * But it's not this code's job to look pleasant. It's job is to create heap\n * diffs while leaving the smallest possible heap footprint itself. To achieve\n * that we do a couple of things:\n *\n * - We create all objects (including functions and arrays) as early as possible\n * and only once\n * - We create arrays using the `Array` constructor and pass the size we need\n * to avoid re-allocations\n * - We never assign values of different types (number, object, ...) to a variable\n * - We try to avoid promises whereever possible, since they come with a big\n * heap footprint\n * - We use setImmediate() in the right places to create a new execution context\n * to allow garbage-collecting the old execution context's objects\n * - We have dedicated heap footprint tests (see `test/heap-footprint.test.js`)\n * and we test if changes to this code alter its heap footprint\n */\n\nconst fs = require('fs')\nconst memwatch = require('@airbnb/node-memwatch')\nconst minimist = require('minimist')\nconst path = require('path')\nconst { createResult } = require('./result')\nconst { MemoryLeakError, testConstantHeapSize } = require('./testConstantHeapSize')\n\nconst argv = minimist(process.argv.slice(2))\nlet currentlyRunningTests = 0\n\nmodule.exports = {\n iterate,\n MemoryLeakError\n}\n\nfunction iterate (iteratorFn, options = {}) {\n const runAndHeapDiff = () => {\n memwatch.gc()\n memwatch.gc()\n\n const heapDiff = new memwatch.HeapDiff()\n for (let index = 0; index < iterations; index++) {\n const result = iteratorFn()\n if (result && typeof result.then === 'function') {\n throw new Error(`Tried to use iterate() on an async function. Use iterate.async() instead.`)\n }\n }\n return heapDiff.end()\n }\n\n const { iterations = 30, gcollections = 6 } = options\n const heapDiffs = new Array(gcollections)\n\n for (let gcIndex = 0; gcIndex < gcollections; gcIndex++) {\n heapDiffs[ gcIndex ] = runAndHeapDiff()\n }\n\n if (argv['heap-file']) {\n saveHeapDiffs(heapDiffs, argv['heap-file'])\n }\n\n const heapError = testConstantHeapSize(heapDiffs, { iterations, gcollections })\n if (heapError) {\n throw heapError\n }\n\n return createResult(heapDiffs, { iterations, gcollections })\n}\n\niterate.async = function iterateAsync (iteratorFn, options = {}) {\n const { iterations = 30, gcollections = 6 } = options\n const heapDiffs = new Array(gcollections)\n\n const runner = {\n gcIndex: 0,\n error: null,\n heapDiff: null,\n reject: () => {},\n resolve: () => {},\n\n run () {\n memwatch.gc()\n memwatch.gc()\n\n let currentIterationsDone = 0\n runner.heapDiff = new memwatch.HeapDiff()\n\n for (let index = 0; index < iterations; index++) {\n iteratorFn().then(\n () => {\n currentIterationsDone++\n if (currentIterationsDone === iterations) {\n setImmediate(runner.onHeapDiff)\n }\n },\n error => {\n currentIterationsDone++\n runner.error = error\n if (currentIterationsDone === iterations) {\n setImmediate(runner.onHeapDiff)\n }\n }\n )\n }\n },\n onHeapDiff () {\n memwatch.gc()\n heapDiffs[ runner.gcIndex ] = runner.heapDiff.end()\n runner.gcIndex++\n\n if (runner.gcIndex === gcollections) {\n runner.onAllDone()\n } else {\n // If `setImmediate(runner.run)` is used here we will always have leaky diffs! Why?!\n runner.run()\n }\n },\n onAllDone () {\n if (argv['heap-file']) {\n saveHeapDiffs(heapDiffs, argv['heap-file'])\n }\n\n currentlyRunningTests--\n\n if (runner.error) {\n runner.reject(runner.error)\n } else {\n const heapError = testConstantHeapSize(heapDiffs, { iterations, gcollections, sensitivity: 5 * 1024 })\n if (heapError) {\n runner.reject(heapError)\n } else {\n runner.resolve(createResult(heapDiffs, { iterations, gcollections }))\n }\n }\n }\n }\n\n return new Promise((resolve, reject) => {\n runner.resolve = resolve\n runner.reject = reject\n\n if (currentlyRunningTests > 0) {\n return reject(new Error(\n `Detected concurrently running tests. ` +\n `This will render the heap snapshots unusable. ` +\n `Make sure the tests are run strictly sequentially.`\n ))\n }\n currentlyRunningTests++\n\n // Since the first iterator call always inflates the heap a lot, we do a blind first run here\n const promise = iteratorFn()\n\n if (!promise || typeof promise.then !== 'function') {\n return reject(new Error(`Tried to use iterate.async() on a synchronous function. Use iterate() instead.`))\n }\n\n promise.then(\n () => setImmediate(runner.run),\n error => reject(error)\n )\n })\n}\n\nfunction saveHeapDiffs (heapDiffs, outFileName) {\n const outFilePath = path.resolve(process.cwd(), outFileName)\n fs.writeFileSync(outFilePath, JSON.stringify(heapDiffs, null, 2), { encoding: 'utf8' })\n}\n","import * as early from '@pushrocks/early';\nimport * as leakage from 'leakage';\nimport * as smartdelay from '@pushrocks/smartdelay';\nimport * as smartpromise from '@pushrocks/smartpromise';\n\nexport { early, smartdelay, smartpromise, leakage };\n","import * as plugins from './tapbundle.plugins';\nimport { TapTest } from './tapbundle.classes.taptest';\n\nexport interface IPromiseFunc {\n (): Promise<any>;\n}\n\nexport class TapTools {\n /**\n * the referenced TapTest\n */\n private _tapTest: TapTest;\n\n constructor(TapTestArg) {\n this._tapTest = TapTestArg;\n }\n\n /**\n * allow failure\n */\n allowFailure() {\n this._tapTest.failureAllowed = true;\n }\n\n /**\n * async/await delay method\n */\n async delayFor(timeMilliArg) {\n await plugins.smartdelay.delayFor(timeMilliArg);\n }\n\n async delayForRandom(timeMilliMinArg, timeMilliMaxArg) {\n await plugins.smartdelay.delayForRandom(timeMilliMinArg, timeMilliMaxArg);\n }\n\n async timeout(timeMilliArg: number) {\n let timeout = new plugins.smartdelay.Timeout(timeMilliArg);\n timeout.makeUnrefed();\n await timeout.promise;\n if (this._tapTest.status === 'pending') {\n this._tapTest.status = 'timeout';\n }\n }\n\n async checkIterationLeak(iterationfuncArg: IPromiseFunc) {\n await plugins.leakage.iterate.async(iterationfuncArg);\n }\n\n async returnError(throwingFuncArg: IPromiseFunc) {\n let funcErr: Error;\n try {\n await throwingFuncArg();\n } catch (err) {\n funcErr = err;\n }\n return funcErr;\n }\n}\n","import * as plugins from './tapbundle.plugins';\nimport { tapCreator } from './tapbundle.tapcreator';\nimport { TapTools } from './tapbundle.classes.taptools';\n\n// imported interfaces\nimport { HrtMeasurement } from '@pushrocks/early';\nimport { Deferred } from '@pushrocks/smartpromise';\n\n// interfaces\nexport type TTestStatus = 'success' | 'error' | 'pending' | 'errorAfterSuccess' | 'timeout';\n\nexport interface ITestFunction {\n (tapTools?: TapTools): Promise<any>;\n}\n\nexport class TapTest {\n description: string;\n failureAllowed: boolean;\n hrtMeasurement: HrtMeasurement;\n parallel: boolean;\n status: TTestStatus;\n tapTools: TapTools;\n testFunction: ITestFunction;\n testKey: number; // the testKey the position in the test qeue. Set upon calling .run()\n testDeferred: Deferred<TapTest> = plugins.smartpromise.defer();\n testPromise: Promise<TapTest> = this.testDeferred.promise;\n /**\n * constructor\n */\n constructor(optionsArg: { description: string; testFunction: ITestFunction; parallel: boolean }) {\n this.description = optionsArg.description;\n this.hrtMeasurement = new HrtMeasurement();\n this.parallel = optionsArg.parallel;\n this.status = 'pending';\n this.tapTools = new TapTools(this);\n this.testFunction = optionsArg.testFunction;\n }\n\n /**\n * run the test\n */\n async run(testKeyArg: number) {\n this.hrtMeasurement.start();\n this.testKey = testKeyArg;\n let testNumber = testKeyArg + 1;\n try {\n await this.testFunction(this.tapTools);\n if (this.status === 'timeout') {\n throw new Error('Test succeeded, but timed out...');\n }\n this.hrtMeasurement.stop();\n console.log(\n `ok ${testNumber} - ${this.description} # time=${this.hrtMeasurement.milliSeconds}ms`\n );\n this.status = 'success';\n this.testDeferred.resolve(this);\n } catch (err) {\n this.hrtMeasurement.stop();\n console.log(\n `not ok ${testNumber} - ${this.description} # time=${this.hrtMeasurement.milliSeconds}ms`\n );\n this.testDeferred.resolve(this);\n\n // if the test has already succeeded before\n if (this.status === 'success') {\n this.status = 'errorAfterSuccess';\n console.log('!!! ALERT !!!: weird behaviour, since test has been already successfull');\n } else {\n this.status = 'error';\n }\n\n // if the test is allowed to fail\n if (this.failureAllowed) {\n console.log(`please note: failure allowed!`);\n }\n console.log(err);\n }\n }\n}\n","import * as plugins from './tapbundle.plugins';\n\nexport interface ITapWrapFunction {\n (): Promise<any>;\n}\n\nexport class TapWrap {\n wrapFunction: ITapWrapFunction;\n\n /**\n * the constructor\n */\n constructor(wrapFunctionArg: ITapWrapFunction) {\n // nothing here\n this.wrapFunction = wrapFunctionArg;\n }\n\n /**\n * run the wrapFunction\n */\n async run() {\n await this.wrapFunction();\n }\n}\n","import * as plugins from './tapbundle.plugins';\n\nimport { TapTest, ITestFunction } from './tapbundle.classes.taptest';\nimport { TapWrap, ITapWrapFunction } from './tapbundle.classes.tapwrap';\nexport class Tap {\n /**\n * skips a test\n * tests marked with tap.skip.test() are never executed\n */\n skip = {\n test: (descriptionArg: string, functionArg: ITestFunction) => {\n console.log(`skipped test: ${descriptionArg}`);\n },\n testParallel: (descriptionArg: string, functionArg: ITestFunction) => {\n console.log(`skipped test: ${descriptionArg}`);\n }\n };\n\n /**\n * only executes tests marked as ONLY\n */\n only = {\n test: (descriptionArg: string, testFunctionArg: ITestFunction) => {\n this.test(descriptionArg, testFunctionArg, 'only');\n }\n }\n\n private _tapTests: TapTest[] = [];\n private _tapTestsOnly: TapTest[] = [];\n\n /**\n * Normal test function, will run one by one\n * @param testDescription - A description of what the test does\n * @param testFunction - A Function that returns a Promise and resolves or rejects\n */\n async test(testDescription: string, testFunction: ITestFunction, modeArg: 'normal' | 'only' | 'skip' = 'normal' ) {\n let localTest = new TapTest({\n description: testDescription,\n testFunction: testFunction,\n parallel: false\n });\n if(modeArg === 'normal') {\n this._tapTests.push(localTest);\n } else if (modeArg === 'only') {\n this._tapTestsOnly.push(localTest);\n }\n return localTest;\n }\n\n /**\n * wraps function\n */\n wrap(functionArg: ITapWrapFunction) {\n return new TapWrap(functionArg);\n }\n\n /**\n * A parallel test that will not be waited for before the next starts.\n * @param testDescription - A description of what the test does\n * @param testFunction - A Function that returns a Promise and resolves or rejects\n */\n testParallel(testDescription: string, testFunction: ITestFunction) {\n this._tapTests.push(\n new TapTest({\n description: testDescription,\n testFunction: testFunction,\n parallel: true\n })\n );\n }\n\n /**\n * starts the test evaluation\n */\n async start(optionsArg?: { throwOnError: boolean }) {\n let promiseArray: Promise<any>[] = [];\n\n // safeguard against empty test array\n if (this._tapTests.length === 0) {\n console.log('no tests specified. Ending here!');\n return;\n }\n\n // determine which tests to run\n let concerningTests: TapTest[];\n if(this._tapTestsOnly.length > 0) {\n concerningTests = this._tapTestsOnly;\n } else {\n concerningTests = this._tapTests;\n }\n\n console.log(`1..${concerningTests.length}`);\n for (let testKey = 0; testKey < concerningTests.length; testKey++) {\n let currentTest = concerningTests[testKey];\n let testPromise = currentTest.run(testKey);\n if (currentTest.parallel) {\n promiseArray.push(testPromise);\n } else {\n await testPromise;\n }\n }\n await Promise.all(promiseArray);\n\n // when tests have been run and all promises are fullfilled\n let failReasons: string[] = [];\n let executionNotes: string[] = [];\n // collect failed tests\n for (let tapTest of concerningTests) {\n if (tapTest.status !== 'success') {\n failReasons.push(\n `Test ${tapTest.testKey + 1} failed with status ${tapTest.status}:\\n` +\n `|| ${tapTest.description}\\n` +\n `|| for more information please take a look the logs above`\n );\n }\n }\n\n // render fail Reasons\n for (let failReason of failReasons) {\n console.log(failReason);\n }\n\n if (optionsArg && optionsArg.throwOnError && failReasons.length > 0) {\n process.exit(1);\n }\n }\n\n /**\n * handle errors\n */\n threw(err) {\n console.log(err);\n }\n}\n\nexport let tap = new Tap();\n","import * as plugins from './smartlog.plugins';\n\nimport { ILogDestination, ILogPackage } from '@pushrocks/smartlog-interfaces';\n\nexport class LogRouter {\n /**\n * all log destinations\n */\n private logDestinations: ILogDestination[] = [];\n\n constructor() {}\n\n public addLogDestination(logDestination: ILogDestination) {\n this.logDestinations.push(logDestination);\n }\n\n // routes the log according to added logDestinations\n routeLog(logPackageArg: ILogPackage) {\n for (const logDestination of this.logDestinations) {\n logDestination.handleLog(logPackageArg);\n }\n }\n}\n","import * as plugins from './smartlog.plugins';\n\n// interfaces\nimport { TLogType, TEnvironment, ILogContext, TLogLevel, TRuntime, ILogDestination, ILogPackage } from '@pushrocks/smartlog-interfaces';\n\nimport { LogRouter } from './smartlog.classes.logrouter';\n\nexport interface ISmartlogContructorOptions {\n logContext: ILogContext;\n minimumLogLevel?: TLogLevel;\n}\n\nexport class Smartlog {\n private logContext: ILogContext;\n private minimumLogLevel: TLogLevel;\n \n private consoleEnabled: boolean;\n \n private logRouter = new LogRouter();\n\n public addLogDestination (logDestinationArg: ILogDestination) {\n this.logRouter.addLogDestination(logDestinationArg);\n }\n\n constructor(optionsArg: ISmartlogContructorOptions) {\n this.logContext = optionsArg.logContext;\n this.minimumLogLevel = optionsArg.minimumLogLevel;\n }\n\n\n // ============\n // Logger Setup\n // ============\n\n /**\n * enables console logging\n */\n enableConsole() {\n this.consoleEnabled = true;\n }\n\n // =============\n // log functions\n // =============\n /**\n * main log method\n * @param logLevelArg - the log level\n * @param logMessageArg - the log message\n * @param logDataArg - any additional log data\n */\n public log(logLevelArg: TLogLevel, logMessageArg: string, logDataArg?: any) {\n if (this.consoleEnabled) {\n console.log(`LOG: ${logLevelArg}: ${logMessageArg}`);\n }\n const logPackage: ILogPackage = {\n timestamp: Date.now(),\n type: 'log',\n context: this.logContext,\n level: logLevelArg,\n message: logMessageArg\n };\n if(logDataArg) {\n logPackage.data = logDataArg;\n }\n this.logRouter.routeLog(logPackage);\n }\n\n public increment(logLevelArg: TLogLevel, logMessageArg) {\n if (this.consoleEnabled) {\n console.log(`INCREMENT: ${logLevelArg}: ${logMessageArg}`);\n }\n this.logRouter.routeLog({\n timestamp: Date.now(),\n type: 'increment',\n context: this.logContext,\n level: logLevelArg,\n message: logMessageArg\n });\n }\n\n public handleLogPackage(logPackageArg: ILogPackage) {\n this.logRouter.routeLog(logPackageArg);\n }\n}\n","import * as plugins from './beautybrowser.plugins';\nimport { ILogDestination, ILogPackage } from '@pushrocks/smartlog-interfaces';\n\n\nexport class SmartlogDestinationDevtools implements ILogDestination {\n public handleLog(logPackageArg: ILogPackage) {\n this.logInBrowser(logPackageArg);\n }\n\n private logInBrowser(logPackage: ILogPackage) {\n switch (logPackage.level) {\n case 'error':\n console.log(\n `%c Error: %c ${logPackage.message}`,\n 'background:#000000;color:#800000;',\n 'color:#000000;'\n );\n break;\n case 'info':\n console.log(\n `%c Info: %c ${logPackage.message}`,\n 'background:#EC407A;color:#ffffff;',\n 'color:#EC407A;'\n );\n break;\n case 'ok':\n console.log(\n `%c OK: %c ${logPackage.message}`,\n 'background:#000000;color:#8BC34A;',\n 'color:#000000;'\n );\n break;\n case 'success':\n console.log(\n `%c Success: %c ${logPackage.message}`,\n 'background:#8BC34A;color:#ffffff;',\n 'color:#8BC34A;'\n );\n break;\n case 'warn':\n console.log(\n `%c Warn: %c ${logPackage.message}`,\n 'background:#000000;color:#FB8C00;',\n 'color:#000000;'\n );\n break;\n case 'note':\n console.log(\n `%c Note: %c ${logPackage.message}`,\n 'background:#42A5F5;color:#ffffff',\n 'color:#42A5F5;'\n );\n break;\n default:\n console.log(`unknown logType for \"${logPackage.message}\"`);\n break;\n }\n }\n}\n","import { expect, tap } from '@pushrocks/tapbundle';\n\n// preparation\nimport { ILogContext } from '@pushrocks/smartlog-interfaces';\nimport * as smartlog from '@pushrocks/smartlog';\n\nconst logger = smartlog.defaultLogger;\nconst logContext: ILogContext = {\n company: 'Lossless GmbH',\n companyunit: 'Lossless.Cloud',\n containerName: 'testContainer',\n environment: 'staging',\n runtime: 'chrome',\n zone: 'servezone'\n};\n\n// import the module to test\nimport * as smartlogDestinationDevtools from '../ts/index';\n\nlet testDestination: smartlogDestinationDevtools.SmartlogDestinationDevtools;\n\ntap.test('first test', async () => {\n testDestination = new smartlogDestinationDevtools.SmartlogDestinationDevtools();\n});\n\ntap.test('should log a normal message', async () => {\n testDestination.handleLog({\n timestamp: Date.now(),\n type: 'log',\n context: logContext,\n level: 'info',\n message: 'wait, what? Hi, this is a message!'\n });\n});\n\ntap.test('should log a success message', async () => {\n testDestination.handleLog({\n timestamp: Date.now(),\n context: logContext,\n type: 'log',\n level: 'info',\n message: 'success: Hi, this is a message!'\n });\n});\n\ntap.start();\n"]} |