From ad9012a3d21db187a80476ce9f4e213a5b809099 Mon Sep 17 00:00:00 2001 From: Jakob Anderson Date: Sat, 3 Jun 2017 10:13:08 -0600 Subject: [PATCH 1/4] cleaned up startup flow for devs --- README.md | 11 ++++------- gulpfile.js | 1 + package.json | 4 +++- shrinkwrap.yaml | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 58 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 3b99593..ebea25a 100644 --- a/README.md +++ b/README.md @@ -18,19 +18,16 @@ ## How To Install Locally ```bash -npm i -g pnpm # if you don't have pnpm yet -pnpm i -g firebase-tools # if you don't have firebase-tools yet -pnpm i -g gulp gulp-cli # if you don't have gulp yet git clone https://github.com/PracticeJavaScript/practicejavascript.com.git cd practicejavascript.com -pnpm i -gulp # watch is default gulp task +npm i +npm start # start gulp watch # Another tab -firebase serve +npm run serve # serves content out of /public dir ``` - That will build it all and watch the css, img, and js assets. -- Then you can load up `http://localhost:5000` or `public/index.html` in a browser. narf! +- Then you can load up `http://localhost:8080` in a browser. narf! `/src/index.js`, `/src/css/style.scss`, and `/src/html/index.html` are the main files you'll want to edit for functionality. - If you have the [LiveReload Chrome extension](https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei) installed, it should do live css updates in your browser while gulp watch is running - CSS is auto-prefixed for the supported browserslist, so don't manually add any browser prefixes to CSS src. diff --git a/gulpfile.js b/gulpfile.js index 1702643..df741e7 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -82,6 +82,7 @@ function compile(watch) { bundler.on('update', () => { console.log('-> bundling...'); rebundle(); + livereload(); console.log('done bundling.'); }); } diff --git a/package.json b/package.json index 02012ac..f9541ec 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,9 @@ }, "scripts": { "test": "", + "start": "./node_modules/.bin/gulp watch", + "serve": "./node_modules/.bin/http-server", "build": "./node_modules/.bin/gulp build", - "watch": "./node_modules/.bin/gulp watch", "precommit": "npm test", "prepush": "npm test" }, @@ -68,6 +69,7 @@ "gulp-svgo": "^1.0.3", "gulp-uglify": "^3.0.0", "gulp-util": "^3.0.8", + "http-server": "^0.10.0", "husky": "^0.13.3", "lint-staged": "^3.4.0", "localforage": "^1.5.0", diff --git a/shrinkwrap.yaml b/shrinkwrap.yaml index 55d8e81..a68bfbe 100644 --- a/shrinkwrap.yaml +++ b/shrinkwrap.yaml @@ -23,6 +23,7 @@ dependencies: gulp-uglify@^3.0.0: 3.0.0 gulp-util@^3.0.8: 3.0.8 gulp@^3.9.1: 3.9.1 + http-server@^0.10.0: 0.10.0 husky@^0.13.3: 0.13.4 lint-staged@^3.4.0: 3.6.0 localforage@^1.5.0: 1.5.0 @@ -1129,6 +1130,7 @@ packages: css-color-names: 0.0.4 has: 1.0.1 resolution: ea2f7420a72b96881a38aae59ec124a6f7298133 + /colors/1.0.3: 0433f44d809680fdeb60ed260f1b0c262e82a40b /colors/1.1.2: 168a4701756b6a7f51a12ce0c97bfa28c084ed63 /combine-source-map/0.7.2: dependencies: @@ -1204,6 +1206,7 @@ packages: resolution: f85e2cf9bfed28f773cc8b3fa5c5b69bdc02fe3f /core-js/2.4.1: 4de911e667b0eae9124e34254b53aea6fc618d3e /core-util-is/1.0.2: b5fd54220aa2bc5ab57aab7140c940754503c1a7 + /corser/2.0.1: 8eda252ecaab5840dcd975ceb90d9370c819ff87 /cosmiconfig/1.1.0: dependencies: graceful-fs: 4.1.11 @@ -1558,6 +1561,13 @@ packages: dependencies: jsbn: 0.1.1 resolution: 0fc73a9ed5f0d53c38193398523ef7e543777505 + /ecstatic/2.1.0: + dependencies: + he: 0.5.0 + mime: 1.3.6 + minimist: 1.2.0 + url-join: 1.1.0 + resolution: 477a4a6b25cecb112f697dbd2c7fa354154ea6be /ee-first/1.1.1: 590c61156b0ae2f4f0255732a158b266bc56b21d /electron-to-chromium/1.3.13: 1b3a5eace6e087bb5e257a100b0cbfe81b2891fc /elegant-spinner/1.0.1: db043521c95d7e303fd8f345bedc3349cfb0729e @@ -1798,6 +1808,7 @@ packages: stream-combiner: 0.0.4 through: 2.3.8 resolution: 4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571 + /eventemitter3/1.2.0: 1c86991d816ad1e504750e73874224ecf3bec508 /events/1.1.1: 9ebdb7635ad099c70dcc4c2a1f5004288e8bd924 /evp_bytestokey/1.0.0: dependencies: @@ -2412,6 +2423,7 @@ packages: hoek: 2.16.3 sntp: 1.0.9 resolution: 078444bd7c1640b0fe540d2c9b73d59678e8e1c4 + /he/0.5.0: 2c05ffaef90b68e860f3fd2b54ef580989277ee2 /he/1.1.1: 93410fd21b009735151f8868c2f271f3427e23fd /hmac-drbg/1.0.1: dependencies: @@ -2448,6 +2460,22 @@ packages: inherits: 2.0.3 statuses: 1.3.1 resolution: 197e22cdebd4198585e8694ef6786197b91ed942 + /http-proxy/1.16.2: + dependencies: + eventemitter3: 1.2.0 + requires-port: 1.0.0 + resolution: 06dff292952bf64dbe8471fa9df73066d4f37742 + /http-server/0.10.0: + dependencies: + colors: 1.0.3 + corser: 2.0.1 + ecstatic: 2.1.0 + http-proxy: 1.16.2 + opener: 1.4.3 + optimist: 0.6.1 + portfinder: 1.0.13 + union: 0.4.6 + resolution: b2a446b16a9db87ed3c622ba9beb1b085b1234a7 /http-signature/1.1.1: dependencies: assert-plus: 0.2.0 @@ -3107,6 +3135,7 @@ packages: dependencies: mime-db: 1.27.0 resolution: a4ebf5064094569237b8cf70046776d09fc92aed + /mime/1.3.6: 591d84d3653a6b0b4a3b9df8de5aa8108e72e5e0 /mimic-fn/1.1.0: e667783d92e89dbd342818b5230b9d62a672ad18 /mini-lr/0.1.9: dependencies: @@ -3132,6 +3161,7 @@ packages: dependencies: brace-expansion: 1.1.7 resolution: 5166e286457f03306064be5497e8dbb0c3d32083 + /minimist/0.0.10: de3f98543dbf96082be48ad1a0c7cda836301dcf /minimist/0.0.8: 857fcabfc3397d2625b8228262e86aa7a011b05d /minimist/1.2.0: a35008b20f41383eec1fb914f4cd5df79a264284 /mkdirp/0.5.1: @@ -3311,6 +3341,12 @@ packages: dependencies: mimic-fn: 1.1.0 resolution: 067428230fd67443b2794b22bba528b6867962d4 + /opener/1.4.3: 5c6da2c5d7e5831e8ffa3964950f8d6674ac90b8 + /optimist/0.6.1: + dependencies: + minimist: 0.0.10 + wordwrap: 0.0.3 + resolution: da3ea74686fa21a19a111c326e90eb15a0196686 /option-chain/0.1.1: dependencies: object-assign: 4.1.1 @@ -3512,6 +3548,12 @@ packages: bin-wrapper: 3.0.2 logalot: 2.1.0 resolution: d124d98a75a9487f40c1640b4dbfcbb2bd5a1fd1 + /portfinder/1.0.13: + dependencies: + async: 1.5.2 + debug: 2.6.8 + mkdirp: 0.5.1 + resolution: bb32ecd87c27104ae6ee44b5a3ccbf0ebb1aede9 /postcss-calc/5.3.1: dependencies: postcss: 5.2.17 @@ -3722,6 +3764,7 @@ packages: /punycode/1.4.1: c0d5a63b2718800ad8e1eb0fa5269c84dd41845e /q/1.5.0: dd01bac9d06d30e6f219aecb8253ee9ebdc308f1 /qs/2.2.5: 1088abaf9dcc0ae5ae45b709e6c6b5888b23923c + /qs/2.3.3: e9e85adbe75da0bbe4c8e0476a086290f863b404 /qs/5.2.0: a9f31142af468cb72b25b30136ba2456834916be /qs/6.4.0: 13e26d28ad6b0ffaa91312cd3bf708ed351e7233 /query-string/4.3.4: @@ -3933,6 +3976,7 @@ packages: caller-path: 0.1.0 resolve-from: 1.0.1 resolution: 4e0d56d6c9662fd31e43011c4b95aa49955421d3 + /requires-port/1.0.0: 925d2601d39ac485e091cf0da5c6e694dc3dcaff /resolve-cwd/1.0.0: dependencies: resolve-from: 2.0.0 @@ -4415,6 +4459,10 @@ packages: /uid2/0.0.3: 483126e11774df2f71b8b639dcd799c376162b82 /umd/3.0.1: 8ae556e11011f63c2596708a8837259f01b3d60e /unc-path-regex/0.1.2: e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa + /union/0.4.6: + dependencies: + qs: 2.3.3 + resolution: 198fbdaeba254e788b0efcb630bc11f24a2959e0 /uniq/1.0.1: b31c5ae8254844a3a8281541ce2b04b865a734ff /uniqid/4.1.1: dependencies: @@ -4471,6 +4519,7 @@ packages: /upper-case/1.1.3: f6b4501c2ec4cdd26ba78be7222961de77621598 /urijs/1.18.10: b94463eaba59a1a796036a467bb633c667f221ab /urix/0.1.0: da937f7a62e21fec1fd18d49b35c2935067a6c72 + /url-join/1.1.0: 741c6c2f4596c4830d6718460920d0c92202dc78 /url-parse-lax/1.0.0: dependencies: prepend-http: 1.0.4 @@ -4617,6 +4666,7 @@ packages: resolution: 0c09c85c2a94683d0d7eaf8ee097d564bf0e105c /window-size/0.1.0: 5438cd2ea93b202efa3a19fe8887aee7c94f9c9d /wordwrap/0.0.2: b79669bb42ecb409f83d583cad52ca17eaa1643f + /wordwrap/0.0.3: a3d5da6cd5c0bc0008d37234bbaf1bed63059107 /wordwrap/1.0.0: 27584810891456a4171c8d0226441ade90cbcaeb /wrap-ansi/2.1.0: dependencies: From a9a891fb6fdc5e13b4ba78026af3673784786e36 Mon Sep 17 00:00:00 2001 From: Jakob Anderson Date: Sat, 3 Jun 2017 10:39:55 -0600 Subject: [PATCH 2/4] removed localforage dependency, to use native localstorage instead. saved 30k --- gulpfile.js | 11 +++++++ public/dist/js/bundle.min.js | 2 +- public/dist/js/bundle.min.js.map | 2 +- public/service-worker.js | 2 +- public/service-worker.js.map | 2 +- src/js/index.js | 54 ++++++++++++++++++-------------- src/service-worker.js | 2 +- 7 files changed, 47 insertions(+), 28 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index df741e7..644d0fc 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -22,6 +22,7 @@ const swPrecache = require('sw-precache'); const image = require('gulp-image'); const pump = require('pump'); + // CONFIG // ============================================================ const browserslist = require('./package.json').browserslist; @@ -50,6 +51,7 @@ const imageConfig = { jpegoptim: true }; + // TASKS // ============================================================ @@ -93,6 +95,7 @@ function watch() { return compile(true); } + // CSS // ============================================================ @@ -114,6 +117,7 @@ cssWatcher.on('change', event => { console.log('File ' + event.path + ' was ' + event.type + ', running tasks...'); }); + // OTHER JS // ============================================================ @@ -133,6 +137,7 @@ jsWatcher.on('change', event => { console.log('File ' + event.path + ' was ' + event.type + ', running tasks...'); }); + // IMG // ============================================================ @@ -157,6 +162,7 @@ imgWatcher.on('change', event => { console.log('File ' + event.path + ' was ' + event.type + ', running tasks...'); }); + // HTML // ============================================================ @@ -172,6 +178,7 @@ htmlWatcher.on('change', event => { console.log('File ' + event.path + ' was ' + event.type + ', running tasks...'); }); + // SERVICE WORKER // ============================================================ @@ -206,6 +213,7 @@ swWatcher.on('change', event => { console.log('File ' + event.path + ' was ' + event.type + ', running tasks...'); }); + // MANIFEST // ============================================================ @@ -220,6 +228,7 @@ manifestWatcher.on('change', event => { console.log('File ' + event.path + ' was ' + event.type + ', running tasks...'); }); + // BUILD // ============================================================ @@ -235,4 +244,6 @@ function glob() { return 'typeof self !== "undefined" ? self : ' + 'typeof window !== "undefined" ? window : {}'; // eslint-disable-line no-useless-concat } + +// gulp.task('default', ['build', 'manifest', 'service-worker', 'watch']); gulp.task('default', ['build', 'manifest', 'service-worker', 'watch']); diff --git a/public/dist/js/bundle.min.js b/public/dist/js/bundle.min.js index 8916e27..55c9f44 100644 --- a/public/dist/js/bundle.min.js +++ b/public/dist/js/bundle.min.js @@ -1,2 +1,2 @@ -!function e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var f=n[a]={exports:{}};t[a][0].call(f.exports,function(e){var n=t[a][1][e];return o(n||e)},f,f.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;ae,"expected #{this} to have a length above #{exp} but got #{act}","expected #{this} to not have a length above #{exp}",e,r)}else this.assert(n>e,"expected #{this} to be above "+e,"expected #{this} to be at most "+e)}function u(e,t){t&&P(this,"message",t);var n=P(this,"object");if(P(this,"doLength")){new N(n,t).to.have.property("length");var r=n.length;this.assert(r>=e,"expected #{this} to have a length at least #{exp} but got #{act}","expected #{this} to have a length below #{exp}",e,r)}else this.assert(n>=e,"expected #{this} to be at least "+e,"expected #{this} to be below "+e)}function f(e,t){t&&P(this,"message",t);var n=P(this,"object");if(P(this,"doLength")){new N(n,t).to.have.property("length");var r=n.length;this.assert(r1)throw new Error(i);break;case"object":if(arguments.length>1)throw new Error(i);e=Object.keys(e);break;default:e=Array.prototype.slice.call(arguments)}if(!e.length)throw new Error("keys required");var a=Object.keys(r),s=e,c=e.length,u=P(this,"any"),f=P(this,"all");if(u||f||(f=!0),u&&(o=s.filter(function(e){return~a.indexOf(e)}).length>0),f&&(o=e.every(function(e){return~a.indexOf(e)}),P(this,"negate")||P(this,"contains")||(o=o&&e.length==a.length)),c>1){var l=(e=e.map(function(e){return t.inspect(e)})).pop();f&&(n=e.join(", ")+", and "+l),u&&(n=e.join(", ")+", or "+l)}else n=t.inspect(e[0]);n=(c>1?"keys ":"key ")+n,n=(P(this,"contains")?"contain ":"have ")+n,this.assert(o,"expected #{this} to "+n,"expected #{this} to not "+n,s.slice(0).sort(),a.sort(),!0)}function m(e,n,r){r&&P(this,"message",r);var o=P(this,"object");new N(o,r).is.a("function");var i=!1,a=null,s=null,c=null;0===arguments.length?(n=null,e=null):e&&(e instanceof RegExp||"string"==typeof e)?(n=e,e=null):e&&e instanceof Error?(a=e,e=null,n=null):"function"==typeof e?(!(s=e.prototype.name)||"Error"===s&&e!==Error)&&(s=e.name||(new e).name):e=null;try{o()}catch(r){if(a)return this.assert(r===a,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}",a instanceof Error?a.toString():a,r instanceof Error?r.toString():r),P(this,"object",r),this;if(e&&(this.assert(r instanceof e,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp} but #{act} was thrown",s,r instanceof Error?r.toString():r),!n))return P(this,"object",r),this;var u="error"===t.type(r)&&"message"in r?r.message:""+r;if(null!=u&&n&&n instanceof RegExp)return this.assert(n.exec(u),"expected #{this} to throw error matching #{exp} but got #{act}","expected #{this} to throw error not matching #{exp}",n,u),P(this,"object",r),this;if(null!=u&&n&&"string"==typeof n)return this.assert(~u.indexOf(n),"expected #{this} to throw error including #{exp} but got #{act}","expected #{this} to throw error not including #{act}",n,u),P(this,"object",r),this;i=!0,c=r}var f="",l=null!==s?s:a?"#{exp}":"an error";i&&(f=" but #{act} was thrown"),this.assert(!0===i,"expected #{this} to throw "+l+f,"expected #{this} to not throw "+l+f,a instanceof Error?a.toString():a,c instanceof Error?c.toString():c),P(this,"object",c)}function w(e,n){n&&P(this,"message",n);var r=P(this,"object"),o=P(this,"itself"),i="function"!==t.type(r)||o?r[e]:r.prototype[e];this.assert("function"==typeof i,"expected #{this} to respond to "+t.inspect(e),"expected #{this} to not respond to "+t.inspect(e))}function x(e,n){n&&P(this,"message",n);var r=e(P(this,"object"));this.assert(r,"expected #{this} to satisfy "+t.objDisplay(e),"expected #{this} to not satisfy"+t.objDisplay(e),!this.negate,r)}function j(e,n,r){r&&P(this,"message",r);var o=P(this,"object");if(new N(o,r).is.a("number"),"number"!==t.type(e)||"number"!==t.type(n))throw new Error("the arguments to closeTo or approximately must be numbers");this.assert(Math.abs(o-e)<=n,"expected #{this} to be close to "+e+" +/- "+n,"expected #{this} not to be close to "+e+" +/- "+n)}function E(e,t,n){return e.every(function(e){return n?t.some(function(t){return n(e,t)}):-1!==t.indexOf(e)})}function S(e,t){t&&P(this,"message",t);var n=P(this,"object");new N(e).to.be.an("array"),this.assert(e.indexOf(n)>-1,"expected #{this} to be one of #{exp}","expected #{this} to not be one of #{exp}",e,n)}function _(e,t,n){n&&P(this,"message",n);var r=P(this,"object");new N(e,n).to.have.property(t),new N(r).is.a("function");var o=e[t];r(),this.assert(o!==e[t],"expected ."+t+" to change","expected ."+t+" to not change")}function O(e,t,n){n&&P(this,"message",n);var r=P(this,"object");new N(e,n).to.have.property(t),new N(r).is.a("function");var o=e[t];r(),this.assert(e[t]-o>0,"expected ."+t+" to increase","expected ."+t+" to not increase")}function A(e,t,n){n&&P(this,"message",n);var r=P(this,"object");new N(e,n).to.have.property(t),new N(r).is.a("function");var o=e[t];r(),this.assert(e[t]-o<0,"expected ."+t+" to decrease","expected ."+t+" to not decrease")}var N=e.Assertion,P=(Object.prototype.toString,t.flag);["to","be","been","is","and","has","have","with","that","which","at","of","same"].forEach(function(e){N.addProperty(e,function(){return this})}),N.addProperty("not",function(){P(this,"negate",!0)}),N.addProperty("deep",function(){P(this,"deep",!0)}),N.addProperty("any",function(){P(this,"any",!0),P(this,"all",!1)}),N.addProperty("all",function(){P(this,"all",!0),P(this,"any",!1)}),N.addChainableMethod("an",n),N.addChainableMethod("a",n),N.addChainableMethod("include",o,r),N.addChainableMethod("contain",o,r),N.addChainableMethod("contains",o,r),N.addChainableMethod("includes",o,r),N.addProperty("ok",function(){this.assert(P(this,"object"),"expected #{this} to be truthy","expected #{this} to be falsy")}),N.addProperty("true",function(){this.assert(!0===P(this,"object"),"expected #{this} to be true","expected #{this} to be false",!this.negate)}),N.addProperty("false",function(){this.assert(!1===P(this,"object"),"expected #{this} to be false","expected #{this} to be true",!!this.negate)}),N.addProperty("null",function(){this.assert(null===P(this,"object"),"expected #{this} to be null","expected #{this} not to be null")}),N.addProperty("undefined",function(){this.assert(void 0===P(this,"object"),"expected #{this} to be undefined","expected #{this} not to be undefined")}),N.addProperty("NaN",function(){this.assert(isNaN(P(this,"object")),"expected #{this} to be NaN","expected #{this} not to be NaN")}),N.addProperty("exist",function(){this.assert(null!=P(this,"object"),"expected #{this} to exist","expected #{this} to not exist")}),N.addProperty("empty",function(){var e=P(this,"object"),t=e;Array.isArray(e)||"string"==typeof object?t=e.length:"object"==typeof e&&(t=Object.keys(e).length),this.assert(!t,"expected #{this} to be empty","expected #{this} not to be empty")}),N.addProperty("arguments",i),N.addProperty("Arguments",i),N.addMethod("equal",a),N.addMethod("equals",a),N.addMethod("eq",a),N.addMethod("eql",s),N.addMethod("eqls",s),N.addMethod("above",c),N.addMethod("gt",c),N.addMethod("greaterThan",c),N.addMethod("least",u),N.addMethod("gte",u),N.addMethod("below",f),N.addMethod("lt",f),N.addMethod("lessThan",f),N.addMethod("most",l),N.addMethod("lte",l),N.addMethod("within",function(e,t,n){n&&P(this,"message",n);var r=P(this,"object"),o=e+".."+t;if(P(this,"doLength")){new N(r,n).to.have.property("length");var i=r.length;this.assert(i>=e&&i<=t,"expected #{this} to have a length within "+o,"expected #{this} to not have a length within "+o)}else this.assert(r>=e&&r<=t,"expected #{this} to be within "+o,"expected #{this} to not be within "+o)}),N.addMethod("instanceof",d),N.addMethod("instanceOf",d),N.addMethod("property",function(e,n,r){r&&P(this,"message",r);var o=!!P(this,"deep"),i=o?"deep property ":"property ",a=P(this,"negate"),s=P(this,"object"),c=o?t.getPathInfo(e,s):null,u=o?c.exists:t.hasProperty(e,s),f=o?c.value:s[e];if(a&&arguments.length>1){if(void 0===f)throw r=null!=r?r+": ":"",new Error(r+t.inspect(s)+" has no "+i+t.inspect(e))}else this.assert(u,"expected #{this} to have a "+i+t.inspect(e),"expected #{this} to not have "+i+t.inspect(e));arguments.length>1&&this.assert(n===f,"expected #{this} to have a "+i+t.inspect(e)+" of #{exp}, but got #{act}","expected #{this} to not have a "+i+t.inspect(e)+" of #{act}",n,f),P(this,"object",f)}),N.addMethod("ownProperty",h),N.addMethod("haveOwnProperty",h),N.addMethod("ownPropertyDescriptor",p),N.addMethod("haveOwnPropertyDescriptor",p),N.addChainableMethod("length",y,v),N.addMethod("lengthOf",y),N.addMethod("match",g),N.addMethod("matches",g),N.addMethod("string",function(e,n){n&&P(this,"message",n);var r=P(this,"object");new N(r,n).is.a("string"),this.assert(~r.indexOf(e),"expected #{this} to contain "+t.inspect(e),"expected #{this} to not contain "+t.inspect(e))}),N.addMethod("keys",b),N.addMethod("key",b),N.addMethod("throw",m),N.addMethod("throws",m),N.addMethod("Throw",m),N.addMethod("respondTo",w),N.addMethod("respondsTo",w),N.addProperty("itself",function(){P(this,"itself",!0)}),N.addMethod("satisfy",x),N.addMethod("satisfies",x),N.addMethod("closeTo",j),N.addMethod("approximately",j),N.addMethod("members",function(e,n){n&&P(this,"message",n);var r=P(this,"object");new N(r).to.be.an("array"),new N(e).to.be.an("array");var o=P(this,"deep")?t.eql:void 0;if(P(this,"contains"))return this.assert(E(e,r,o),"expected #{this} to be a superset of #{act}","expected #{this} to not be a superset of #{act}",r,e);this.assert(E(r,e,o)&&E(e,r,o),"expected #{this} to have the same members as #{act}","expected #{this} to not have the same members as #{act}",r,e)}),N.addMethod("oneOf",S),N.addChainableMethod("change",_),N.addChainableMethod("changes",_),N.addChainableMethod("increase",O),N.addChainableMethod("increases",O),N.addChainableMethod("decrease",A),N.addChainableMethod("decreases",A),N.addProperty("extensible",function(){var e,t=P(this,"object");try{e=Object.isExtensible(t)}catch(t){if(!(t instanceof TypeError))throw t;e=!1}this.assert(e,"expected #{this} to be extensible","expected #{this} to not be extensible")}),N.addProperty("sealed",function(){var e,t=P(this,"object");try{e=Object.isSealed(t)}catch(t){if(!(t instanceof TypeError))throw t;e=!0}this.assert(e,"expected #{this} to be sealed","expected #{this} to not be sealed")}),N.addProperty("frozen",function(){var e,t=P(this,"object");try{e=Object.isFrozen(t)}catch(t){if(!(t instanceof TypeError))throw t;e=!0}this.assert(e,"expected #{this} to be frozen","expected #{this} to not be frozen")})}},{}],7:[function(e,t,n){t.exports=function(e,t){var n=e.Assertion,r=t.flag,o=e.assert=function(t,r){new n(null,null,e.assert).assert(t,r,"[ negation message unavailable ]")};o.fail=function(t,n,r,i){throw r=r||"assert.fail()",new e.AssertionError(r,{actual:t,expected:n,operator:i},o.fail)},o.isOk=function(e,t){new n(e,t).is.ok},o.isNotOk=function(e,t){new n(e,t).is.not.ok},o.equal=function(e,t,i){var a=new n(e,i,o.equal);a.assert(t==r(a,"object"),"expected #{this} to equal #{exp}","expected #{this} to not equal #{act}",t,e)},o.notEqual=function(e,t,i){var a=new n(e,i,o.notEqual);a.assert(t!=r(a,"object"),"expected #{this} to not equal #{exp}","expected #{this} to equal #{act}",t,e)},o.strictEqual=function(e,t,r){new n(e,r).to.equal(t)},o.notStrictEqual=function(e,t,r){new n(e,r).to.not.equal(t)},o.deepEqual=function(e,t,r){new n(e,r).to.eql(t)},o.notDeepEqual=function(e,t,r){new n(e,r).to.not.eql(t)},o.isAbove=function(e,t,r){new n(e,r).to.be.above(t)},o.isAtLeast=function(e,t,r){new n(e,r).to.be.least(t)},o.isBelow=function(e,t,r){new n(e,r).to.be.below(t)},o.isAtMost=function(e,t,r){new n(e,r).to.be.most(t)},o.isTrue=function(e,t){new n(e,t).is.true},o.isNotTrue=function(e,t){new n(e,t).to.not.equal(!0)},o.isFalse=function(e,t){new n(e,t).is.false},o.isNotFalse=function(e,t){new n(e,t).to.not.equal(!1)},o.isNull=function(e,t){new n(e,t).to.equal(null)},o.isNotNull=function(e,t){new n(e,t).to.not.equal(null)},o.isNaN=function(e,t){new n(e,t).to.be.NaN},o.isNotNaN=function(e,t){new n(e,t).not.to.be.NaN},o.isUndefined=function(e,t){new n(e,t).to.equal(void 0)},o.isDefined=function(e,t){new n(e,t).to.not.equal(void 0)},o.isFunction=function(e,t){new n(e,t).to.be.a("function")},o.isNotFunction=function(e,t){new n(e,t).to.not.be.a("function")},o.isObject=function(e,t){new n(e,t).to.be.a("object")},o.isNotObject=function(e,t){new n(e,t).to.not.be.a("object")},o.isArray=function(e,t){new n(e,t).to.be.an("array")},o.isNotArray=function(e,t){new n(e,t).to.not.be.an("array")},o.isString=function(e,t){new n(e,t).to.be.a("string")},o.isNotString=function(e,t){new n(e,t).to.not.be.a("string")},o.isNumber=function(e,t){new n(e,t).to.be.a("number")},o.isNotNumber=function(e,t){new n(e,t).to.not.be.a("number")},o.isBoolean=function(e,t){new n(e,t).to.be.a("boolean")},o.isNotBoolean=function(e,t){new n(e,t).to.not.be.a("boolean")},o.typeOf=function(e,t,r){new n(e,r).to.be.a(t)},o.notTypeOf=function(e,t,r){new n(e,r).to.not.be.a(t)},o.instanceOf=function(e,t,r){new n(e,r).to.be.instanceOf(t)},o.notInstanceOf=function(e,t,r){new n(e,r).to.not.be.instanceOf(t)},o.include=function(e,t,r){new n(e,r,o.include).include(t)},o.notInclude=function(e,t,r){new n(e,r,o.notInclude).not.include(t)},o.match=function(e,t,r){new n(e,r).to.match(t)},o.notMatch=function(e,t,r){new n(e,r).to.not.match(t)},o.property=function(e,t,r){new n(e,r).to.have.property(t)},o.notProperty=function(e,t,r){new n(e,r).to.not.have.property(t)},o.deepProperty=function(e,t,r){new n(e,r).to.have.deep.property(t)},o.notDeepProperty=function(e,t,r){new n(e,r).to.not.have.deep.property(t)},o.propertyVal=function(e,t,r,o){new n(e,o).to.have.property(t,r)},o.propertyNotVal=function(e,t,r,o){new n(e,o).to.not.have.property(t,r)},o.deepPropertyVal=function(e,t,r,o){new n(e,o).to.have.deep.property(t,r)},o.deepPropertyNotVal=function(e,t,r,o){new n(e,o).to.not.have.deep.property(t,r)},o.lengthOf=function(e,t,r){new n(e,r).to.have.length(t)},o.throws=function(e,t,o,i){("string"==typeof t||t instanceof RegExp)&&(o=t,t=null);var a=new n(e,i).to.throw(t,o);return r(a,"object")},o.doesNotThrow=function(e,t,r){"string"==typeof t&&(r=t,t=null),new n(e,r).to.not.Throw(t)},o.operator=function(e,o,i,a){var s;switch(o){case"==":s=e==i;break;case"===":s=e===i;break;case">":s=e>i;break;case">=":s=e>=i;break;case"<":s=e1&&n===t.length-1?"or ":"")+r+" "+e}).join(", ");if(!t.some(function(t){return i(e)===t}))throw new r("object tested must be "+n+", but "+i(e)+" given")}},{"./flag":14,"assertion-error":1,"type-detect":40}],14:[function(e,t,n){t.exports=function(e,t,n){var r=e.__flags||(e.__flags=Object.create(null));if(3!==arguments.length)return r[t];r[t]=n}},{}],15:[function(e,t,n){t.exports=function(e,t){return t.length>4?t[4]:e._obj}},{}],16:[function(e,t,n){t.exports=function(e){var t=[];for(var n in e)t.push(n);return t}},{}],17:[function(e,t,n){var r=e("./flag"),o=e("./getActual"),i=(e("./inspect"),e("./objDisplay"));t.exports=function(e,t){var n=r(e,"negate"),a=r(e,"object"),s=t[3],c=o(e,t),u=n?t[2]:t[1],f=r(e,"message");return"function"==typeof u&&(u=u()),u=u||"",u=u.replace(/#\{this\}/g,function(){return i(a)}).replace(/#\{act\}/g,function(){return i(c)}).replace(/#\{exp\}/g,function(){return i(s)}),f?f+": "+u:u}},{"./flag":14,"./getActual":15,"./inspect":24,"./objDisplay":25}],18:[function(e,t,n){t.exports=function(e){if(e.name)return e.name;var t=/^\s?function ([^(]*)\(/.exec(e);return t&&t[1]?t[1]:""}},{}],19:[function(e,t,n){function r(e){return e.replace(/([^\\])\[/g,"$1.[").match(/(\\\.|[^.]+?)+/g).map(function(e){var t=/^\[(\d+)\]$/.exec(e);return t?{i:parseFloat(t[1])}:{p:e.replace(/\\([.\[\]])/g,"$1")}})}function o(e,t,n){for(var r,o=t,i=0,a=n=void 0===n?e.length:n;i1?o(n,t,n.length-1):t,name:a.p||a.i,value:o(n,t)};return s.exists=i(s.name,s.parent),s}},{"./hasProperty":22}],20:[function(e,t,n){var r=e("./getPathInfo");t.exports=function(e,t){return r(e,t).value}},{"./getPathInfo":19}],21:[function(e,t,n){t.exports=function(e){function t(e){-1===n.indexOf(e)&&n.push(e)}for(var n=Object.getOwnPropertyNames(e),r=Object.getPrototypeOf(e);null!==r;)Object.getOwnPropertyNames(r).forEach(t),r=Object.getPrototypeOf(r);return n}},{}],22:[function(e,t,n){var r=e("type-detect"),o={number:Number,string:String};t.exports=function(e,t){var n=r(t);return"null"!==n&&"undefined"!==n&&(o[n]&&"object"!=typeof t&&(t=new o[n](t)),e in t)}},{"type-detect":40}],23:[function(e,t,n){(n=t.exports={}).test=e("./test"),n.type=e("type-detect"),n.expectTypes=e("./expectTypes"),n.getMessage=e("./getMessage"),n.getActual=e("./getActual"),n.inspect=e("./inspect"),n.objDisplay=e("./objDisplay"),n.flag=e("./flag"),n.transferFlags=e("./transferFlags"),n.eql=e("deep-eql"),n.getPathValue=e("./getPathValue"),n.getPathInfo=e("./getPathInfo"),n.hasProperty=e("./hasProperty"),n.getName=e("./getName"),n.addProperty=e("./addProperty"),n.addMethod=e("./addMethod"),n.overwriteProperty=e("./overwriteProperty"),n.overwriteMethod=e("./overwriteMethod"),n.addChainableMethod=e("./addChainableMethod"),n.overwriteChainableMethod=e("./overwriteChainableMethod")},{"./addChainableMethod":10,"./addMethod":11,"./addProperty":12,"./expectTypes":13,"./flag":14,"./getActual":15,"./getMessage":17,"./getName":18,"./getPathInfo":19,"./getPathValue":20,"./hasProperty":22,"./inspect":24,"./objDisplay":25,"./overwriteChainableMethod":26,"./overwriteMethod":27,"./overwriteProperty":28,"./test":29,"./transferFlags":30,"deep-eql":32,"type-detect":40}],24:[function(e,t,n){function r(e,t,n,r){return o({showHidden:t,seen:[],stylize:function(e){return e}},e,void 0===n?2:n)}function o(e,t,r){if(t&&"function"==typeof t.inspect&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var p=t.inspect(r);return"string"!=typeof p&&(p=o(e,p,r)),p}var m=i(e,t);if(m)return m;if(b(t)){if("outerHTML"in t)return t.outerHTML;try{if(document.xmlVersion)return(new XMLSerializer).serializeToString(t);var w=document.createElementNS("http://www.w3.org/1999/xhtml","_");return w.appendChild(t.cloneNode(!1)),html=w.innerHTML.replace("><",">"+t.innerHTML+"<"),w.innerHTML="",html}catch(e){}}var x=g(t),j=e.showHidden?y(t):x;if(0===j.length||h(t)&&(1===j.length&&"stack"===j[0]||2===j.length&&"description"===j[0]&&"stack"===j[1])){if("function"==typeof t){var E=(A=v(t))?": "+A:"";return e.stylize("[Function"+E+"]","special")}if(l(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(d(t))return e.stylize(Date.prototype.toUTCString.call(t),"date");if(h(t))return a(t)}var S="",_=!1,O=["{","}"];if(f(t)&&(_=!0,O=["[","]"]),"function"==typeof t){var A=v(t);S=" [Function"+(E=A?": "+A:"")+"]"}if(l(t)&&(S=" "+RegExp.prototype.toString.call(t)),d(t)&&(S=" "+Date.prototype.toUTCString.call(t)),h(t))return a(t);if(0===j.length&&(!_||0==t.length))return O[0]+S+O[1];if(r<0)return l(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var N;return N=_?s(e,t,r,x,j):j.map(function(n){return c(e,t,r,x,n,_)}),e.seen.pop(),u(N,S,O)}function i(e,t){switch(typeof t){case"undefined":return e.stylize("undefined","undefined");case"string":var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string");case"number":return 0===t&&1/t==-1/0?e.stylize("-0","number"):e.stylize(""+t,"number");case"boolean":return e.stylize(""+t,"boolean")}if(null===t)return e.stylize("null","null")}function a(e){return"["+Error.prototype.toString.call(e)+"]"}function s(e,t,n,r,o){for(var i=[],a=0,s=t.length;a-1&&(c=a?c.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+c.split("\n").map(function(e){return" "+e}).join("\n")):c=e.stylize("[Circular]","special")),void 0===s){if(a&&i.match(/^\d+$/))return c;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+c}function u(e,t,n){var r=0;return e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.length+1},0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function f(e){return Array.isArray(e)||"object"==typeof e&&"[object Array]"===p(e)}function l(e){return"object"==typeof e&&"[object RegExp]"===p(e)}function d(e){return"object"==typeof e&&"[object Date]"===p(e)}function h(e){return"object"==typeof e&&"[object Error]"===p(e)}function p(e){return Object.prototype.toString.call(e)}var v=e("./getName"),y=e("./getProperties"),g=e("./getEnumerableProperties");t.exports=r;var b=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName}},{"./getEnumerableProperties":16,"./getName":18,"./getProperties":21}],25:[function(e,t,n){var r=e("./inspect"),o=e("../config");t.exports=function(e){var t=r(e),n=Object.prototype.toString.call(e);if(o.truncateThreshold&&t.length>=o.truncateThreshold){if("[object Function]"===n)return e.name&&""!==e.name?"[Function: "+e.name+"]":"[Function]";if("[object Array]"===n)return"[ Array("+e.length+") ]";if("[object Object]"===n){var i=Object.keys(e);return"{ Object ("+(i.length>2?i.splice(0,2).join(", ")+", ...":i.join(", "))+") }"}return t}return t}},{"../config":5,"./inspect":24}],26:[function(e,t,n){t.exports=function(e,t,n,r){var o=e.__methods[t],i=o.chainingBehavior;o.chainingBehavior=function(){var e=r(i).call(this);return void 0===e?this:e};var a=o.method;o.method=function(){var e=n(a).apply(this,arguments);return void 0===e?this:e}}},{}],27:[function(e,t,n){t.exports=function(e,t,n){var r=e[t],o=function(){return this};r&&"function"==typeof r&&(o=r),e[t]=function(){var e=n(o).apply(this,arguments);return void 0===e?this:e}}},{}],28:[function(e,t,n){t.exports=function(e,t,n){var r=Object.getOwnPropertyDescriptor(e,t),o=function(){};r&&"function"==typeof r.get&&(o=r.get),Object.defineProperty(e,t,{get:function(){var e=n(o).call(this);return void 0===e?this:e},configurable:!0})}},{}],29:[function(e,t,n){var r=e("./flag");t.exports=function(e,t){var n=r(e,"negate"),o=t[0];return n?!o:o}},{"./flag":14}],30:[function(e,t,n){t.exports=function(e,t,n){var r=e.__flags||(e.__flags=Object.create(null));t.__flags||(t.__flags=Object.create(null)),n=3!==arguments.length||n;for(var o in r)(n||"object"!==o&&"ssfi"!==o&&"message"!=o)&&(t.__flags[o]=r[o])}},{}],31:[function(e,t,n){"use strict";function r(e){var t=void 0;t="string"==typeof e?[e]:e.raw;for(var n="",r=0;r=0;o--)if(s=i[o],!r(e[s],t[s],n))return!1;return!0}var p,v=e("type-detect");try{p=e("buffer").Buffer}catch(e){(p={}).isBuffer=function(){return!1}}t.exports=r},{buffer:void 0,"type-detect":38}],34:[function(e,t,n){(function(r){!function(e){if("object"==typeof n&&void 0!==t)t.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:this).localforage=e()}}(function(){return function t(n,r,o){function i(s,c){if(!r[s]){if(!n[s]){var u="function"==typeof e&&e;if(!c&&u)return u(s,!0);if(a)return a(s,!0);var f=new Error("Cannot find module '"+s+"'");throw f.code="MODULE_NOT_FOUND",f}var l=r[s]={exports:{}};n[s][0].call(l.exports,function(e){var t=n[s][1][e];return i(t||e)},l,l.exports,t,n,r,o)}return r[s].exports}for(var a="function"==typeof e&&e,s=0;s=43)}}).catch(function(){return!1})}function u(e){return"boolean"==typeof re?ie.resolve(re):c(e).then(function(e){return re=e})}function f(e){var t=oe[e.name],n={};n.promise=new ie(function(e){n.resolve=e}),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then(function(){return n.promise}):t.dbReady=n.promise}function l(e){var t=oe[e.name].deferredOperations.pop();t&&t.resolve()}function d(e,t){return new ie(function(n,r){if(e.db){if(!t)return n(e.db);f(e),e.db.close()}var o=[e.name];t&&o.push(e.version);var i=ne.open.apply(ne,o);t&&(i.onupgradeneeded=function(t){var n=i.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(ae)}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),i.onerror=function(e){e.preventDefault(),r(i.error)},i.onsuccess=function(){n(i.result),l(e)}})}function h(e){return d(e,!1)}function p(e){return d(e,!0)}function v(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.versione.db.version;if(r&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),o||n){if(n){var i=e.db.version+1;i>e.version&&(e.version=i)}return!0}return!1}function y(e){return new ie(function(t,n){var r=new FileReader;r.onerror=n,r.onloadend=function(n){var r=btoa(n.target.result||"");t({__local_forage_encoded_blob:!0,data:r,type:e.type})},r.readAsBinaryString(e)})}function g(e){return o([s(atob(e.data))],{type:e.type})}function b(e){return e&&e.__local_forage_encoded_blob}function m(e){var t=this,n=t._initReady().then(function(){var e=oe[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady});return a(n,e,e),n}function w(e){function t(){return ie.resolve()}var n=this,r={db:null};if(e)for(var o in e)r[o]=e[o];oe||(oe={});var i=oe[r.name];i||(i={forages:[],db:null,dbReady:null,deferredOperations:[]},oe[r.name]=i),i.forages.push(n),n._initReady||(n._initReady=n.ready,n.ready=m);for(var a=[],s=0;s>4,f[c++]=(15&r)<<4|o>>2,f[c++]=(3&o)<<6|63&i;return u}function M(e){var t,n=new Uint8Array(e),r="";for(t=0;t>2],r+=ue[(3&n[t])<<4|n[t+1]>>4],r+=ue[(15&n[t+1])<<2|n[t+2]>>6],r+=ue[63&n[t+2]];return n.length%3==2?r=r.substring(0,r.length-1)+"=":n.length%3==1&&(r=r.substring(0,r.length-2)+"=="),r}function I(e,t){var n="";if(e&&(n=Oe.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===Oe.call(e.buffer))){var r,o=de;e instanceof ArrayBuffer?(r=e,o+=pe):(r=e.buffer,"[object Int8Array]"===n?o+=ye:"[object Uint8Array]"===n?o+=ge:"[object Uint8ClampedArray]"===n?o+=be:"[object Int16Array]"===n?o+=me:"[object Uint16Array]"===n?o+=xe:"[object Int32Array]"===n?o+=we:"[object Uint32Array]"===n?o+=je:"[object Float32Array]"===n?o+=Ee:"[object Float64Array]"===n?o+=Se:t(new Error("Failed to get type for BinaryArray"))),t(o+M(r))}else if("[object Blob]"===n){var i=new FileReader;i.onload=function(){var n=fe+e.type+"~"+M(this.result);t(de+ve+n)},i.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(n){console.error("Couldn't convert value into a JSON string: ",e),t(null,n)}}function k(e){if(e.substring(0,he)!==de)return JSON.parse(e);var t,n=e.substring(_e),r=e.substring(he,_e);if(r===ve&&le.test(n)){var i=n.match(le);t=i[1],n=n.substring(i[0].length)}var a=P(n);switch(r){case pe:return a;case ve:return o([a],{type:t});case ye:return new Int8Array(a);case ge:return new Uint8Array(a);case be:return new Uint8ClampedArray(a);case me:return new Int16Array(a);case xe:return new Uint16Array(a);case we:return new Int32Array(a);case je:return new Uint32Array(a);case Ee:return new Float32Array(a);case Se:return new Float64Array(a);default:throw new Error("Unkown type: "+r)}}function T(e){var t=this,n={db:null};if(e)for(var r in e)n[r]="string"!=typeof e[r]?e[r].toString():e[r];var o=new ie(function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(e){return r(e)}n.db.transaction(function(o){o.executeSql("CREATE TABLE IF NOT EXISTS "+n.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],function(){t._dbInfo=n,e()},function(e,t){r(t)})})});return n.serializer=Ae,o}function C(e,t){var n=this;"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e));var r=new ie(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){n.executeSql("SELECT * FROM "+o.storeName+" WHERE key = ? LIMIT 1",[e],function(e,n){var r=n.rows.length?n.rows.item(0).value:null;r&&(r=o.serializer.deserialize(r)),t(r)},function(e,t){r(t)})})}).catch(r)});return i(r,t),r}function D(e,t){var n=this,r=new ie(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){n.executeSql("SELECT * FROM "+o.storeName,[],function(n,r){for(var i=r.rows,a=i.length,s=0;s0)return void i(L.apply(o,[e,s,n,r-1]));a(t)}})})}).catch(a)});return i(a,n),a}function R(e,t,n){return L.apply(this,[e,t,n,1])}function B(e,t){var n=this;"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e));var r=new ie(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){n.executeSql("DELETE FROM "+o.storeName+" WHERE key = ?",[e],function(){t()},function(e,t){r(t)})})}).catch(r)});return i(r,t),r}function q(e){var t=this,n=new ie(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){t.executeSql("DELETE FROM "+r.storeName,[],function(){e()},function(e,t){n(t)})})}).catch(n)});return i(n,e),n}function z(e){var t=this,n=new ie(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){t.executeSql("SELECT COUNT(key) as c FROM "+r.storeName,[],function(t,n){var r=n.rows.item(0).c;e(r)},function(e,t){n(t)})})}).catch(n)});return i(n,e),n}function F(e,t){var n=this,r=new ie(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){n.executeSql("SELECT key FROM "+o.storeName+" WHERE id = ? LIMIT 1",[e+1],function(e,n){var r=n.rows.length?n.rows.item(0).key:null;t(r)},function(e,t){r(t)})})}).catch(r)});return i(r,t),r}function U(e){var t=this,n=new ie(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){t.executeSql("SELECT key FROM "+r.storeName,[],function(t,n){for(var r=[],o=0;o=0;n--){var r=localStorage.key(n);0===r.indexOf(e)&&localStorage.removeItem(r)}});return i(n,e),n}function J(e,t){var n=this;"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e));var r=n.ready().then(function(){var t=n._dbInfo,r=localStorage.getItem(t.keyPrefix+e);return r&&(r=t.serializer.deserialize(r)),r});return i(r,t),r}function G(e,t){var n=this,r=n.ready().then(function(){for(var t=n._dbInfo,r=t.keyPrefix,o=r.length,i=localStorage.length,a=1,s=0;s num > 5);\n return overFive;`,tests:[{name:"Correct output",test:`assert.deepEqual(output, [8, 13, 21]) === undefined;`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 3 items",test:`assert.lengthOf(output, 3) === undefined;`},{name:`First item is 8`,test:`assert.deepEqual(output[0], 8) === undefined;`}]},{name:"Array.map()",time:10,prompt:`Return an array of 'numbers' array's square roots, using 'Array.map()' and 'Math.sqrt()'`,given:`const numbers = [25, 121, 169];\r`,answer:`const numbers = [25, 121, 169];\n const roots = numbers.map(num => Math.sqrt(num));\n return roots;`,tests:[{name:"Correct output",test:`assert.deepEqual(output, [5, 11, 13]) === undefined;`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 3 items",test:`assert.lengthOf(output, 3) === undefined;`},{name:`First item is 5`,test:`assert.deepEqual(output[0], 5) === undefined;`},{name:`Last item is 13`,test:`assert.deepEqual(output[output.length - 1], 13) === undefined;`}]},{name:"Array.every()",time:10,prompt:`Return object that returns whether each array contains all even numbers using Array.every().`,given:`const evenNumbers = [2, 4, 6, 8];\n const someOddNumbers = [2, 5, 6, 8];\n function isEven(element) {\n \n }\n return {\n evenNumbers: evenNumbers.,\n someOddNumbers: someOddNumbers.\n };`,answer:`const evenNumbers = [2, 4, 6, 8];\n const someOddNumbers = [2, 5, 6, 8];\n function isEven(element) {\n return element % 2 === 0\n }\n return {\n evenNumbers: evenNumbers.every(isEven),\n someOddNumbers: someOddNumbers.every(isEven)\n };`,tests:[{name:"Correct output",test:`assert.deepEqual(output, {\n evenNumbers: true,\n someOddNumbers: false\n }) === undefined;`},{name:"Returns an Object",test:`assert.isObject(output) === undefined;`},{name:"Object has 2 items",test:`assert.lengthOf(Object.keys(output), 2) === undefined;`},{name:`First value is true`,test:`assert.isTrue(output.evenNumbers) === undefined;`},{name:`Second value is false`,test:`assert.isFalse(output.someOddNumbers) === undefined;`}]},{name:"Array.some()",time:10,prompt:`Return 'Object' that returns whether each array contains some odd numbers using 'Array.some()'.`,given:`const evenNumbers = [2, 4, 6, 8];\n const someOddNumbers = [2, 4, 7, 8];\n function isOdd(element) {\n \n }\n return {\n evenNumbers: evenNumbers.,\n someOddNumbers: someOddNumbers.\n };`,answer:`const evenNumbers = [1, 3, 5, 7];\n const someOddNumbers = [1, 3, 6, 7];\n function isOdd(element) {\n return element % 2 !== 0;\n }\n return {\n evenNumbers: evenNumbers.some(isOdd),\n someOddNumbers: someOddNumbers.some(isOdd)\n };`,tests:[{name:"Correct output",test:`assert.deepEqual(output, {\n evenNumbers: false,\n someOddNumbers: true\n }) === undefined;`},{name:"Returns an Object",test:`assert.isObject(output) === undefined;`},{name:"Object has 2 items",test:`assert.lengthOf(Object.keys(output), 2) === undefined;`},{name:`First value is false`,test:`assert.isFalse(output.evenNumbers) === undefined;`},{name:`Second value is true`,test:`assert.isTrue(output.someOddNumbers) === undefined;`}]}]},{}],37:[function(e,t,n){t.exports=[{name:"Create Array",time:10,prompt:"Create and return an array that contains 'apple' and 'banana'",given:`const fruits = [];\rreturn fruits;`,answer:`const fruits = ['apple', 'banana'];\n return fruits;`,tests:[{name:"Correct output",test:`assert.deepEqual(output, ['apple', 'banana']) === undefined;`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 2 items",test:`assert.lengthOf(output, 2) === undefined;`}]},{name:"Array.pop()",time:10,prompt:`Remove 'orange' from the end of the 'fruits' array and return 'fruits'.`,given:`const fruits = ['apple', 'banana', 'orange'];\r`,answer:`const fruits = ['apple', 'banana', 'orange'];\n fruits.pop();\n return fruits;`,tests:[{name:"Correct output",test:`assert.deepEqual(output, ['apple', 'banana']) === undefined;`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 2 items",test:`assert.lengthOf(output, 2) === undefined;`}]}]},{}],38:[function(e,t,n){t.exports=e("./lib/type")},{"./lib/type":39}],39:[function(e,t,n){function r(e){var t=Object.prototype.toString.call(e);return i[t]?i[t]:null===e?"null":void 0===e?"undefined":e===Object(e)?"object":typeof e}function o(){this.tests={}}var i={"[object Array]":"array","[object RegExp]":"regexp","[object Function]":"function","[object Arguments]":"arguments","[object Date]":"date"};(t.exports=r).Library=o,o.prototype.of=r,o.prototype.define=function(e,t){return 1===arguments.length?this.tests[e]:(this.tests[e]=t,this)},o.prototype.test=function(e,t){if(t===r(e))return!0;var n=this.tests[t];if(n&&"regexp"===r(n))return n.test(e);if(n&&"function"===r(n))return n(e);throw new ReferenceError('Type test "'+t+'" not defined or invalid.')}},{}],40:[function(e,t,n){arguments[4][38][0].apply(n,arguments)},{"./lib/type":41,dup:38}],41:[function(e,t,n){function r(e){var t=Object.prototype.toString.call(e).match(i)[1].toLowerCase();return"function"==typeof Promise&&e instanceof Promise?"promise":null===e?"null":void 0===e?"undefined":t}function o(){if(!(this instanceof o))return new o;this.tests={}}var i=/^\[object (.*)\]$/;(t.exports=r).Library=o,o.prototype.of=r,o.prototype.define=function(e,t){return 1===arguments.length?this.tests[e]:(this.tests[e]=t,this)},o.prototype.test=function(e,t){if(t===r(e))return!0;var n=this.tests[t];if(n&&"regexp"===r(n))return n.test(e);if(n&&"function"===r(n))return n(e);throw new ReferenceError('Type test "'+t+'" not defined or invalid.')}},{}],42:[function(require,module,exports){"use strict";function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t=e.length-1||t<0?0:t+1}function getCurrentProblem(e){return e[config.currentIndex]}function previousProblem(){console.log("previousProblem!"),previousProblemButtonEl.classList.add("active"),config.currentIndex=config.shuffle?getRandomIndex(problems):getPreviousIndex(problems),updateLocalstore(config).then(function(){window.location.reload()})}function nextProblem(){console.log("nextProblem!"),nextProblemButtonEl.classList.add("active"),config.currentIndex=config.shuffle?getRandomIndex(problems):getNextIndex(problems),updateLocalstore(config).then(function(){window.location.reload()})}function toggleShuffle(){console.log("toggle shuffle!"),config.shuffle=!config.shuffle,shuffleProblemsButtonEl.classList.toggle("active"),previousProblemButtonEl.parentNode.classList.toggle("hidden"),updateLocalstore(config)}function loadProblem(e){currentProblem=e,problemEl.innerText=e.prompt,e.given&&(codeEl.value=e.given),testSuite(null,!0)}function updateTests(e,t){!0===t&&buildTests(currentProblem.tests),updateTestStatus(e)}function buildTests(e){if(e){var t=e.map(function(e){return'
\n
[✘]
\n
'+e.name+"
\n
"}).join("");testSuiteEl.innerHTML=t}}function updateTestStatus(e){if(!e)throw new Error("No testStatuses provided.");var t=!0;e.forEach(function(e){!0!==e&&(t=!1)}),[].slice.call(testSuiteEl.querySelectorAll(".test-state")).forEach(function(t,n){!0===e[n]?(t.innerHTML="[✓]",t.classList.remove("fail"),t.classList.add("pass")):(t.innerHTML="[✘]",t.classList.remove("pass"),t.classList.add("fail"))}),!0===t?(testTotalEl.innerText="PASS",testTotalEl.classList.remove("fail"),testTotalEl.classList.add("pass")):(testTotalEl.innerText="FAIL",testTotalEl.classList.remove("pass"),testTotalEl.classList.add("fail"))}function printAssertError(e){var t="";null!==e&&(t='\n
\n Expected: '+JSON.stringify(e.expected)+"\n Actual: "+JSON.stringify(e.actual)+"\n
"),assertConsoleEl.innerHTML=t}function printEvalOutput(e,t){var n="";e&&void 0!==e.message?n='\n
\n Syntax Error: '+JSON.stringify(e.message)+"\n
":t&&(n='\n
\n Output: '+JSON.stringify(t)+"\n
"),evalConsoleEl.innerHTML=n}function testSuite(e){testTotalEl.classList.toggle("working");var t=runTests(getOutput(codeEl.value));testTotalEl.classList.toggle("working"),updateTests(t,e)}function getOutput(code){var evald=!1;try{evald=eval("(function(){"+code+"})()"),printEvalOutput(null,evald)}catch(e){printEvalOutput(e)}return evald}function runTests(output){var tested=!1;return tested=currentProblem.tests.map(function(test){var testOutcome=!1;try{output&&(testOutcome=eval(test.test)),printAssertError(null)}catch(e){printAssertError(e)}return testOutcome})}function loadApp(e){function t(t){!1===e.shuffle&&13===t.keyCode&&t.shiftKey&&(t.metaKey||t.ctrlKey)?previousProblem():13!==t.keyCode||t.shiftKey||!t.metaKey&&!t.ctrlKey||nextProblem()}console.log("loading app!"),!0===e.shuffle&&(shuffleProblemsButtonEl.classList.add("active"),previousProblemButtonEl.parentNode.classList.add("hidden"));var n=debounce(function(e){-1===ignoreKeyCodes.indexOf(e.keyCode)&&testSuite()},200);codeEl.addEventListener("keydown",n),document.addEventListener("keydown",t),shuffleProblemsButtonEl.addEventListener("click",toggleShuffle),previousProblemButtonEl.addEventListener("click",previousProblem),nextProblemButtonEl.addEventListener("click",nextProblem),loadProblem(getCurrentProblem(problems)),testSuite(!0)}var localforage=require("localforage"),probs=require("pjs-problems"),dedent=require("dedent"),assert=require("chai").assert,problems=[];Object.keys(probs).forEach(function(e){var t;(t=problems).push.apply(t,_toConsumableArray(probs[e]))}),problems=dedentStrings(problems);var currentProblem=void 0,ignoreKeyCodes=[9,37,39,38,40],config={shuffle:!0,timer:!1,currentIndex:0};localforage.getItem("js_practice_config").then(function(e){e&&(config=e),loadApp(config)}).catch(function(e){console.log("localforage err:",e),loadApp(config)});var problemEl=document.getElementById("problem"),codeEl=document.getElementById("code"),testSuiteEl=document.getElementById("test-suite"),testTotalEl=document.getElementById("test-total"),evalConsoleEl=document.getElementById("eval-output"),assertConsoleEl=document.getElementById("assert-output"),shuffleProblemsButtonEl=document.getElementById("shuffle-problems"),previousProblemButtonEl=document.getElementById("prev-problem"),nextProblemButtonEl=document.getElementById("next-problem")}(document,window)},{chai:2,dedent:31,localforage:34,"pjs-problems":35}]},{},[42]); +!function e(t,n,o){function r(i,a){if(!n[i]){if(!t[i]){var c="function"==typeof require&&require;if(!a&&c)return c(i,!0);if(s)return s(i,!0);var u=new Error("Cannot find module '"+i+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[i]={exports:{}};t[i][0].call(l.exports,function(e){var n=t[i][1][e];return r(n||e)},l,l.exports,e,t,n,o)}return n[i].exports}for(var s="function"==typeof require&&require,i=0;ie,"expected #{this} to have a length above #{exp} but got #{act}","expected #{this} to not have a length above #{exp}",e,o)}else this.assert(n>e,"expected #{this} to be above "+e,"expected #{this} to be at most "+e)}function u(e,t){t&&N(this,"message",t);var n=N(this,"object");if(N(this,"doLength")){new S(n,t).to.have.property("length");var o=n.length;this.assert(o>=e,"expected #{this} to have a length at least #{exp} but got #{act}","expected #{this} to have a length below #{exp}",e,o)}else this.assert(n>=e,"expected #{this} to be at least "+e,"expected #{this} to be below "+e)}function l(e,t){t&&N(this,"message",t);var n=N(this,"object");if(N(this,"doLength")){new S(n,t).to.have.property("length");var o=n.length;this.assert(o1)throw new Error(s);break;case"object":if(arguments.length>1)throw new Error(s);e=Object.keys(e);break;default:e=Array.prototype.slice.call(arguments)}if(!e.length)throw new Error("keys required");var i=Object.keys(o),a=e,c=e.length,u=N(this,"any"),l=N(this,"all");if(u||l||(l=!0),u&&(r=a.filter(function(e){return~i.indexOf(e)}).length>0),l&&(r=e.every(function(e){return~i.indexOf(e)}),N(this,"negate")||N(this,"contains")||(r=r&&e.length==i.length)),c>1){var p=(e=e.map(function(e){return t.inspect(e)})).pop();l&&(n=e.join(", ")+", and "+p),u&&(n=e.join(", ")+", or "+p)}else n=t.inspect(e[0]);n=(c>1?"keys ":"key ")+n,n=(N(this,"contains")?"contain ":"have ")+n,this.assert(r,"expected #{this} to "+n,"expected #{this} to not "+n,a.slice(0).sort(),i.sort(),!0)}function v(e,n,o){o&&N(this,"message",o);var r=N(this,"object");new S(r,o).is.a("function");var s=!1,i=null,a=null,c=null;0===arguments.length?(n=null,e=null):e&&(e instanceof RegExp||"string"==typeof e)?(n=e,e=null):e&&e instanceof Error?(i=e,e=null,n=null):"function"==typeof e?(!(a=e.prototype.name)||"Error"===a&&e!==Error)&&(a=e.name||(new e).name):e=null;try{r()}catch(o){if(i)return this.assert(o===i,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}",i instanceof Error?i.toString():i,o instanceof Error?o.toString():o),N(this,"object",o),this;if(e&&(this.assert(o instanceof e,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp} but #{act} was thrown",a,o instanceof Error?o.toString():o),!n))return N(this,"object",o),this;var u="error"===t.type(o)&&"message"in o?o.message:""+o;if(null!=u&&n&&n instanceof RegExp)return this.assert(n.exec(u),"expected #{this} to throw error matching #{exp} but got #{act}","expected #{this} to throw error not matching #{exp}",n,u),N(this,"object",o),this;if(null!=u&&n&&"string"==typeof n)return this.assert(~u.indexOf(n),"expected #{this} to throw error including #{exp} but got #{act}","expected #{this} to throw error not including #{act}",n,u),N(this,"object",o),this;s=!0,c=o}var l="",p=null!==a?a:i?"#{exp}":"an error";s&&(l=" but #{act} was thrown"),this.assert(!0===s,"expected #{this} to throw "+p+l,"expected #{this} to not throw "+p+l,i instanceof Error?i.toString():i,c instanceof Error?c.toString():c),N(this,"object",c)}function w(e,n){n&&N(this,"message",n);var o=N(this,"object"),r=N(this,"itself"),s="function"!==t.type(o)||r?o[e]:o.prototype[e];this.assert("function"==typeof s,"expected #{this} to respond to "+t.inspect(e),"expected #{this} to not respond to "+t.inspect(e))}function x(e,n){n&&N(this,"message",n);var o=e(N(this,"object"));this.assert(o,"expected #{this} to satisfy "+t.objDisplay(e),"expected #{this} to not satisfy"+t.objDisplay(e),!this.negate,o)}function j(e,n,o){o&&N(this,"message",o);var r=N(this,"object");if(new S(r,o).is.a("number"),"number"!==t.type(e)||"number"!==t.type(n))throw new Error("the arguments to closeTo or approximately must be numbers");this.assert(Math.abs(r-e)<=n,"expected #{this} to be close to "+e+" +/- "+n,"expected #{this} not to be close to "+e+" +/- "+n)}function E(e,t,n){return e.every(function(e){return n?t.some(function(t){return n(e,t)}):-1!==t.indexOf(e)})}function O(e,t){t&&N(this,"message",t);var n=N(this,"object");new S(e).to.be.an("array"),this.assert(e.indexOf(n)>-1,"expected #{this} to be one of #{exp}","expected #{this} to not be one of #{exp}",e,n)}function A(e,t,n){n&&N(this,"message",n);var o=N(this,"object");new S(e,n).to.have.property(t),new S(o).is.a("function");var r=e[t];o(),this.assert(r!==e[t],"expected ."+t+" to change","expected ."+t+" to not change")}function P(e,t,n){n&&N(this,"message",n);var o=N(this,"object");new S(e,n).to.have.property(t),new S(o).is.a("function");var r=e[t];o(),this.assert(e[t]-r>0,"expected ."+t+" to increase","expected ."+t+" to not increase")}function M(e,t,n){n&&N(this,"message",n);var o=N(this,"object");new S(e,n).to.have.property(t),new S(o).is.a("function");var r=e[t];o(),this.assert(e[t]-r<0,"expected ."+t+" to decrease","expected ."+t+" to not decrease")}var S=e.Assertion,N=(Object.prototype.toString,t.flag);["to","be","been","is","and","has","have","with","that","which","at","of","same"].forEach(function(e){S.addProperty(e,function(){return this})}),S.addProperty("not",function(){N(this,"negate",!0)}),S.addProperty("deep",function(){N(this,"deep",!0)}),S.addProperty("any",function(){N(this,"any",!0),N(this,"all",!1)}),S.addProperty("all",function(){N(this,"all",!0),N(this,"any",!1)}),S.addChainableMethod("an",n),S.addChainableMethod("a",n),S.addChainableMethod("include",r,o),S.addChainableMethod("contain",r,o),S.addChainableMethod("contains",r,o),S.addChainableMethod("includes",r,o),S.addProperty("ok",function(){this.assert(N(this,"object"),"expected #{this} to be truthy","expected #{this} to be falsy")}),S.addProperty("true",function(){this.assert(!0===N(this,"object"),"expected #{this} to be true","expected #{this} to be false",!this.negate)}),S.addProperty("false",function(){this.assert(!1===N(this,"object"),"expected #{this} to be false","expected #{this} to be true",!!this.negate)}),S.addProperty("null",function(){this.assert(null===N(this,"object"),"expected #{this} to be null","expected #{this} not to be null")}),S.addProperty("undefined",function(){this.assert(void 0===N(this,"object"),"expected #{this} to be undefined","expected #{this} not to be undefined")}),S.addProperty("NaN",function(){this.assert(isNaN(N(this,"object")),"expected #{this} to be NaN","expected #{this} not to be NaN")}),S.addProperty("exist",function(){this.assert(null!=N(this,"object"),"expected #{this} to exist","expected #{this} to not exist")}),S.addProperty("empty",function(){var e=N(this,"object"),t=e;Array.isArray(e)||"string"==typeof object?t=e.length:"object"==typeof e&&(t=Object.keys(e).length),this.assert(!t,"expected #{this} to be empty","expected #{this} not to be empty")}),S.addProperty("arguments",s),S.addProperty("Arguments",s),S.addMethod("equal",i),S.addMethod("equals",i),S.addMethod("eq",i),S.addMethod("eql",a),S.addMethod("eqls",a),S.addMethod("above",c),S.addMethod("gt",c),S.addMethod("greaterThan",c),S.addMethod("least",u),S.addMethod("gte",u),S.addMethod("below",l),S.addMethod("lt",l),S.addMethod("lessThan",l),S.addMethod("most",p),S.addMethod("lte",p),S.addMethod("within",function(e,t,n){n&&N(this,"message",n);var o=N(this,"object"),r=e+".."+t;if(N(this,"doLength")){new S(o,n).to.have.property("length");var s=o.length;this.assert(s>=e&&s<=t,"expected #{this} to have a length within "+r,"expected #{this} to not have a length within "+r)}else this.assert(o>=e&&o<=t,"expected #{this} to be within "+r,"expected #{this} to not be within "+r)}),S.addMethod("instanceof",h),S.addMethod("instanceOf",h),S.addMethod("property",function(e,n,o){o&&N(this,"message",o);var r=!!N(this,"deep"),s=r?"deep property ":"property ",i=N(this,"negate"),a=N(this,"object"),c=r?t.getPathInfo(e,a):null,u=r?c.exists:t.hasProperty(e,a),l=r?c.value:a[e];if(i&&arguments.length>1){if(void 0===l)throw o=null!=o?o+": ":"",new Error(o+t.inspect(a)+" has no "+s+t.inspect(e))}else this.assert(u,"expected #{this} to have a "+s+t.inspect(e),"expected #{this} to not have "+s+t.inspect(e));arguments.length>1&&this.assert(n===l,"expected #{this} to have a "+s+t.inspect(e)+" of #{exp}, but got #{act}","expected #{this} to not have a "+s+t.inspect(e)+" of #{act}",n,l),N(this,"object",l)}),S.addMethod("ownProperty",f),S.addMethod("haveOwnProperty",f),S.addMethod("ownPropertyDescriptor",d),S.addMethod("haveOwnPropertyDescriptor",d),S.addChainableMethod("length",b,g),S.addMethod("lengthOf",b),S.addMethod("match",m),S.addMethod("matches",m),S.addMethod("string",function(e,n){n&&N(this,"message",n);var o=N(this,"object");new S(o,n).is.a("string"),this.assert(~o.indexOf(e),"expected #{this} to contain "+t.inspect(e),"expected #{this} to not contain "+t.inspect(e))}),S.addMethod("keys",y),S.addMethod("key",y),S.addMethod("throw",v),S.addMethod("throws",v),S.addMethod("Throw",v),S.addMethod("respondTo",w),S.addMethod("respondsTo",w),S.addProperty("itself",function(){N(this,"itself",!0)}),S.addMethod("satisfy",x),S.addMethod("satisfies",x),S.addMethod("closeTo",j),S.addMethod("approximately",j),S.addMethod("members",function(e,n){n&&N(this,"message",n);var o=N(this,"object");new S(o).to.be.an("array"),new S(e).to.be.an("array");var r=N(this,"deep")?t.eql:void 0;if(N(this,"contains"))return this.assert(E(e,o,r),"expected #{this} to be a superset of #{act}","expected #{this} to not be a superset of #{act}",o,e);this.assert(E(o,e,r)&&E(e,o,r),"expected #{this} to have the same members as #{act}","expected #{this} to not have the same members as #{act}",o,e)}),S.addMethod("oneOf",O),S.addChainableMethod("change",A),S.addChainableMethod("changes",A),S.addChainableMethod("increase",P),S.addChainableMethod("increases",P),S.addChainableMethod("decrease",M),S.addChainableMethod("decreases",M),S.addProperty("extensible",function(){var e,t=N(this,"object");try{e=Object.isExtensible(t)}catch(t){if(!(t instanceof TypeError))throw t;e=!1}this.assert(e,"expected #{this} to be extensible","expected #{this} to not be extensible")}),S.addProperty("sealed",function(){var e,t=N(this,"object");try{e=Object.isSealed(t)}catch(t){if(!(t instanceof TypeError))throw t;e=!0}this.assert(e,"expected #{this} to be sealed","expected #{this} to not be sealed")}),S.addProperty("frozen",function(){var e,t=N(this,"object");try{e=Object.isFrozen(t)}catch(t){if(!(t instanceof TypeError))throw t;e=!0}this.assert(e,"expected #{this} to be frozen","expected #{this} to not be frozen")})}},{}],7:[function(e,t,n){t.exports=function(e,t){var n=e.Assertion,o=t.flag,r=e.assert=function(t,o){new n(null,null,e.assert).assert(t,o,"[ negation message unavailable ]")};r.fail=function(t,n,o,s){throw o=o||"assert.fail()",new e.AssertionError(o,{actual:t,expected:n,operator:s},r.fail)},r.isOk=function(e,t){new n(e,t).is.ok},r.isNotOk=function(e,t){new n(e,t).is.not.ok},r.equal=function(e,t,s){var i=new n(e,s,r.equal);i.assert(t==o(i,"object"),"expected #{this} to equal #{exp}","expected #{this} to not equal #{act}",t,e)},r.notEqual=function(e,t,s){var i=new n(e,s,r.notEqual);i.assert(t!=o(i,"object"),"expected #{this} to not equal #{exp}","expected #{this} to equal #{act}",t,e)},r.strictEqual=function(e,t,o){new n(e,o).to.equal(t)},r.notStrictEqual=function(e,t,o){new n(e,o).to.not.equal(t)},r.deepEqual=function(e,t,o){new n(e,o).to.eql(t)},r.notDeepEqual=function(e,t,o){new n(e,o).to.not.eql(t)},r.isAbove=function(e,t,o){new n(e,o).to.be.above(t)},r.isAtLeast=function(e,t,o){new n(e,o).to.be.least(t)},r.isBelow=function(e,t,o){new n(e,o).to.be.below(t)},r.isAtMost=function(e,t,o){new n(e,o).to.be.most(t)},r.isTrue=function(e,t){new n(e,t).is.true},r.isNotTrue=function(e,t){new n(e,t).to.not.equal(!0)},r.isFalse=function(e,t){new n(e,t).is.false},r.isNotFalse=function(e,t){new n(e,t).to.not.equal(!1)},r.isNull=function(e,t){new n(e,t).to.equal(null)},r.isNotNull=function(e,t){new n(e,t).to.not.equal(null)},r.isNaN=function(e,t){new n(e,t).to.be.NaN},r.isNotNaN=function(e,t){new n(e,t).not.to.be.NaN},r.isUndefined=function(e,t){new n(e,t).to.equal(void 0)},r.isDefined=function(e,t){new n(e,t).to.not.equal(void 0)},r.isFunction=function(e,t){new n(e,t).to.be.a("function")},r.isNotFunction=function(e,t){new n(e,t).to.not.be.a("function")},r.isObject=function(e,t){new n(e,t).to.be.a("object")},r.isNotObject=function(e,t){new n(e,t).to.not.be.a("object")},r.isArray=function(e,t){new n(e,t).to.be.an("array")},r.isNotArray=function(e,t){new n(e,t).to.not.be.an("array")},r.isString=function(e,t){new n(e,t).to.be.a("string")},r.isNotString=function(e,t){new n(e,t).to.not.be.a("string")},r.isNumber=function(e,t){new n(e,t).to.be.a("number")},r.isNotNumber=function(e,t){new n(e,t).to.not.be.a("number")},r.isBoolean=function(e,t){new n(e,t).to.be.a("boolean")},r.isNotBoolean=function(e,t){new n(e,t).to.not.be.a("boolean")},r.typeOf=function(e,t,o){new n(e,o).to.be.a(t)},r.notTypeOf=function(e,t,o){new n(e,o).to.not.be.a(t)},r.instanceOf=function(e,t,o){new n(e,o).to.be.instanceOf(t)},r.notInstanceOf=function(e,t,o){new n(e,o).to.not.be.instanceOf(t)},r.include=function(e,t,o){new n(e,o,r.include).include(t)},r.notInclude=function(e,t,o){new n(e,o,r.notInclude).not.include(t)},r.match=function(e,t,o){new n(e,o).to.match(t)},r.notMatch=function(e,t,o){new n(e,o).to.not.match(t)},r.property=function(e,t,o){new n(e,o).to.have.property(t)},r.notProperty=function(e,t,o){new n(e,o).to.not.have.property(t)},r.deepProperty=function(e,t,o){new n(e,o).to.have.deep.property(t)},r.notDeepProperty=function(e,t,o){new n(e,o).to.not.have.deep.property(t)},r.propertyVal=function(e,t,o,r){new n(e,r).to.have.property(t,o)},r.propertyNotVal=function(e,t,o,r){new n(e,r).to.not.have.property(t,o)},r.deepPropertyVal=function(e,t,o,r){new n(e,r).to.have.deep.property(t,o)},r.deepPropertyNotVal=function(e,t,o,r){new n(e,r).to.not.have.deep.property(t,o)},r.lengthOf=function(e,t,o){new n(e,o).to.have.length(t)},r.throws=function(e,t,r,s){("string"==typeof t||t instanceof RegExp)&&(r=t,t=null);var i=new n(e,s).to.throw(t,r);return o(i,"object")},r.doesNotThrow=function(e,t,o){"string"==typeof t&&(o=t,t=null),new n(e,o).to.not.Throw(t)},r.operator=function(e,r,s,i){var a;switch(r){case"==":a=e==s;break;case"===":a=e===s;break;case">":a=e>s;break;case">=":a=e>=s;break;case"<":a=e1&&n===t.length-1?"or ":"")+o+" "+e}).join(", ");if(!t.some(function(t){return s(e)===t}))throw new o("object tested must be "+n+", but "+s(e)+" given")}},{"./flag":14,"assertion-error":1,"type-detect":39}],14:[function(e,t,n){t.exports=function(e,t,n){var o=e.__flags||(e.__flags=Object.create(null));if(3!==arguments.length)return o[t];o[t]=n}},{}],15:[function(e,t,n){t.exports=function(e,t){return t.length>4?t[4]:e._obj}},{}],16:[function(e,t,n){t.exports=function(e){var t=[];for(var n in e)t.push(n);return t}},{}],17:[function(e,t,n){var o=e("./flag"),r=e("./getActual"),s=(e("./inspect"),e("./objDisplay"));t.exports=function(e,t){var n=o(e,"negate"),i=o(e,"object"),a=t[3],c=r(e,t),u=n?t[2]:t[1],l=o(e,"message");return"function"==typeof u&&(u=u()),u=u||"",u=u.replace(/#\{this\}/g,function(){return s(i)}).replace(/#\{act\}/g,function(){return s(c)}).replace(/#\{exp\}/g,function(){return s(a)}),l?l+": "+u:u}},{"./flag":14,"./getActual":15,"./inspect":24,"./objDisplay":25}],18:[function(e,t,n){t.exports=function(e){if(e.name)return e.name;var t=/^\s?function ([^(]*)\(/.exec(e);return t&&t[1]?t[1]:""}},{}],19:[function(e,t,n){function o(e){return e.replace(/([^\\])\[/g,"$1.[").match(/(\\\.|[^.]+?)+/g).map(function(e){var t=/^\[(\d+)\]$/.exec(e);return t?{i:parseFloat(t[1])}:{p:e.replace(/\\([.\[\]])/g,"$1")}})}function r(e,t,n){for(var o,r=t,s=0,i=n=void 0===n?e.length:n;s1?r(n,t,n.length-1):t,name:i.p||i.i,value:r(n,t)};return a.exists=s(a.name,a.parent),a}},{"./hasProperty":22}],20:[function(e,t,n){var o=e("./getPathInfo");t.exports=function(e,t){return o(e,t).value}},{"./getPathInfo":19}],21:[function(e,t,n){t.exports=function(e){function t(e){-1===n.indexOf(e)&&n.push(e)}for(var n=Object.getOwnPropertyNames(e),o=Object.getPrototypeOf(e);null!==o;)Object.getOwnPropertyNames(o).forEach(t),o=Object.getPrototypeOf(o);return n}},{}],22:[function(e,t,n){var o=e("type-detect"),r={number:Number,string:String};t.exports=function(e,t){var n=o(t);return"null"!==n&&"undefined"!==n&&(r[n]&&"object"!=typeof t&&(t=new r[n](t)),e in t)}},{"type-detect":39}],23:[function(e,t,n){(n=t.exports={}).test=e("./test"),n.type=e("type-detect"),n.expectTypes=e("./expectTypes"),n.getMessage=e("./getMessage"),n.getActual=e("./getActual"),n.inspect=e("./inspect"),n.objDisplay=e("./objDisplay"),n.flag=e("./flag"),n.transferFlags=e("./transferFlags"),n.eql=e("deep-eql"),n.getPathValue=e("./getPathValue"),n.getPathInfo=e("./getPathInfo"),n.hasProperty=e("./hasProperty"),n.getName=e("./getName"),n.addProperty=e("./addProperty"),n.addMethod=e("./addMethod"),n.overwriteProperty=e("./overwriteProperty"),n.overwriteMethod=e("./overwriteMethod"),n.addChainableMethod=e("./addChainableMethod"),n.overwriteChainableMethod=e("./overwriteChainableMethod")},{"./addChainableMethod":10,"./addMethod":11,"./addProperty":12,"./expectTypes":13,"./flag":14,"./getActual":15,"./getMessage":17,"./getName":18,"./getPathInfo":19,"./getPathValue":20,"./hasProperty":22,"./inspect":24,"./objDisplay":25,"./overwriteChainableMethod":26,"./overwriteMethod":27,"./overwriteProperty":28,"./test":29,"./transferFlags":30,"deep-eql":32,"type-detect":39}],24:[function(e,t,n){function o(e,t,n,o){return r({showHidden:t,seen:[],stylize:function(e){return e}},e,void 0===n?2:n)}function r(e,t,o){if(t&&"function"==typeof t.inspect&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var d=t.inspect(o);return"string"!=typeof d&&(d=r(e,d,o)),d}var v=s(e,t);if(v)return v;if(y(t)){if("outerHTML"in t)return t.outerHTML;try{if(document.xmlVersion)return(new XMLSerializer).serializeToString(t);var w=document.createElementNS("http://www.w3.org/1999/xhtml","_");return w.appendChild(t.cloneNode(!1)),html=w.innerHTML.replace("><",">"+t.innerHTML+"<"),w.innerHTML="",html}catch(e){}}var x=m(t),j=e.showHidden?b(t):x;if(0===j.length||f(t)&&(1===j.length&&"stack"===j[0]||2===j.length&&"description"===j[0]&&"stack"===j[1])){if("function"==typeof t){var E=(M=g(t))?": "+M:"";return e.stylize("[Function"+E+"]","special")}if(p(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(h(t))return e.stylize(Date.prototype.toUTCString.call(t),"date");if(f(t))return i(t)}var O="",A=!1,P=["{","}"];if(l(t)&&(A=!0,P=["[","]"]),"function"==typeof t){var M=g(t);O=" [Function"+(E=M?": "+M:"")+"]"}if(p(t)&&(O=" "+RegExp.prototype.toString.call(t)),h(t)&&(O=" "+Date.prototype.toUTCString.call(t)),f(t))return i(t);if(0===j.length&&(!A||0==t.length))return P[0]+O+P[1];if(o<0)return p(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var S;return S=A?a(e,t,o,x,j):j.map(function(n){return c(e,t,o,x,n,A)}),e.seen.pop(),u(S,O,P)}function s(e,t){switch(typeof t){case"undefined":return e.stylize("undefined","undefined");case"string":var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string");case"number":return 0===t&&1/t==-1/0?e.stylize("-0","number"):e.stylize(""+t,"number");case"boolean":return e.stylize(""+t,"boolean")}if(null===t)return e.stylize("null","null")}function i(e){return"["+Error.prototype.toString.call(e)+"]"}function a(e,t,n,o,r){for(var s=[],i=0,a=t.length;i-1&&(c=i?c.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+c.split("\n").map(function(e){return" "+e}).join("\n")):c=e.stylize("[Circular]","special")),void 0===a){if(i&&s.match(/^\d+$/))return c;(a=JSON.stringify(""+s)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+c}function u(e,t,n){var o=0;return e.reduce(function(e,t){return o++,t.indexOf("\n")>=0&&o++,e+t.length+1},0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function l(e){return Array.isArray(e)||"object"==typeof e&&"[object Array]"===d(e)}function p(e){return"object"==typeof e&&"[object RegExp]"===d(e)}function h(e){return"object"==typeof e&&"[object Date]"===d(e)}function f(e){return"object"==typeof e&&"[object Error]"===d(e)}function d(e){return Object.prototype.toString.call(e)}var g=e("./getName"),b=e("./getProperties"),m=e("./getEnumerableProperties");t.exports=o;var y=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName}},{"./getEnumerableProperties":16,"./getName":18,"./getProperties":21}],25:[function(e,t,n){var o=e("./inspect"),r=e("../config");t.exports=function(e){var t=o(e),n=Object.prototype.toString.call(e);if(r.truncateThreshold&&t.length>=r.truncateThreshold){if("[object Function]"===n)return e.name&&""!==e.name?"[Function: "+e.name+"]":"[Function]";if("[object Array]"===n)return"[ Array("+e.length+") ]";if("[object Object]"===n){var s=Object.keys(e);return"{ Object ("+(s.length>2?s.splice(0,2).join(", ")+", ...":s.join(", "))+") }"}return t}return t}},{"../config":5,"./inspect":24}],26:[function(e,t,n){t.exports=function(e,t,n,o){var r=e.__methods[t],s=r.chainingBehavior;r.chainingBehavior=function(){var e=o(s).call(this);return void 0===e?this:e};var i=r.method;r.method=function(){var e=n(i).apply(this,arguments);return void 0===e?this:e}}},{}],27:[function(e,t,n){t.exports=function(e,t,n){var o=e[t],r=function(){return this};o&&"function"==typeof o&&(r=o),e[t]=function(){var e=n(r).apply(this,arguments);return void 0===e?this:e}}},{}],28:[function(e,t,n){t.exports=function(e,t,n){var o=Object.getOwnPropertyDescriptor(e,t),r=function(){};o&&"function"==typeof o.get&&(r=o.get),Object.defineProperty(e,t,{get:function(){var e=n(r).call(this);return void 0===e?this:e},configurable:!0})}},{}],29:[function(e,t,n){var o=e("./flag");t.exports=function(e,t){var n=o(e,"negate"),r=t[0];return n?!r:r}},{"./flag":14}],30:[function(e,t,n){t.exports=function(e,t,n){var o=e.__flags||(e.__flags=Object.create(null));t.__flags||(t.__flags=Object.create(null)),n=3!==arguments.length||n;for(var r in o)(n||"object"!==r&&"ssfi"!==r&&"message"!=r)&&(t.__flags[r]=o[r])}},{}],31:[function(e,t,n){"use strict";function o(e){var t=void 0;t="string"==typeof e?[e]:e.raw;for(var n="",o=0;o=0;r--)if(a=s[r],!o(e[a],t[a],n))return!1;return!0}var d,g=e("type-detect");try{d=e("buffer").Buffer}catch(e){(d={}).isBuffer=function(){return!1}}t.exports=o},{buffer:void 0,"type-detect":37}],34:[function(e,t,n){const o=e("./problems/initial"),r=e("./problems/arrays");t.exports={initial:o,arrays:r}},{"./problems/arrays":35,"./problems/initial":36}],35:[function(e,t,n){t.exports=[{name:"Access Array by index (first)",time:10,prompt:"Return the first value of the Array",given:`const fruits = ['apple', 'banana'];\r`,answer:`const fruits = ['apple', 'banana'];\n return fruits[0];`,tests:[{name:"Correct output",test:"assert.deepEqual(output, 'apple') === undefined"},{name:"Returns a String",test:"assert.isString(output) === undefined"}]},{name:"Access Array by index (last)",time:10,prompt:"Return the last value of the Array",given:`const fruits = ['apple', 'banana', 'orange'];\r`,answer:`const fruits = ['apple', 'banana', 'orange'];\n return fruits[fruits.length - 1];`,tests:[{name:"Correct output",test:`assert.deepEqual(output, 'orange') === undefined;`},{name:"Returns a String",test:`assert.isString(output) === undefined;`}]},{name:"Access Array by index (second)",time:10,prompt:"Return the second value of the Array",given:`const fruits = ['apple', 'banana'];\r`,answer:`const fruits = ['apple', 'banana'];\n return fruits[1];`,tests:[{name:"Correct output",test:`assert.deepEqual(output, 'banana') === undefined;`},{name:"Returns a String",test:`assert.isString(output) === undefined;`}]},{name:"Array.forEach()",time:20,prompt:"Loop over the array, add an 'x' to the end of each name, push each fruit into a new array, then return the new array.",given:`const fruits = ['apple', 'banana'];\r`,answer:`const fruits = ['apple', 'banana'];\n const newFruits = [];\n fruits.forEach(function(item) {\n newFruits.push(item+'x');\n });\n return newFruits;`,tests:[{name:"Correct output",test:`assert.deepEqual(output, ['applex', 'bananax']) === undefined;`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 2 items",test:`assert.lengthOf(output, 2) === undefined;`}]},{name:"Array.push()",time:10,prompt:`Add 'orange' to the end of the 'fruits' array and return 'fruits'.`,given:`const fruits = ['apple', 'banana'];\r`,answer:`const fruits = ['apple', 'banana'];\n fruits.push('orange');\n return fruits;`,tests:[{name:"Correct output",test:`(assert.deepEqual(output, ['apple', 'banana', 'orange']) === undefined);`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 3 items",test:`assert.lengthOf(output, 3) === undefined;`}]},{name:"Array.shift()",time:10,prompt:`Remove 'apple' from the front of the 'fruits' array and return 'fruits'.`,given:`const fruits = ['apple', 'banana', 'orange'];\r`,answer:`const fruits = ['apple', 'banana', 'orange'];\n fruits.shift();\n return fruits;`,tests:[{name:"Output must be correct",test:`assert.deepEqual(output, ['banana', 'orange']) === undefined;`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 2 items",test:`assert.lengthOf(output, 2) === undefined;`}]},{name:"Array.unshift()",time:10,prompt:`Add 'strawberry' to the front of the 'fruits' array and return 'fruits'.`,given:`const fruits = ['apple', 'banana', 'orange'];\r`,answer:`const fruits = ['apple', 'banana', 'orange'];\n fruits.unshift('strawberry');\n return fruits;`,tests:[{name:"Output must be correct",test:`(assert.deepEqual(output, [\n 'strawberry',\n 'apple',\n 'banana',\n 'orange'\n ]) === undefined)`},{name:"Must return an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 4 items",test:`assert.lengthOf(output, 4) === undefined;`}]},{name:"Array.indexOf()",time:10,prompt:`Return the index of 'banana' in the Array.`,given:`const fruits = ['strawberry', 'banana', 'mango'];\r`,answer:`const fruits = ['strawberry', 'banana', 'mango'];\n const ind = fruits.indexOf('banana');\n return ind;`,tests:[{name:"Correct output",test:`assert.deepEqual(output, 1) === undefined;`},{name:"Returns a Number",test:`assert.isNumber(output) === undefined;`}]},{name:"Array.concat()",time:10,prompt:`Merge the two arrays using Array's 'concat()' method. Return the resulting array.`,given:`const fruits = ['strawberry', 'banana'];\rconst otherFruits = ['pear','peach'];\r`,answer:`const fruits = ['strawberry', 'banana'];\n const otherFruits = ['pear','peach'];\n const allTheFruits = fruits.concat(otherFruits);\n return allTheFruits;\r`,tests:[{name:"Correct output",test:`(assert.deepEqual(output, [\n 'strawberry',\n 'banana',\n 'pear',\n 'peach'\n ]) === undefined\n );`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 4 items",test:`assert.lengthOf(output, 4) === undefined;`}]},{name:"Array.join()",time:10,prompt:`Mix the two flavors with a '-' using Array's 'join' method. Return the resulting hybrid flavor.`,given:`const fruits = ['strawberry', 'banana'];\r`,answer:`const fruits = ['strawberry', 'banana'];\n const hybrid = fruits.join('-');\n return hybrid;\r`,tests:[{name:"Correct output",test:`assert.deepEqual(output, 'strawberry-banana') === undefined;`},{name:"Returns a String",test:`assert.isString(output) === undefined;`}]},{name:"Array.slice()",time:20,prompt:`Return just the citrus fruits from the 'fruits' array using 'Array.slice()'`,given:`const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\r`,answer:`const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\n const citrus = fruits.slice(1, 3);\n return citrus;`,tests:[{name:"Correct output",test:`assert.deepEqual(output, ['orange', 'lemon']) === undefined;`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 2 items",test:`assert.lengthOf(output, 2) === undefined;`}]},{name:"Array.reverse()",time:10,prompt:`Reverse the order of the 'fruit' array using 'Array.reverse()'`,given:`const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\r`,answer:`const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\n const stiurf = fruits.reverse();\n return stiurf;`,tests:[{name:"Correct output",test:`(assert.deepEqual(output, [\n 'banana',\n 'lemon',\n 'orange',\n 'strawberry'\n ]) === undefined);`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 4 items",test:`assert.lengthOf(output, 4) === undefined;`},{name:`First item is 'banana'`,test:`assert.deepEqual(output[0], 'banana') === undefined;`}]},{name:"Array.sort()",time:10,prompt:`Return the 'fruits' Array after sorting them using 'Array.sort()'.`,given:`const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\r`,answer:`const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\n const orderlyFruit = fruits.sort();\n return orderlyFruit;`,tests:[{name:"Correct output",test:`(assert.deepEqual(output, [\n 'banana',\n 'lemon',\n 'orange',\n 'strawberry'\n ]) === undefined);`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 4 items",test:`assert.lengthOf(output, 4) === undefined;`},{name:`First item is 'banana'`,test:`assert.deepEqual(output[0], 'banana') === undefined;`}]},{name:"Array.lastIndexOf()",time:10,prompt:`Return the index of the last 'peach' instance in the 'fruit' array using 'Array.lastIndexOf()'`,given:`const fruits = ['peach', 'orange', 'lemon', 'peach'];\r`,answer:`const fruits = ['peach', 'orange', 'lemon', 'peach'];\n const wheresTheLastPeach = fruits.lastIndexOf('peach');\n return wheresTheLastPeach;`,tests:[{name:"Correct output",test:`assert.deepEqual(output, 3) === undefined;`},{name:"Returns a Number",test:`assert.isNumber(output) === undefined;`}]},{name:"Array.filter()",time:10,prompt:`Return an array of the numbers greater than 5 in 'numbers' using 'Array.filter()'`,given:`const numbers = [1, 1, 2, 3, 5, 8, 13, 21];\r`,answer:`const numbers = [1, 1, 2, 3, 5, 8, 13, 21];\n const overFive = numbers.filter(num => num > 5);\n return overFive;`,tests:[{name:"Correct output",test:`assert.deepEqual(output, [8, 13, 21]) === undefined;`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 3 items",test:`assert.lengthOf(output, 3) === undefined;`},{name:`First item is 8`,test:`assert.deepEqual(output[0], 8) === undefined;`}]},{name:"Array.map()",time:10,prompt:`Return an array of 'numbers' array's square roots, using 'Array.map()' and 'Math.sqrt()'`,given:`const numbers = [25, 121, 169];\r`,answer:`const numbers = [25, 121, 169];\n const roots = numbers.map(num => Math.sqrt(num));\n return roots;`,tests:[{name:"Correct output",test:`assert.deepEqual(output, [5, 11, 13]) === undefined;`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 3 items",test:`assert.lengthOf(output, 3) === undefined;`},{name:`First item is 5`,test:`assert.deepEqual(output[0], 5) === undefined;`},{name:`Last item is 13`,test:`assert.deepEqual(output[output.length - 1], 13) === undefined;`}]},{name:"Array.every()",time:10,prompt:`Return object that returns whether each array contains all even numbers using Array.every().`,given:`const evenNumbers = [2, 4, 6, 8];\n const someOddNumbers = [2, 5, 6, 8];\n function isEven(element) {\n \n }\n return {\n evenNumbers: evenNumbers.,\n someOddNumbers: someOddNumbers.\n };`,answer:`const evenNumbers = [2, 4, 6, 8];\n const someOddNumbers = [2, 5, 6, 8];\n function isEven(element) {\n return element % 2 === 0\n }\n return {\n evenNumbers: evenNumbers.every(isEven),\n someOddNumbers: someOddNumbers.every(isEven)\n };`,tests:[{name:"Correct output",test:`assert.deepEqual(output, {\n evenNumbers: true,\n someOddNumbers: false\n }) === undefined;`},{name:"Returns an Object",test:`assert.isObject(output) === undefined;`},{name:"Object has 2 items",test:`assert.lengthOf(Object.keys(output), 2) === undefined;`},{name:`First value is true`,test:`assert.isTrue(output.evenNumbers) === undefined;`},{name:`Second value is false`,test:`assert.isFalse(output.someOddNumbers) === undefined;`}]},{name:"Array.some()",time:10,prompt:`Return 'Object' that returns whether each array contains some odd numbers using 'Array.some()'.`,given:`const evenNumbers = [2, 4, 6, 8];\n const someOddNumbers = [2, 4, 7, 8];\n function isOdd(element) {\n \n }\n return {\n evenNumbers: evenNumbers.,\n someOddNumbers: someOddNumbers.\n };`,answer:`const evenNumbers = [1, 3, 5, 7];\n const someOddNumbers = [1, 3, 6, 7];\n function isOdd(element) {\n return element % 2 !== 0;\n }\n return {\n evenNumbers: evenNumbers.some(isOdd),\n someOddNumbers: someOddNumbers.some(isOdd)\n };`,tests:[{name:"Correct output",test:`assert.deepEqual(output, {\n evenNumbers: false,\n someOddNumbers: true\n }) === undefined;`},{name:"Returns an Object",test:`assert.isObject(output) === undefined;`},{name:"Object has 2 items",test:`assert.lengthOf(Object.keys(output), 2) === undefined;`},{name:`First value is false`,test:`assert.isFalse(output.evenNumbers) === undefined;`},{name:`Second value is true`,test:`assert.isTrue(output.someOddNumbers) === undefined;`}]}]},{}],36:[function(e,t,n){t.exports=[{name:"Create Array",time:10,prompt:"Create and return an array that contains 'apple' and 'banana'",given:`const fruits = [];\rreturn fruits;`,answer:`const fruits = ['apple', 'banana'];\n return fruits;`,tests:[{name:"Correct output",test:`assert.deepEqual(output, ['apple', 'banana']) === undefined;`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 2 items",test:`assert.lengthOf(output, 2) === undefined;`}]},{name:"Array.pop()",time:10,prompt:`Remove 'orange' from the end of the 'fruits' array and return 'fruits'.`,given:`const fruits = ['apple', 'banana', 'orange'];\r`,answer:`const fruits = ['apple', 'banana', 'orange'];\n fruits.pop();\n return fruits;`,tests:[{name:"Correct output",test:`assert.deepEqual(output, ['apple', 'banana']) === undefined;`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 2 items",test:`assert.lengthOf(output, 2) === undefined;`}]}]},{}],37:[function(e,t,n){t.exports=e("./lib/type")},{"./lib/type":38}],38:[function(e,t,n){function o(e){var t=Object.prototype.toString.call(e);return s[t]?s[t]:null===e?"null":void 0===e?"undefined":e===Object(e)?"object":typeof e}function r(){this.tests={}}var s={"[object Array]":"array","[object RegExp]":"regexp","[object Function]":"function","[object Arguments]":"arguments","[object Date]":"date"};(t.exports=o).Library=r,r.prototype.of=o,r.prototype.define=function(e,t){return 1===arguments.length?this.tests[e]:(this.tests[e]=t,this)},r.prototype.test=function(e,t){if(t===o(e))return!0;var n=this.tests[t];if(n&&"regexp"===o(n))return n.test(e);if(n&&"function"===o(n))return n(e);throw new ReferenceError('Type test "'+t+'" not defined or invalid.')}},{}],39:[function(e,t,n){arguments[4][37][0].apply(n,arguments)},{"./lib/type":40,dup:37}],40:[function(e,t,n){function o(e){var t=Object.prototype.toString.call(e).match(s)[1].toLowerCase();return"function"==typeof Promise&&e instanceof Promise?"promise":null===e?"null":void 0===e?"undefined":t}function r(){if(!(this instanceof r))return new r;this.tests={}}var s=/^\[object (.*)\]$/;(t.exports=o).Library=r,r.prototype.of=o,r.prototype.define=function(e,t){return 1===arguments.length?this.tests[e]:(this.tests[e]=t,this)},r.prototype.test=function(e,t){if(t===o(e))return!0;var n=this.tests[t];if(n&&"regexp"===o(n))return n.test(e);if(n&&"function"===o(n))return n(e);throw new ReferenceError('Type test "'+t+'" not defined or invalid.')}},{}],41:[function(require,module,exports){"use strict";function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t=e.length-1||t<0?0:t+1}function getCurrentProblem(e){return e[config.currentIndex]}function previousProblem(){console.log("previousProblem!"),previousProblemButtonEl.classList.add("active"),config.currentIndex=config.shuffle?getRandomIndex(problems):getPreviousIndex(problems),updateLocalstore(config).then(function(){window.location.reload()})}function nextProblem(){console.log("nextProblem!"),nextProblemButtonEl.classList.add("active"),config.currentIndex=config.shuffle?getRandomIndex(problems):getNextIndex(problems),updateLocalstore(config).then(function(){window.location.reload()})}function toggleShuffle(){console.log("toggle shuffle!"),config.shuffle=!config.shuffle,shuffleProblemsButtonEl.classList.toggle("active"),previousProblemButtonEl.parentNode.classList.toggle("hidden"),updateLocalstore(config)}function loadProblem(e){currentProblem=e,problemEl.innerText=e.prompt,e.given&&(codeEl.value=e.given),testSuite(null,!0)}function updateTests(e,t){!0===t&&buildTests(currentProblem.tests),updateTestStatus(e)}function buildTests(e){if(e){var t=e.map(function(e){return'
\n
[✘]
\n
'+e.name+"
\n
"}).join("");testSuiteEl.innerHTML=t}}function updateTestStatus(e){if(!e)throw new Error("No testStatuses provided.");var t=!0;e.forEach(function(e){!0!==e&&(t=!1)}),[].slice.call(testSuiteEl.querySelectorAll(".test-state")).forEach(function(t,n){!0===e[n]?(t.innerHTML="[✓]",t.classList.remove("fail"),t.classList.add("pass")):(t.innerHTML="[✘]",t.classList.remove("pass"),t.classList.add("fail"))}),!0===t?(testTotalEl.innerText="PASS",testTotalEl.classList.remove("fail"),testTotalEl.classList.add("pass")):(testTotalEl.innerText="FAIL",testTotalEl.classList.remove("pass"),testTotalEl.classList.add("fail"))}function printAssertError(e){var t="";null!==e&&(t='\n
\n Expected: '+JSON.stringify(e.expected)+"\n Actual: "+JSON.stringify(e.actual)+"\n
"),assertConsoleEl.innerHTML=t}function printEvalOutput(e,t){var n="";e&&void 0!==e.message?n='\n
\n Syntax Error: '+JSON.stringify(e.message)+"\n
":t&&(n='\n
\n Output: '+JSON.stringify(t)+"\n
"),evalConsoleEl.innerHTML=n}function testSuite(e){testTotalEl.classList.toggle("working");var t=runTests(getOutput(codeEl.value));testTotalEl.classList.toggle("working"),updateTests(t,e)}function getOutput(code){var evald=!1;try{evald=eval("(function(){"+code+"})()"),printEvalOutput(null,evald)}catch(e){printEvalOutput(e)}return evald}function runTests(output){var tested=!1;return tested=currentProblem.tests.map(function(test){var testOutcome=!1;try{output&&(testOutcome=eval(test.test)),printAssertError(null)}catch(e){printAssertError(e)}return testOutcome})}function loadApp(e){function t(t){!1===e.shuffle&&13===t.keyCode&&t.shiftKey&&(t.metaKey||t.ctrlKey)?previousProblem():13!==t.keyCode||t.shiftKey||!t.metaKey&&!t.ctrlKey||nextProblem()}console.log("loading app!"),!0===e.shuffle&&(shuffleProblemsButtonEl.classList.add("active"),previousProblemButtonEl.parentNode.classList.add("hidden"));var n=debounce(function(e){-1===ignoreKeyCodes.indexOf(e.keyCode)&&testSuite()},200);codeEl.addEventListener("keydown",n),document.addEventListener("keydown",t),shuffleProblemsButtonEl.addEventListener("click",toggleShuffle),previousProblemButtonEl.addEventListener("click",previousProblem),nextProblemButtonEl.addEventListener("click",nextProblem),loadProblem(getCurrentProblem(problems)),testSuite(!0)}var probs=require("pjs-problems"),dedent=require("dedent"),assert=require("chai").assert,problems=[];Object.keys(probs).forEach(function(e){var t;(t=problems).push.apply(t,_toConsumableArray(probs[e]))}),problems=dedentStrings(problems);var currentProblem=void 0,ignoreKeyCodes=[9,37,39,38,40],config={shuffle:!0,timer:!1,currentIndex:0},problemEl=document.getElementById("problem"),codeEl=document.getElementById("code"),testSuiteEl=document.getElementById("test-suite"),testTotalEl=document.getElementById("test-total"),evalConsoleEl=document.getElementById("eval-output"),assertConsoleEl=document.getElementById("assert-output"),shuffleProblemsButtonEl=document.getElementById("shuffle-problems"),previousProblemButtonEl=document.getElementById("prev-problem"),nextProblemButtonEl=document.getElementById("next-problem");if(window.localStorage){var localConfig=localStorage.getItem("js_practice_config");if(localConfig)try{config=JSON.parse(localConfig),loadApp(config)}catch(e){console.log("LOCAL_CONFIG PARSE ERR:",e)}else console.log("LOCAL_CONFIG: No local config"),loadApp(config)}}(document,window)},{chai:2,dedent:31,"pjs-problems":34}]},{},[41]); //# sourceMappingURL=bundle.min.js.map diff --git a/public/dist/js/bundle.min.js.map b/public/dist/js/bundle.min.js.map index 708c565..25a3d1c 100644 --- a/public/dist/js/bundle.min.js.map +++ b/public/dist/js/bundle.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["node_modules/.registry.npmjs.org/browser-pack/6.0.2/node_modules/browser-pack/_prelude.js","node_modules/.registry.npmjs.org/assertion-error/1.0.2/node_modules/assertion-error/index.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/index.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/assertion.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/config.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/core/assertions.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/interface/assert.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/interface/expect.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/interface/should.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/addChainableMethod.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/addMethod.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/addProperty.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/expectTypes.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/flag.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/getActual.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/getEnumerableProperties.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/getMessage.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/getName.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/getPathInfo.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/getPathValue.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/getProperties.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/hasProperty.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/index.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/inspect.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/objDisplay.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/overwriteMethod.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/overwriteProperty.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/test.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/transferFlags.js","node_modules/.registry.npmjs.org/dedent/0.7.0/node_modules/dedent/dist/dedent.js","node_modules/.registry.npmjs.org/deep-eql/0.1.3/node_modules/deep-eql/index.js","node_modules/.registry.npmjs.org/deep-eql/0.1.3/node_modules/deep-eql/lib/eql.js","node_modules/.registry.npmjs.org/localforage/1.5.0/node_modules/localforage/dist/node_modules/localforage/dist/localforage.js","node_modules/.registry.npmjs.org/pjs-problems/1.0.3/node_modules/pjs-problems/index.js","node_modules/.registry.npmjs.org/pjs-problems/1.0.3/node_modules/pjs-problems/problems/arrays.js","node_modules/.registry.npmjs.org/pjs-problems/1.0.3/node_modules/pjs-problems/problems/initial.js","node_modules/.registry.npmjs.org/type-detect/0.1.1/node_modules/type-detect/index.js","node_modules/.registry.npmjs.org/type-detect/0.1.1/node_modules/type-detect/lib/type.js","node_modules/.registry.npmjs.org/type-detect/1.0.0/node_modules/type-detect/lib/type.js","src/js/index.js"],"names":["e","t","n","r","s","o","u","a","require","i","f","Error","code","l","exports","call","length","1","module","exclude","excludeProps","res","obj","Object","keys","forEach","key","excludes","indexOf","slice","arguments","args","AssertionError","message","_props","ssf","props","this","showDiff","callee","captureStackTrace","stack","prototype","create","name","constructor","toJSON","used","version","util","use","fn","push","config","assertion","core","expect","should","assert","_chai","Assertion","msg","flag","defineProperty","get","console","warn","includeStack","set","value","addProperty","addMethod","addChainableMethod","chainingBehavior","overwriteProperty","overwriteMethod","overwriteChainableMethod","expr","negateMsg","expected","_actual","ok","test","getMessage","actual","getActual","val","truncateThreshold","chai","_","an","type","toLowerCase","article","charAt","includeChainingBehavior","include","expectTypes","eql","k","property","subset","undefined","inspect","checkArguments","toString","assertEqual","_obj","assertEql","assertAbove","to","have","len","assertLeast","assertBelow","assertMost","assertInstanceOf","getName","assertOwnProperty","hasOwnProperty","assertOwnPropertyDescriptor","descriptor","actualDescriptor","getOwnPropertyDescriptor","assertLengthChain","assertLength","assertMatch","re","exec","assertKeys","str","mixedArgsMsg","Array","any","all","filter","every","last","map","pop","join","sort","assertThrows","errMsg","is","thrown","desiredError","thrownError","RegExp","err","actuallyGot","expectedThrown","respondTo","method","itself","context","satisfy","matcher","result","objDisplay","negate","closeTo","delta","Math","abs","isSubsetOf","superset","cmp","elem","some","elem2","oneOf","list","be","assertChanges","object","prop","initial","assertIncreases","assertDecreases","chain","isNaN","isArray","start","finish","range","isDeep","pathInfo","getPathInfo","hasProperty","exists","isExtensible","TypeError","isSealed","isFrozen","express","errmsg","fail","operator","isOk","isNotOk","not","equal","act","exp","notEqual","strictEqual","notStrictEqual","deepEqual","notDeepEqual","isAbove","abv","above","isAtLeast","atlst","least","isBelow","blw","below","isAtMost","atmst","most","isTrue","isNotTrue","isFalse","isNotFalse","isNull","isNotNull","NaN","isNotNaN","isUndefined","isDefined","isFunction","isNotFunction","isObject","isNotObject","isNotArray","isString","isNotString","isNumber","isNotNumber","isBoolean","isNotBoolean","typeOf","notTypeOf","instanceOf","notInstanceOf","inc","notInclude","match","notMatch","notProperty","deepProperty","deep","notDeepProperty","propertyVal","propertyNotVal","deepPropertyVal","deepPropertyNotVal","lengthOf","throws","errt","errs","assertErr","throw","doesNotThrow","Throw","val2","approximately","sameMembers","set1","set2","same","members","sameDeepMembers","includeMembers","includeDeepMembers","inList","changes","change","doesNotChange","increases","increase","doesNotIncrease","decreases","decrease","doesNotDecrease","ifError","extensible","isNotExtensible","sealed","isNotSealed","frozen","isNotFrozen","alias","as","loadShould","shouldGetter","String","Number","Boolean","valueOf","shouldSetter","enumerable","configurable","writable","val1","exist","Should","transferFlags","hasProtoSupport","excludeNames","Function","apply","ctx","chainableBehavior","__methods","__proto__","getOwnPropertyNames","asserterName","pd","getter","types","index","art","flags","__flags","flagMsg","replace","func","parsePath","path","mArr","parseFloat","p","_getPathValue","parsed","tmp","part","info","parent","proto","getPrototypeOf","literals","number","string","ot","getPathValue","showHidden","depth","colors","formatValue","seen","stylize","recurseTimes","ret","primitive","formatPrimitive","isDOMElement","outerHTML","document","xmlVersion","XMLSerializer","serializeToString","container","createElementNS","appendChild","cloneNode","html","innerHTML","visibleKeys","getEnumerableProperties","getProperties","isError","nameSuffix","isRegExp","isDate","Date","toUTCString","formatError","base","array","braces","output","formatArray","formatProperty","reduceToSingleString","simple","JSON","stringify","Infinity","__lookupGetter__","__lookupSetter__","split","line","substr","numLinesEst","reduce","prev","cur","ar","objectToString","d","HTMLElement","nodeType","nodeName","splice","_chainingBehavior","_method","_super","_get","includeAll","dedent","strings","raw","lines","mindent","m","indent","min","trim","b","sameValue","dateEqual","regexpEqual","Buffer","isBuffer","bufferEqual","argumentsEqual","typeEqual","objectEqual","getTime","iterableEqual","isValue","ka","kb","ex","define","amd","window","global","self","localforage","_dereq_","nextTick","draining","oldQueue","queue","immediate","task","scheduleDrain","Mutation","MutationObserver","WebKitMutationObserver","called","observer","element","createTextNode","observe","characterData","data","setImmediate","MessageChannel","createElement","scriptEl","onreadystatechange","parentNode","removeChild","documentElement","setTimeout","channel","port1","onmessage","port2","postMessage","2","INTERNAL","Promise","resolver","state","PENDING","outcome","safelyResolveThenable","QueueItem","promise","onFulfilled","onRejected","callFulfilled","otherCallFulfilled","callRejected","otherCallRejected","unwrap","returnValue","handlers","reject","resolve","getThen","then","thenable","onError","onSuccess","tryToUnwrap","tryCatch","status","out","reason","iterable","values","resolved","resolveFromAll","outValue","error","race","response","REJECTED","FULFILLED","3","4","_classCallCheck","instance","Constructor","createBlob","parts","properties","Blob","builder","BlobBuilder","MSBlobBuilder","MozBlobBuilder","WebKitBlobBuilder","append","getBlob","executeCallback","callback","executeTwoCallbacks","errorCallback","_binStringToArrayBuffer","bin","buf","ArrayBuffer","arr","Uint8Array","charCodeAt","_checkBlobSupportWithoutCaching","idb","Promise$1","txn","transaction","DETECT_BLOB_SUPPORT_STORE","blob","objectStore","put","onabort","preventDefault","stopPropagation","oncomplete","matchedChrome","navigator","userAgent","matchedEdge","parseInt","_checkBlobSupport","supportsBlobs","_deferReadiness","dbInfo","dbContext","dbContexts","deferredOperation","deferredOperations","dbReady","_advanceReadiness","_getConnection","upgradeNeeded","db","close","dbArgs","openreq","open","onupgradeneeded","createObjectStore","storeName","oldVersion","newVersion","onerror","onsuccess","_getOriginalConnection","_getUpgradedConnection","_isUpgradeNeeded","defaultVersion","isNewStore","objectStoreNames","contains","isDowngrade","isUpgrade","incVersion","_encodeBlob","reader","FileReader","onloadend","base64","btoa","target","__local_forage_encoded_blob","readAsBinaryString","_decodeBlob","encodedBlob","atob","_isEncodedBlob","_fullyReady","_initReady","_dbInfo","_initStorage","options","ignoreErrors","forages","ready","initPromises","j","forage","_defaultConfig","getItem","req","iterate","iterator","openCursor","iterationNumber","cursor","setItem","blobSupport","removeItem","clear","count","advanced","advance","stringToBuffer","serializedString","encoded1","encoded2","encoded3","encoded4","bufferLength","buffer","bytes","BASE_CHARS","bufferToString","base64String","substring","serialize","valueType","toString$1","marker","SERIALIZED_MARKER","TYPE_ARRAYBUFFER","TYPE_INT8ARRAY","TYPE_UINT8ARRAY","TYPE_UINT8CLAMPEDARRAY","TYPE_INT16ARRAY","TYPE_UINT16ARRAY","TYPE_INT32ARRAY","TYPE_UINT32ARRAY","TYPE_FLOAT32ARRAY","TYPE_FLOAT64ARRAY","fileReader","onload","BLOB_TYPE_PREFIX","TYPE_BLOB","readAsArrayBuffer","deserialize","SERIALIZED_MARKER_LENGTH","parse","blobType","TYPE_SERIALIZED_MARKER_LENGTH","BLOB_TYPE_PREFIX_REGEX","Int8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","_initStorage$1","dbInfoPromise","openDatabase","description","size","executeSql","serializer","localforageSerializer","getItem$1","results","rows","item","iterate$1","_setItem","retriesLeft","originalValue","sqlError","QUOTA_ERR","setItem$1","removeItem$1","clear$1","length$1","c","key$1","keys$1","_initStorage$2","keyPrefix","clear$2","localStorage","getItem$2","iterate$2","keyPrefixLength","key$2","keys$2","length$2","removeItem$2","setItem$2","callWhenReady","localForageInstance","libraryMethod","_args","extend","arg","isLibraryDriver","driverName","driver","DriverType","_typeof","Symbol","indexedDB","webkitIndexedDB","mozIndexedDB","OIndexedDB","msIndexedDB","asyncStorage","_driver","webSQLStorage","localStorageWrapper","CustomDrivers","INDEXEDDB","LOCALSTORAGE","WEBSQL","LibraryMethods","DefaultConfig","driverSupport","isSafari","platform","hasFetch","fetch","IDBKeyRange","localforage_js","LocalForage","_config","_driverSet","_initDriver","_ready","_wrapLibraryMethodsWithReady","setDriver","defineDriver","driverObject","complianceError","namingError","customDriverMethods","concat","customDriverMethod","supportPromise","_support","supportResult","getDriver","getDriverPromise","getSerializer","serializerPromise","drivers","setDriverToConfig","extendSelfWithDriver","_extend","initDriver","supportedDrivers","driverPromiseLoop","currentDriverIndex","_getSupportedDrivers","oldDriverSetDone","supports","libraryMethodsAndProperties","createInstance","arrays","time","prompt","given","answer","tests","getType","natives","Library","[object Array]","[object RegExp]","[object Function]","[object Arguments]","[object Date]","of","ReferenceError","objectTypeRegexp","dedentStrings","problems","prob","updateLocalstore","catch","log","debounce","wait","timeout","later","callNow","clearTimeout","getRandomIndex","problemsArr","ind","floor","random","currentIndex","getPreviousIndex","getNextIndex","getCurrentProblem","previousProblem","previousProblemButtonEl","classList","add","shuffle","location","reload","nextProblem","nextProblemButtonEl","toggleShuffle","shuffleProblemsButtonEl","toggle","loadProblem","problemObj","currentProblem","problemEl","innerText","codeEl","testSuite","updateTests","testStatus","init","buildTests","updateTestStatus","testsDom","testSuiteEl","testStatuses","allPassed","testPassed","querySelectorAll","testStatusEl","iter","remove","testTotalEl","printAssertError","errObj","inner","assertConsoleEl","printEvalOutput","evalConsoleEl","tested","runTests","getOutput","evald","eval","testOutcome","loadApp","problemNav","keyCode","shiftKey","metaKey","ctrlKey","debouncedInputValidation","ignoreKeyCodes","addEventListener","probs","subject","_problems","_toConsumableArray","timer","getElementById"],"mappings":"CAAA,SAAAA,EAAAC,EAAAC,EAAAC,GAAA,SAAAC,EAAAC,EAAAC,GAAA,IAAAJ,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,IAAAE,EAAA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gB,SAAU+E","file":"bundle.min.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o\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 || arguments.callee;\n if (ssf && 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","module.exports = require('./lib/chai');\n","/*!\n * chai\n * Copyright(c) 2011-2014 Jake Luer \n * MIT Licensed\n */\n\nvar used = []\n , exports = module.exports = {};\n\n/*!\n * Chai version\n */\n\nexports.version = '3.5.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(this, util);\n used.push(fn);\n }\n\n return this;\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","/*!\n * chai\n * http://chaijs.com\n * Copyright(c) 2011-2014 Jake Luer \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 * @api private\n */\n\n function Assertion (obj, msg, stack) {\n flag(this, 'ssfi', stack || arguments.callee);\n flag(this, 'object', obj);\n flag(this, 'message', msg);\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 (true !== showDiff) showDiff = false;\n if (true !== config.showDiff) showDiff = false;\n\n if (!ok) {\n var msg = util.getMessage(this, arguments)\n , 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","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","/*!\n * chai\n * http://chaijs.com\n * Copyright(c) 2011-2014 Jake Luer \n * MIT Licensed\n */\n\nmodule.exports = function (chai, _) {\n var Assertion = chai.Assertion\n , toString = Object.prototype.toString\n , flag = _.flag;\n\n /**\n * ### Language Chains\n *\n * The following are provided as chainable getters to\n * improve the readability of your assertions. They\n * do not provide testing capabilities unless they\n * have been overwritten by a plugin.\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 *\n * @name language chains\n * @namespace BDD\n * @api public\n */\n\n [ 'to', 'be', 'been'\n , 'is', 'and', 'has', 'have'\n , 'with', 'that', 'which', 'at'\n , 'of', 'same' ].forEach(function (chain) {\n Assertion.addProperty(chain, function () {\n return this;\n });\n });\n\n /**\n * ### .not\n *\n * Negates any of assertions following in the chain.\n *\n * expect(foo).to.not.equal('bar');\n * expect(goodFn).to.not.throw(Error);\n * expect({ foo: 'baz' }).to.have.property('foo')\n * .and.not.equal('bar');\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 * Sets the `deep` flag, later used by the `equal` and\n * `property` assertions.\n *\n * expect(foo).to.deep.equal({ bar: 'baz' });\n * expect({ foo: { bar: { baz: 'quux' } } })\n * .to.have.deep.property('foo.bar.baz', 'quux');\n *\n * `.deep.property` special characters can be escaped\n * by adding two slashes before the `.` or `[]`.\n *\n * var deepCss = { '.link': { '[target]': 42 }};\n * expect(deepCss).to.have.deep.property('\\\\.link.\\\\[target\\\\]', 42);\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 * ### .any\n *\n * Sets the `any` flag, (opposite of the `all` flag)\n * later used in the `keys` assertion.\n *\n * expect(foo).to.have.any.keys('bar', 'baz');\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 /**\n * ### .all\n *\n * Sets the `all` flag (opposite of the `any` flag)\n * later used by the `keys` assertion.\n *\n * expect(foo).to.have.all.keys('bar', 'baz');\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)\n *\n * The `a` and `an` assertions are aliases that can be\n * used either as language chains or to assert a value's\n * type.\n *\n * // typeof\n * expect('test').to.be.a('string');\n * expect({ foo: 'bar' }).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(new Promise).to.be.a('promise');\n * expect(new Float32Array()).to.be.a('float32array');\n * expect(Symbol()).to.be.a('symbol');\n *\n * // es6 overrides\n * expect({[Symbol.toStringTag]:()=>'foo'}).to.be.a('foo');\n *\n * // language chain\n * expect(foo).to.be.an.instanceof(Foo);\n *\n * @name a\n * @alias an\n * @param {String} type\n * @param {String} message _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)\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(value)\n *\n * The `include` and `contain` assertions can be used as either property\n * based language chains or as methods to assert the inclusion of an object\n * in an array or a substring in a string. When used as language chains,\n * they toggle the `contains` flag for the `keys` assertion.\n *\n * expect([1,2,3]).to.include(2);\n * expect('foobar').to.contain('foo');\n * expect({ foo: 'bar', hello: 'universe' }).to.include.keys('foo');\n *\n * @name include\n * @alias contain\n * @alias includes\n * @alias contains\n * @param {Object|String|Number} obj\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function includeChainingBehavior () {\n flag(this, 'contains', true);\n }\n\n function include (val, msg) {\n _.expectTypes(this, ['array', 'object', 'string']);\n\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n var expected = false;\n\n if (_.type(obj) === 'array' && _.type(val) === 'object') {\n for (var i in obj) {\n if (_.eql(obj[i], val)) {\n expected = true;\n break;\n }\n }\n } else if (_.type(val) === 'object') {\n if (!flag(this, 'negate')) {\n for (var k in val) new Assertion(obj).property(k, val[k]);\n return;\n }\n var subset = {};\n for (var k in val) subset[k] = obj[k];\n expected = _.eql(subset, val);\n } else {\n expected = (obj != undefined) && ~obj.indexOf(val);\n }\n this.assert(\n expected\n , 'expected #{this} to include ' + _.inspect(val)\n , 'expected #{this} to not 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 truthy.\n *\n * expect('everything').to.be.ok;\n * expect(1).to.be.ok;\n * expect(false).to.not.be.ok;\n * expect(undefined).to.not.be.ok;\n * expect(null).to.not.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 `true`.\n *\n * expect(true).to.be.true;\n * expect(1).to.not.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 , this.negate ? false : true\n );\n });\n\n /**\n * ### .false\n *\n * Asserts that the target is `false`.\n *\n * expect(false).to.be.false;\n * expect(0).to.not.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 , this.negate ? true : false\n );\n });\n\n /**\n * ### .null\n *\n * Asserts that the target is `null`.\n *\n * expect(null).to.be.null;\n * expect(undefined).to.not.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 `undefined`.\n *\n * expect(undefined).to.be.undefined;\n * expect(null).to.not.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 * Asserts that the target is `NaN`.\n *\n * expect('foo').to.be.NaN;\n * expect(4).not.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 neither `null` nor `undefined`.\n *\n * var foo = 'hi'\n * , bar = null\n * , baz;\n *\n * expect(foo).to.exist;\n * expect(bar).to.not.exist;\n * expect(baz).to.not.exist;\n *\n * @name exist\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('exist', function () {\n this.assert(\n null != flag(this, 'object')\n , 'expected #{this} to exist'\n , 'expected #{this} to not exist'\n );\n });\n\n\n /**\n * ### .empty\n *\n * Asserts that the target's length is `0`. For arrays and strings, it checks\n * the `length` property. For objects, it gets the count of\n * enumerable keys.\n *\n * expect([]).to.be.empty;\n * expect('').to.be.empty;\n * expect({}).to.be.empty;\n *\n * @name empty\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('empty', function () {\n var obj = flag(this, 'object')\n , expected = obj;\n\n if (Array.isArray(obj) || 'string' === typeof object) {\n expected = obj.length;\n } else if (typeof obj === 'object') {\n expected = Object.keys(obj).length;\n }\n\n this.assert(\n !expected\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 * @name arguments\n * @alias Arguments\n * @namespace BDD\n * @api public\n */\n\n function checkArguments () {\n var obj = flag(this, 'object')\n , type = Object.prototype.toString.call(obj);\n this.assert(\n '[object 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(value)\n *\n * Asserts that the target is strictly equal (`===`) to `value`.\n * Alternately, if the `deep` flag is set, asserts that\n * the target is deeply equal to `value`.\n *\n * expect('hello').to.equal('hello');\n * expect(42).to.equal(42);\n * expect(1).to.not.equal(true);\n * expect({ foo: 'bar' }).to.not.equal({ foo: 'bar' });\n * expect({ foo: 'bar' }).to.deep.equal({ foo: 'bar' });\n *\n * @name equal\n * @alias equals\n * @alias eq\n * @alias deep.equal\n * @param {Mixed} value\n * @param {String} message _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 return this.eql(val);\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(value)\n *\n * Asserts that the target is deeply equal to `value`.\n *\n * expect({ foo: 'bar' }).to.eql({ foo: 'bar' });\n * expect([ 1, 2, 3 ]).to.eql([ 1, 2, 3 ]);\n *\n * @name eql\n * @alias eqls\n * @param {Mixed} value\n * @param {String} message _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(value)\n *\n * Asserts that the target is greater than `value`.\n *\n * expect(10).to.be.above(5);\n *\n * Can also be used in conjunction with `length` to\n * assert a minimum length. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.above(2);\n * expect([ 1, 2, 3 ]).to.have.length.above(2);\n *\n * @name above\n * @alias gt\n * @alias greaterThan\n * @param {Number} value\n * @param {String} message _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 if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len > n\n , 'expected #{this} to have a length above #{exp} but got #{act}'\n , 'expected #{this} to not have a length above #{exp}'\n , n\n , len\n );\n } else {\n this.assert(\n obj > n\n , 'expected #{this} to be above ' + n\n , 'expected #{this} to be at most ' + n\n );\n }\n }\n\n Assertion.addMethod('above', assertAbove);\n Assertion.addMethod('gt', assertAbove);\n Assertion.addMethod('greaterThan', assertAbove);\n\n /**\n * ### .least(value)\n *\n * Asserts that the target is greater than or equal to `value`.\n *\n * expect(10).to.be.at.least(10);\n *\n * Can also be used in conjunction with `length` to\n * assert a minimum length. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.of.at.least(2);\n * expect([ 1, 2, 3 ]).to.have.length.of.at.least(3);\n *\n * @name least\n * @alias gte\n * @param {Number} value\n * @param {String} message _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 if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len >= n\n , 'expected #{this} to have a length at least #{exp} but got #{act}'\n , 'expected #{this} to have a length below #{exp}'\n , n\n , len\n );\n } else {\n this.assert(\n obj >= n\n , 'expected #{this} to be at least ' + n\n , 'expected #{this} to be below ' + n\n );\n }\n }\n\n Assertion.addMethod('least', assertLeast);\n Assertion.addMethod('gte', assertLeast);\n\n /**\n * ### .below(value)\n *\n * Asserts that the target is less than `value`.\n *\n * expect(5).to.be.below(10);\n *\n * Can also be used in conjunction with `length` to\n * assert a maximum length. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.below(4);\n * expect([ 1, 2, 3 ]).to.have.length.below(4);\n *\n * @name below\n * @alias lt\n * @alias lessThan\n * @param {Number} value\n * @param {String} message _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 if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len < n\n , 'expected #{this} to have a length below #{exp} but got #{act}'\n , 'expected #{this} to not have a length below #{exp}'\n , n\n , len\n );\n } else {\n this.assert(\n obj < n\n , 'expected #{this} to be below ' + n\n , 'expected #{this} to be at least ' + n\n );\n }\n }\n\n Assertion.addMethod('below', assertBelow);\n Assertion.addMethod('lt', assertBelow);\n Assertion.addMethod('lessThan', assertBelow);\n\n /**\n * ### .most(value)\n *\n * Asserts that the target is less than or equal to `value`.\n *\n * expect(5).to.be.at.most(5);\n *\n * Can also be used in conjunction with `length` to\n * assert a maximum length. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.of.at.most(4);\n * expect([ 1, 2, 3 ]).to.have.length.of.at.most(3);\n *\n * @name most\n * @alias lte\n * @param {Number} value\n * @param {String} message _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 if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len <= n\n , 'expected #{this} to have a length at most #{exp} but got #{act}'\n , 'expected #{this} to have a length above #{exp}'\n , n\n , len\n );\n } else {\n this.assert(\n obj <= n\n , 'expected #{this} to be at most ' + n\n , 'expected #{this} to be above ' + n\n );\n }\n }\n\n Assertion.addMethod('most', assertMost);\n Assertion.addMethod('lte', assertMost);\n\n /**\n * ### .within(start, finish)\n *\n * Asserts that the target is within a range.\n *\n * expect(7).to.be.within(5,10);\n *\n * Can also be used in conjunction with `length` to\n * assert a length range. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.within(2,4);\n * expect([ 1, 2, 3 ]).to.have.length.within(2,4);\n *\n * @name within\n * @param {Number} start lowerbound inclusive\n * @param {Number} finish upperbound inclusive\n * @param {String} message _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 , range = start + '..' + finish;\n if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len >= start && len <= finish\n , 'expected #{this} to have a length within ' + range\n , 'expected #{this} to not have a length 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)\n *\n * Asserts that the target is an instance of `constructor`.\n *\n * var Tea = function (name) { this.name = name; }\n * , Chai = new Tea('chai');\n *\n * expect(Chai).to.be.an.instanceof(Tea);\n * expect([ 1, 2, 3 ]).to.be.instanceof(Array);\n *\n * @name instanceof\n * @param {Constructor} constructor\n * @param {String} message _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 var name = _.getName(constructor);\n this.assert(\n flag(this, 'object') instanceof constructor\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, [value])\n *\n * Asserts that the target has a property `name`, optionally asserting that\n * the value of that property is strictly equal to `value`.\n * If the `deep` flag is set, you can use dot- and bracket-notation for deep\n * references into objects and arrays.\n *\n * // simple referencing\n * var obj = { foo: 'bar' };\n * expect(obj).to.have.property('foo');\n * expect(obj).to.have.property('foo', 'bar');\n *\n * // deep referencing\n * var deepObj = {\n * green: { tea: 'matcha' }\n * , teas: [ 'chai', 'matcha', { tea: 'konacha' } ]\n * };\n *\n * expect(deepObj).to.have.deep.property('green.tea', 'matcha');\n * expect(deepObj).to.have.deep.property('teas[1]', 'matcha');\n * expect(deepObj).to.have.deep.property('teas[2].tea', 'konacha');\n *\n * You can also use an array as the starting point of a `deep.property`\n * assertion, or traverse nested arrays.\n *\n * var arr = [\n * [ 'chai', 'matcha', 'konacha' ]\n * , [ { tea: 'chai' }\n * , { tea: 'matcha' }\n * , { tea: 'konacha' } ]\n * ];\n *\n * expect(arr).to.have.deep.property('[0][1]', 'matcha');\n * expect(arr).to.have.deep.property('[1][2].tea', 'konacha');\n *\n * Furthermore, `property` changes the subject of the assertion\n * to be the value of that property from the original object. This\n * permits for further chainable assertions on that property.\n *\n * expect(obj).to.have.property('foo')\n * .that.is.a('string');\n * expect(deepObj).to.have.property('green')\n * .that.is.an('object')\n * .that.deep.equals({ tea: 'matcha' });\n * expect(deepObj).to.have.property('teas')\n * .that.is.an('array')\n * .with.deep.property('[2]')\n * .that.deep.equals({ tea: 'konacha' });\n *\n * Note that dots and bracket in `name` must be backslash-escaped when\n * the `deep` flag is set, while they must NOT be escaped when the `deep`\n * flag is not set.\n *\n * // simple referencing\n * var css = { '.link[target]': 42 };\n * expect(css).to.have.property('.link[target]', 42);\n *\n * // deep referencing\n * var deepCss = { '.link': { '[target]': 42 }};\n * expect(deepCss).to.have.deep.property('\\\\.link.\\\\[target\\\\]', 42);\n *\n * @name property\n * @alias deep.property\n * @param {String} name\n * @param {Mixed} value (optional)\n * @param {String} message _optional_\n * @returns value of property for chaining\n * @namespace BDD\n * @api public\n */\n\n Assertion.addMethod('property', function (name, val, msg) {\n if (msg) flag(this, 'message', msg);\n\n var isDeep = !!flag(this, 'deep')\n , descriptor = isDeep ? 'deep property ' : 'property '\n , negate = flag(this, 'negate')\n , obj = flag(this, 'object')\n , pathInfo = isDeep ? _.getPathInfo(name, obj) : null\n , hasProperty = isDeep\n ? pathInfo.exists\n : _.hasProperty(name, obj)\n , value = isDeep\n ? pathInfo.value\n : obj[name];\n\n if (negate && arguments.length > 1) {\n if (undefined === value) {\n msg = (msg != null) ? msg + ': ' : '';\n throw new Error(msg + _.inspect(obj) + ' has no ' + descriptor + _.inspect(name));\n }\n } else {\n this.assert(\n hasProperty\n , 'expected #{this} to have a ' + descriptor + _.inspect(name)\n , 'expected #{this} to not have ' + descriptor + _.inspect(name));\n }\n\n if (arguments.length > 1) {\n this.assert(\n val === value\n , 'expected #{this} to have a ' + descriptor + _.inspect(name) + ' of #{exp}, but got #{act}'\n , 'expected #{this} to not have a ' + descriptor + _.inspect(name) + ' of #{act}'\n , val\n , value\n );\n }\n\n flag(this, 'object', value);\n });\n\n\n /**\n * ### .ownProperty(name)\n *\n * Asserts that the target has an own property `name`.\n *\n * expect('test').to.have.ownProperty('length');\n *\n * @name ownProperty\n * @alias haveOwnProperty\n * @param {String} name\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertOwnProperty (name, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n this.assert(\n obj.hasOwnProperty(name)\n , 'expected #{this} to have own property ' + _.inspect(name)\n , 'expected #{this} to not have own property ' + _.inspect(name)\n );\n }\n\n Assertion.addMethod('ownProperty', assertOwnProperty);\n Assertion.addMethod('haveOwnProperty', assertOwnProperty);\n\n /**\n * ### .ownPropertyDescriptor(name[, descriptor[, message]])\n *\n * Asserts that the target has an own property descriptor `name`, that optionally matches `descriptor`.\n *\n * expect('test').to.have.ownPropertyDescriptor('length');\n * expect('test').to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 4 });\n * expect('test').not.to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 3 });\n * expect('test').ownPropertyDescriptor('length').to.have.property('enumerable', false);\n * expect('test').ownPropertyDescriptor('length').to.have.keys('value');\n *\n * @name ownPropertyDescriptor\n * @alias haveOwnPropertyDescriptor\n * @param {String} name\n * @param {Object} descriptor _optional_\n * @param {String} message _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 * ### .length\n *\n * Sets the `doLength` flag later used as a chain precursor to a value\n * comparison for the `length` property.\n *\n * expect('foo').to.have.length.above(2);\n * expect([ 1, 2, 3 ]).to.have.length.above(2);\n * expect('foo').to.have.length.below(4);\n * expect([ 1, 2, 3 ]).to.have.length.below(4);\n * expect('foo').to.have.length.within(2,4);\n * expect([ 1, 2, 3 ]).to.have.length.within(2,4);\n *\n * *Deprecation notice:* Using `length` as an assertion will be deprecated\n * in version 2.4.0 and removed in 3.0.0. Code using the old style of\n * asserting for `length` property value using `length(value)` should be\n * switched to use `lengthOf(value)` instead.\n *\n * @name length\n * @namespace BDD\n * @api public\n */\n\n /**\n * ### .lengthOf(value[, message])\n *\n * Asserts that the target's `length` property has\n * the expected value.\n *\n * expect([ 1, 2, 3]).to.have.lengthOf(3);\n * expect('foobar').to.have.lengthOf(6);\n *\n * @name lengthOf\n * @param {Number} length\n * @param {String} message _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 new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n\n this.assert(\n len == n\n , 'expected #{this} to have a length of #{exp} but got #{act}'\n , 'expected #{this} to not have a length of #{act}'\n , n\n , len\n );\n }\n\n Assertion.addChainableMethod('length', assertLength, assertLengthChain);\n Assertion.addMethod('lengthOf', assertLength);\n\n /**\n * ### .match(regexp)\n *\n * Asserts that the target matches a regular expression.\n *\n * expect('foobar').to.match(/^foo/);\n *\n * @name match\n * @alias matches\n * @param {RegExp} RegularExpression\n * @param {String} message _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(string)\n *\n * Asserts that the string target contains another string.\n *\n * expect('foobar').to.have.string('bar');\n *\n * @name string\n * @param {String} string\n * @param {String} message _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 new Assertion(obj, msg).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 /**\n * ### .keys(key1, [key2], [...])\n *\n * Asserts that the target contains any or all of the passed-in keys.\n * Use in combination with `any`, `all`, `contains`, or `have` will affect\n * what will pass.\n *\n * When used in conjunction with `any`, at least one key that is passed\n * in must exist in the target object. This is regardless whether or not\n * the `have` or `contain` qualifiers are used. Note, either `any` or `all`\n * should be used in the assertion. If neither are used, the assertion is\n * defaulted to `all`.\n *\n * When both `all` and `contain` are used, the target object must have at\n * least all of the passed-in keys but may have more keys not listed.\n *\n * When both `all` and `have` are used, the target object must both contain\n * all of the passed-in keys AND the number of keys in the target object must\n * match the number of keys passed in (in other words, a target object must\n * have all and only all of the passed-in keys).\n *\n * expect({ foo: 1, bar: 2 }).to.have.any.keys('foo', 'baz');\n * expect({ foo: 1, bar: 2 }).to.have.any.keys('foo');\n * expect({ foo: 1, bar: 2 }).to.contain.any.keys('bar', 'baz');\n * expect({ foo: 1, bar: 2 }).to.contain.any.keys(['foo']);\n * expect({ foo: 1, bar: 2 }).to.contain.any.keys({'foo': 6});\n * expect({ foo: 1, bar: 2 }).to.have.all.keys(['bar', 'foo']);\n * expect({ foo: 1, bar: 2 }).to.have.all.keys({'bar': 6, 'foo': 7});\n * expect({ foo: 1, bar: 2, baz: 3 }).to.contain.all.keys(['bar', 'foo']);\n * expect({ foo: 1, bar: 2, baz: 3 }).to.contain.all.keys({'bar': 6});\n *\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 , str\n , ok = true\n , mixedArgsMsg = 'keys must be given single argument of Array|Object|String, or multiple String arguments';\n\n switch (_.type(keys)) {\n case \"array\":\n if (arguments.length > 1) throw (new Error(mixedArgsMsg));\n break;\n case \"object\":\n if (arguments.length > 1) throw (new Error(mixedArgsMsg));\n keys = Object.keys(keys);\n break;\n default:\n keys = Array.prototype.slice.call(arguments);\n }\n\n if (!keys.length) throw new Error('keys required');\n\n var actual = Object.keys(obj)\n , expected = keys\n , len = keys.length\n , any = flag(this, 'any')\n , all = flag(this, 'all');\n\n if (!any && !all) {\n all = true;\n }\n\n // Has any\n if (any) {\n var intersection = expected.filter(function(key) {\n return ~actual.indexOf(key);\n });\n ok = intersection.length > 0;\n }\n\n // Has all\n if (all) {\n ok = keys.every(function(key){\n return ~actual.indexOf(key);\n });\n if (!flag(this, 'negate') && !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 ' + str\n , 'expected #{this} to not ' + str\n , expected.slice(0).sort()\n , actual.sort()\n , true\n );\n }\n\n Assertion.addMethod('keys', assertKeys);\n Assertion.addMethod('key', assertKeys);\n\n /**\n * ### .throw(constructor)\n *\n * Asserts that the function target will throw a specific error, or specific type of error\n * (as determined using `instanceof`), optionally with a RegExp or string inclusion test\n * for the error's message.\n *\n * var err = new ReferenceError('This is a bad function.');\n * var fn = function () { throw err; }\n * expect(fn).to.throw(ReferenceError);\n * expect(fn).to.throw(Error);\n * expect(fn).to.throw(/bad function/);\n * expect(fn).to.not.throw('good function');\n * expect(fn).to.throw(ReferenceError, /bad function/);\n * expect(fn).to.throw(err);\n *\n * Please note that when a throw expectation is negated, it will check each\n * parameter independently, starting with error constructor type. The appropriate way\n * to check for the existence of a type of error but for a message that does not match\n * is to use `and`.\n *\n * expect(fn).to.throw(ReferenceError)\n * .and.not.throw(/good function/);\n *\n * @name throw\n * @alias throws\n * @alias Throw\n * @param {ErrorConstructor} constructor\n * @param {String|RegExp} expected error message\n * @param {String} message _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 (constructor, errMsg, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n new Assertion(obj, msg).is.a('function');\n\n var thrown = false\n , desiredError = null\n , name = null\n , thrownError = null;\n\n if (arguments.length === 0) {\n errMsg = null;\n constructor = null;\n } else if (constructor && (constructor instanceof RegExp || 'string' === typeof constructor)) {\n errMsg = constructor;\n constructor = null;\n } else if (constructor && constructor instanceof Error) {\n desiredError = constructor;\n constructor = null;\n errMsg = null;\n } else if (typeof constructor === 'function') {\n name = constructor.prototype.name;\n if (!name || (name === 'Error' && constructor !== Error)) {\n name = constructor.name || (new constructor()).name;\n }\n } else {\n constructor = null;\n }\n\n try {\n obj();\n } catch (err) {\n // first, check desired error\n if (desiredError) {\n this.assert(\n err === desiredError\n , 'expected #{this} to throw #{exp} but #{act} was thrown'\n , 'expected #{this} to not throw #{exp}'\n , (desiredError instanceof Error ? desiredError.toString() : desiredError)\n , (err instanceof Error ? err.toString() : err)\n );\n\n flag(this, 'object', err);\n return this;\n }\n\n // next, check constructor\n if (constructor) {\n this.assert(\n err instanceof constructor\n , 'expected #{this} to throw #{exp} but #{act} was thrown'\n , 'expected #{this} to not throw #{exp} but #{act} was thrown'\n , name\n , (err instanceof Error ? err.toString() : err)\n );\n\n if (!errMsg) {\n flag(this, 'object', err);\n return this;\n }\n }\n\n // next, check message\n var message = 'error' === _.type(err) && \"message\" in err\n ? err.message\n : '' + err;\n\n if ((message != null) && errMsg && errMsg instanceof RegExp) {\n this.assert(\n errMsg.exec(message)\n , 'expected #{this} to throw error matching #{exp} but got #{act}'\n , 'expected #{this} to throw error not matching #{exp}'\n , errMsg\n , message\n );\n\n flag(this, 'object', err);\n return this;\n } else if ((message != null) && errMsg && 'string' === typeof errMsg) {\n this.assert(\n ~message.indexOf(errMsg)\n , 'expected #{this} to throw error including #{exp} but got #{act}'\n , 'expected #{this} to throw error not including #{act}'\n , errMsg\n , message\n );\n\n flag(this, 'object', err);\n return this;\n } else {\n thrown = true;\n thrownError = err;\n }\n }\n\n var actuallyGot = ''\n , expectedThrown = name !== null\n ? name\n : desiredError\n ? '#{exp}' //_.inspect(desiredError)\n : 'an error';\n\n if (thrown) {\n actuallyGot = ' but #{act} was thrown'\n }\n\n this.assert(\n thrown === true\n , 'expected #{this} to throw ' + expectedThrown + actuallyGot\n , 'expected #{this} to not throw ' + expectedThrown + actuallyGot\n , (desiredError instanceof Error ? desiredError.toString() : desiredError)\n , (thrownError instanceof Error ? thrownError.toString() : thrownError)\n );\n\n flag(this, 'object', thrownError);\n };\n\n Assertion.addMethod('throw', assertThrows);\n Assertion.addMethod('throws', assertThrows);\n Assertion.addMethod('Throw', assertThrows);\n\n /**\n * ### .respondTo(method)\n *\n * Asserts that the object or class target will respond to a method.\n *\n * Klass.prototype.bar = function(){};\n * expect(Klass).to.respondTo('bar');\n * expect(obj).to.respondTo('bar');\n *\n * To check if a constructor will respond to a static function,\n * set the `itself` flag.\n *\n * Klass.baz = function(){};\n * expect(Klass).itself.to.respondTo('baz');\n *\n * @name respondTo\n * @alias respondsTo\n * @param {String} method\n * @param {String} message _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' === _.type(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 * Sets the `itself` flag, later used by the `respondTo` assertion.\n *\n * function Foo() {}\n * Foo.bar = function() {}\n * Foo.prototype.baz = function() {}\n *\n * expect(Foo).itself.to.respondTo('bar');\n * expect(Foo).itself.not.to.respondTo('baz');\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(method)\n *\n * Asserts that the target passes a given truth test.\n *\n * expect(1).to.satisfy(function(num) { return num > 0; });\n *\n * @name satisfy\n * @alias satisfies\n * @param {Function} matcher\n * @param {String} message _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 , 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)\n *\n * Asserts that the target is equal `expected`, to within a +/- `delta` range.\n *\n * expect(1.5).to.be.closeTo(1, 0.5);\n *\n * @name closeTo\n * @alias approximately\n * @param {Number} expected\n * @param {Number} delta\n * @param {String} message _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\n new Assertion(obj, msg).is.a('number');\n if (_.type(expected) !== 'number' || _.type(delta) !== 'number') {\n throw new Error('the arguments to closeTo or approximately must be numbers');\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 function isSubsetOf(subset, superset, cmp) {\n return subset.every(function(elem) {\n if (!cmp) return superset.indexOf(elem) !== -1;\n\n return superset.some(function(elem2) {\n return cmp(elem, elem2);\n });\n })\n }\n\n /**\n * ### .members(set)\n *\n * Asserts that the target is a superset of `set`,\n * or that the target and `set` have the same strictly-equal (===) members.\n * Alternately, if the `deep` flag is set, set members are compared for deep\n * equality.\n *\n * expect([1, 2, 3]).to.include.members([3, 2]);\n * expect([1, 2, 3]).to.not.include.members([3, 2, 8]);\n *\n * expect([4, 2]).to.have.members([2, 4]);\n * expect([5, 2]).to.not.have.members([5, 2, 1]);\n *\n * expect([{ id: 1 }]).to.deep.include.members([{ id: 1 }]);\n *\n * @name members\n * @param {Array} set\n * @param {String} message _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\n new Assertion(obj).to.be.an('array');\n new Assertion(subset).to.be.an('array');\n\n var cmp = flag(this, 'deep') ? _.eql : undefined;\n\n if (flag(this, 'contains')) {\n return this.assert(\n isSubsetOf(subset, obj, cmp)\n , 'expected #{this} to be a superset of #{act}'\n , 'expected #{this} to not be a superset of #{act}'\n , obj\n , subset\n );\n }\n\n this.assert(\n isSubsetOf(obj, subset, cmp) && isSubsetOf(subset, obj, cmp)\n , 'expected #{this} to have the same members as #{act}'\n , 'expected #{this} to not have the same members as #{act}'\n , obj\n , subset\n );\n });\n\n /**\n * ### .oneOf(list)\n *\n * Assert that a value appears somewhere in the top level of array `list`.\n *\n * expect('a').to.be.oneOf(['a', 'b', 'c']);\n * expect(9).to.not.be.oneOf(['z']);\n * expect([3]).to.not.be.oneOf([1, 2, [3]]);\n *\n * var three = [3];\n * // for object-types, contents are not compared\n * expect(three).to.not.be.oneOf([1, 2, [3]]);\n * // comparing references works\n * expect(three).to.be.oneOf([1, 2, three]);\n *\n * @name oneOf\n * @param {Array<*>} list\n * @param {String} message _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 new Assertion(list).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 /**\n * ### .change(function)\n *\n * Asserts that a function changes an object property\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val += 3 };\n * var noChangeFn = function() { return 'foo' + 'bar'; }\n * expect(fn).to.change(obj, 'val');\n * expect(noChangeFn).to.not.change(obj, 'val')\n *\n * @name change\n * @alias changes\n * @alias Change\n * @param {String} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertChanges (object, prop, msg) {\n if (msg) flag(this, 'message', msg);\n var fn = flag(this, 'object');\n new Assertion(object, msg).to.have.property(prop);\n new Assertion(fn).is.a('function');\n\n var initial = object[prop];\n fn();\n\n this.assert(\n initial !== object[prop]\n , 'expected .' + prop + ' to change'\n , 'expected .' + prop + ' to not change'\n );\n }\n\n Assertion.addChainableMethod('change', assertChanges);\n Assertion.addChainableMethod('changes', assertChanges);\n\n /**\n * ### .increase(function)\n *\n * Asserts that a function increases an object property\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 15 };\n * expect(fn).to.increase(obj, 'val');\n *\n * @name increase\n * @alias increases\n * @alias Increase\n * @param {String} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertIncreases (object, prop, msg) {\n if (msg) flag(this, 'message', msg);\n var fn = flag(this, 'object');\n new Assertion(object, msg).to.have.property(prop);\n new Assertion(fn).is.a('function');\n\n var initial = object[prop];\n fn();\n\n this.assert(\n object[prop] - initial > 0\n , 'expected .' + prop + ' to increase'\n , 'expected .' + prop + ' to not increase'\n );\n }\n\n Assertion.addChainableMethod('increase', assertIncreases);\n Assertion.addChainableMethod('increases', assertIncreases);\n\n /**\n * ### .decrease(function)\n *\n * Asserts that a function decreases an object property\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 5 };\n * expect(fn).to.decrease(obj, 'val');\n *\n * @name decrease\n * @alias decreases\n * @alias Decrease\n * @param {String} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertDecreases (object, prop, msg) {\n if (msg) flag(this, 'message', msg);\n var fn = flag(this, 'object');\n new Assertion(object, msg).to.have.property(prop);\n new Assertion(fn).is.a('function');\n\n var initial = object[prop];\n fn();\n\n this.assert(\n object[prop] - initial < 0\n , 'expected .' + prop + ' to decrease'\n , 'expected .' + prop + ' to not decrease'\n );\n }\n\n Assertion.addChainableMethod('decrease', assertDecreases);\n Assertion.addChainableMethod('decreases', assertDecreases);\n\n /**\n * ### .extensible\n *\n * Asserts that the target is extensible (can have new properties added to\n * it).\n *\n * var nonExtensibleObject = Object.preventExtensions({});\n * var sealedObject = Object.seal({});\n * var frozenObject = Object.freeze({});\n *\n * expect({}).to.be.extensible;\n * expect(nonExtensibleObject).to.not.be.extensible;\n * expect(sealedObject).to.not.be.extensible;\n * expect(frozenObject).to.not.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 not an object (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 when a TypeError is thrown under ES5.\n\n var isExtensible;\n\n try {\n isExtensible = Object.isExtensible(obj);\n } catch (err) {\n if (err instanceof TypeError) isExtensible = false;\n else throw err;\n }\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 (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.freeze({});\n *\n * expect(sealedObject).to.be.sealed;\n * expect(frozenObject).to.be.sealed;\n * expect({}).to.not.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 not an object (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 when a TypeError is thrown under ES5.\n\n var isSealed;\n\n try {\n isSealed = Object.isSealed(obj);\n } catch (err) {\n if (err instanceof TypeError) isSealed = true;\n else throw err;\n }\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 (cannot have new properties added to it\n * and its existing properties cannot be modified).\n *\n * var frozenObject = Object.freeze({});\n *\n * expect(frozenObject).to.be.frozen;\n * expect({}).to.not.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 not an object (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 when a TypeError is thrown under ES5.\n\n var isFrozen;\n\n try {\n isFrozen = Object.isFrozen(obj);\n } catch (err) {\n if (err instanceof TypeError) isFrozen = true;\n else throw err;\n }\n\n this.assert(\n isFrozen\n , 'expected #{this} to be frozen'\n , 'expected #{this} to not be frozen'\n );\n });\n};\n","/*!\n * chai\n * Copyright(c) 2011-2014 Jake Luer \n * MIT Licensed\n */\n\n\nmodule.exports = function (chai, util) {\n\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);\n test.assert(\n express\n , errmsg\n , '[ negation message unavailable ]'\n );\n };\n\n /**\n * ### .fail(actual, expected, [message], [operator])\n *\n * Throw a failure. Node.js `assert` module-compatible.\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 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).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).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);\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 );\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);\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 );\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).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).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 * @namespace Assert\n * @api public\n */\n\n assert.deepEqual = function (act, exp, msg) {\n new Assertion(act, msg).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).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).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).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).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).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).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).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).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).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).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).to.not.equal(null);\n };\n\n /**\n * ### .isNaN\n * Asserts that value is NaN\n *\n * assert.isNaN('foo', 'foo 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).to.be.NaN;\n };\n\n /**\n * ### .isNotNaN\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).not.to.be.NaN;\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).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).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).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).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).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).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).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).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).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).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).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).to.not.be.a('number');\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).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).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).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).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).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).to.not.be.instanceOf(type);\n };\n\n /**\n * ### .include(haystack, needle, [message])\n *\n * Asserts that `haystack` includes `needle`. Works\n * for strings and arrays.\n *\n * assert.include('foobar', 'bar', 'foobar contains string \"bar\"');\n * assert.include([ 1, 2, 3 ], 3, 'array contains value');\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).include(inc);\n };\n\n /**\n * ### .notInclude(haystack, needle, [message])\n *\n * Asserts that `haystack` does not include `needle`. Works\n * for strings and arrays.\n *\n * assert.notInclude('foobar', 'baz', 'string not include substring');\n * assert.notInclude([ 1, 2, 3 ], 4, 'array not include contain value');\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).not.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).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).to.not.match(re);\n };\n\n /**\n * ### .property(object, property, [message])\n *\n * Asserts that `object` has a property named by `property`.\n *\n * assert.property({ tea: { green: 'matcha' }}, 'tea');\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).to.have.property(prop);\n };\n\n /**\n * ### .notProperty(object, property, [message])\n *\n * Asserts that `object` does _not_ have a property named 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).to.not.have.property(prop);\n };\n\n /**\n * ### .deepProperty(object, property, [message])\n *\n * Asserts that `object` has a property named by `property`, which can be a\n * string using dot- and bracket-notation for deep reference.\n *\n * assert.deepProperty({ tea: { green: 'matcha' }}, 'tea.green');\n *\n * @name deepProperty\n * @param {Object} object\n * @param {String} property\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.deepProperty = function (obj, prop, msg) {\n new Assertion(obj, msg).to.have.deep.property(prop);\n };\n\n /**\n * ### .notDeepProperty(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 deep reference.\n *\n * assert.notDeepProperty({ tea: { green: 'matcha' }}, 'tea.oolong');\n *\n * @name notDeepProperty\n * @param {Object} object\n * @param {String} property\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notDeepProperty = function (obj, prop, msg) {\n new Assertion(obj, msg).to.not.have.deep.property(prop);\n };\n\n /**\n * ### .propertyVal(object, property, value, [message])\n *\n * Asserts that `object` has a property named by `property` with value given\n * by `value`.\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).to.have.property(prop, val);\n };\n\n /**\n * ### .propertyNotVal(object, property, value, [message])\n *\n * Asserts that `object` has a property named by `property`, but with a value\n * different from that given by `value`.\n *\n * assert.propertyNotVal({ tea: 'is good' }, 'tea', 'is bad');\n *\n * @name propertyNotVal\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.propertyNotVal = function (obj, prop, val, msg) {\n new Assertion(obj, msg).to.not.have.property(prop, val);\n };\n\n /**\n * ### .deepPropertyVal(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 deep\n * reference.\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).to.have.deep.property(prop, val);\n };\n\n /**\n * ### .deepPropertyNotVal(object, property, value, [message])\n *\n * Asserts that `object` has a property named by `property`, but with a value\n * different from that given by `value`. `property` can use dot- and\n * bracket-notation for deep reference.\n *\n * assert.deepPropertyNotVal({ tea: { green: 'matcha' }}, 'tea.green', 'konacha');\n *\n * @name deepPropertyNotVal\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.deepPropertyNotVal = function (obj, prop, val, msg) {\n new Assertion(obj, msg).to.not.have.deep.property(prop, val);\n };\n\n /**\n * ### .lengthOf(object, length, [message])\n *\n * Asserts that `object` has a `length` property 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 *\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).to.have.length(len);\n };\n\n /**\n * ### .throws(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 * assert.throws(fn, 'function throws a reference error');\n * assert.throws(fn, /function throws a reference error/);\n * assert.throws(fn, ReferenceError);\n * assert.throws(fn, ReferenceError, 'function throws a reference error');\n * assert.throws(fn, ReferenceError, /function throws a reference error/);\n *\n * @name throws\n * @alias 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 Assert\n * @api public\n */\n\n assert.throws = function (fn, errt, errs, msg) {\n if ('string' === typeof errt || errt instanceof RegExp) {\n errs = errt;\n errt = null;\n }\n\n var assertErr = new Assertion(fn, msg).to.throw(errt, errs);\n return flag(assertErr, 'object');\n };\n\n /**\n * ### .doesNotThrow(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 * assert.doesNotThrow(fn, Error, 'function does not throw');\n *\n * @name doesNotThrow\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 Assert\n * @api public\n */\n\n assert.doesNotThrow = function (fn, type, msg) {\n if ('string' === typeof type) {\n msg = type;\n type = null;\n }\n\n new Assertion(fn, msg).to.not.Throw(type);\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 throw new Error('Invalid operator \"' + operator + '\"');\n }\n var test = new Assertion(ok, msg);\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).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).to.be.approximately(exp, delta);\n };\n\n /**\n * ### .sameMembers(set1, set2, [message])\n *\n * Asserts that `set1` and `set2` have the same members.\n * Order is not taken into account.\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).to.have.same.members(set2);\n }\n\n /**\n * ### .sameDeepMembers(set1, set2, [message])\n *\n * Asserts that `set1` and `set2` have the same members - using a deep equality checking.\n * Order is not taken into account.\n *\n * assert.sameDeepMembers([ {b: 3}, {a: 2}, {c: 5} ], [ {c: 5}, {b: 3}, {a: 2} ], '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).to.have.same.deep.members(set2);\n }\n\n /**\n * ### .includeMembers(superset, subset, [message])\n *\n * Asserts that `subset` is included in `superset`.\n * Order is not taken into account.\n *\n * assert.includeMembers([ 1, 2, 3 ], [ 2, 1 ], '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).to.include.members(subset);\n }\n\n /**\n * ### .includeDeepMembers(superset, subset, [message])\n *\n * Asserts that `subset` is included in `superset` - using deep equality checking.\n * Order is not taken into account.\n * 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).to.include.deep.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).to.be.oneOf(list);\n }\n\n /**\n * ### .changes(function, object, property)\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\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.changes = function (fn, obj, prop) {\n new Assertion(fn).to.change(obj, prop);\n }\n\n /**\n * ### .doesNotChange(function, object, property)\n *\n * Asserts that a function does not changes 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\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotChange = function (fn, obj, prop) {\n new Assertion(fn).to.not.change(obj, prop);\n }\n\n /**\n * ### .increases(function, object, property)\n *\n * Asserts that a function increases an 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\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.increases = function (fn, obj, prop) {\n new Assertion(fn).to.increase(obj, prop);\n }\n\n /**\n * ### .doesNotIncrease(function, object, property)\n *\n * Asserts that a function does not increase 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\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotIncrease = function (fn, obj, prop) {\n new Assertion(fn).to.not.increase(obj, prop);\n }\n\n /**\n * ### .decreases(function, object, property)\n *\n * Asserts that a function decreases an 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\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.decreases = function (fn, obj, prop) {\n new Assertion(fn).to.decrease(obj, prop);\n }\n\n /**\n * ### .doesNotDecrease(function, object, property)\n *\n * Asserts that a function does not decreases an 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\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotDecrease = function (fn, obj, prop) {\n new Assertion(fn).to.not.decrease(obj, prop);\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).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.freese({});\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).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).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).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).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).to.not.be.frozen;\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};\n","/*!\n * chai\n * Copyright(c) 2011-2014 Jake Luer \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(actual, expected, [message], [operator])\n *\n * Throw a failure.\n *\n * @name fail\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @param {String} operator\n * @namespace Expect\n * @api public\n */\n\n chai.expect.fail = function (actual, expected, message, operator) {\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 \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 || this instanceof Number || this instanceof Boolean ) {\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(actual, expected, [message], [operator])\n *\n * Throw a failure.\n *\n * @name fail\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @param {String} operator\n * @namespace Should\n * @api public\n */\n\n should.fail = function (actual, expected, message, operator) {\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 - addChainingMethod utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Module dependencies\n */\n\nvar transferFlags = require('./transferFlags');\nvar flag = require('./flag');\nvar config = require('../config');\n\n/*!\n * Module variables\n */\n\n// Check whether `__proto__` is supported\nvar hasProtoSupport = '__proto__' in Object;\n\n// Without `__proto__` support, this module will need to add properties to a function.\n// However, some Function.prototype methods cannot be overwritten,\n// and there seems no easy cross-platform way to detect them (@see chaijs/chai/issues/69).\nvar excludeNames = /^(?:length|name|arguments|caller)$/;\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 (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 () {\n chainableBehavior.chainingBehavior.call(this);\n\n var assert = function assert() {\n var old_ssfi = flag(this, 'ssfi');\n if (old_ssfi && config.includeStack === false)\n flag(this, 'ssfi', assert);\n var result = chainableBehavior.method.apply(this, arguments);\n return result === undefined ? this : result;\n };\n\n // Use `__proto__` if available\n if (hasProtoSupport) {\n // Inherit all properties from the object by replacing the `Function` prototype\n var prototype = assert.__proto__ = Object.create(this);\n // Restore the `call` and `apply` methods from `Function`\n prototype.call = call;\n prototype.apply = apply;\n }\n // Otherwise, redefine all properties (slow!)\n else {\n var asserterNames = Object.getOwnPropertyNames(ctx);\n asserterNames.forEach(function (asserterName) {\n if (!excludeNames.test(asserterName)) {\n var pd = Object.getOwnPropertyDescriptor(ctx, asserterName);\n Object.defineProperty(assert, asserterName, pd);\n }\n });\n }\n\n transferFlags(this, assert);\n return assert;\n }\n , configurable: true\n });\n};\n","/*!\n * Chai - addMethod utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\nvar config = require('../config');\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 */\nvar flag = require('./flag');\n\nmodule.exports = function (ctx, name, method) {\n ctx[name] = function () {\n var old_ssfi = flag(this, 'ssfi');\n if (old_ssfi && config.includeStack === false)\n flag(this, 'ssfi', ctx[name]);\n var result = method.apply(this, arguments);\n return result === undefined ? this : result;\n };\n};\n","/*!\n * Chai - addProperty utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\nvar config = require('../config');\nvar flag = require('./flag');\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 (ctx, name, getter) {\n Object.defineProperty(ctx, name,\n { get: function addProperty() {\n var old_ssfi = flag(this, 'ssfi');\n if (old_ssfi && config.includeStack === false)\n flag(this, 'ssfi', addProperty);\n\n var result = getter.call(this);\n return result === undefined ? this : result;\n }\n , configurable: true\n });\n};\n","/*!\n * Chai - expectTypes utility\n * Copyright(c) 2012-2014 Jake Luer \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 (obj, types) {\n var obj = flag(obj, 'object');\n types = types.map(function (t) { return t.toLowerCase(); });\n types.sort();\n\n // Transforms ['lorem', 'ipsum'] into 'a lirum, 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 if (!types.some(function (expected) { return type(obj) === expected; })) {\n throw new AssertionError(\n 'object tested must be ' + str + ', but ' + type(obj) + ' given'\n );\n }\n};\n","/*!\n * Chai - flag utility\n * Copyright(c) 2012-2014 Jake Luer \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 (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 - getActual utility\n * Copyright(c) 2012-2014 Jake Luer \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 (obj, args) {\n return args.length > 4 ? args[4] : obj._obj;\n};\n","/*!\n * Chai - getEnumerableProperties utility\n * Copyright(c) 2012-2014 Jake Luer \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","/*!\n * Chai - message composition utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Module dependancies\n */\n\nvar flag = require('./flag')\n , getActual = require('./getActual')\n , inspect = require('./inspect')\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 (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 - getName utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * # getName(func)\n *\n * Gets the name of a function, in a cross-browser way.\n *\n * @param {Function} a function (usually a constructor)\n * @namespace Utils\n * @name getName\n */\n\nmodule.exports = function (func) {\n if (func.name) return func.name;\n\n var match = /^\\s?function ([^(]*)\\(/.exec(func);\n return match && match[1] ? match[1] : \"\";\n};\n","/*!\n * Chai - getPathInfo utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\nvar hasProperty = require('./hasProperty');\n\n/**\n * ### .getPathInfo(path, object)\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 {String} path\n * @param {Object} object\n * @returns {Object} info\n * @namespace Utils\n * @name getPathInfo\n * @api public\n */\n\nmodule.exports = function getPathInfo(path, obj) {\n var parsed = parsePath(path),\n last = parsed[parsed.length - 1];\n\n var info = {\n parent: parsed.length > 1 ? _getPathValue(parsed, obj, parsed.length - 1) : obj,\n name: last.p || last.i,\n value: _getPathValue(parsed, obj)\n };\n info.exists = hasProperty(info.name, info.parent);\n\n return info;\n};\n\n\n/*!\n * ## parsePath(path)\n *\n * Helper function used to parse string object\n * paths. Use in conjunction with `_getPathValue`.\n *\n * var parsed = parsePath('myobject.property.subprop');\n *\n * ### Paths:\n *\n * * Can be as near 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 , parts = str.match(/(\\\\\\.|[^.]+?)+/g);\n return parts.map(function (value) {\n var re = /^\\[(\\d+)\\]$/\n , mArr = re.exec(value);\n if (mArr) return { i: parseFloat(mArr[1]) };\n else return { p: value.replace(/\\\\([.\\[\\]])/g, '$1') };\n });\n}\n\n\n/*!\n * ## _getPathValue(parsed, obj)\n *\n * Helper companion function for `.parsePath` that returns\n * the value located at the parsed address.\n *\n * var value = getPathValue(parsed, obj);\n *\n * @param {Object} parsed definition from `parsePath`.\n * @param {Object} object to search against\n * @param {Number} object to search against\n * @returns {Object|Undefined} value\n * @api private\n */\n\nfunction _getPathValue (parsed, obj, index) {\n var tmp = obj\n , res;\n\n index = (index === undefined ? parsed.length : index);\n\n for (var i = 0, l = index; i < l; i++) {\n var part = parsed[i];\n if (tmp) {\n if ('undefined' !== typeof part.p)\n tmp = tmp[part.p];\n else if ('undefined' !== typeof part.i)\n tmp = tmp[part.i];\n if (i == (l - 1)) res = tmp;\n } else {\n res = undefined;\n }\n }\n return res;\n}\n","/*!\n * Chai - getPathValue utility\n * Copyright(c) 2012-2014 Jake Luer \n * @see https://github.com/logicalparadox/filtr\n * MIT Licensed\n */\n\nvar getPathInfo = require('./getPathInfo');\n\n/**\n * ### .getPathValue(path, object)\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('prop1.str', obj); // Hello\n * getPathValue('prop1.att[2]', obj); // b\n * getPathValue('prop2.arr[0].nested', obj); // Universe\n *\n * @param {String} path\n * @param {Object} object\n * @returns {Object} value or `undefined`\n * @namespace Utils\n * @name getPathValue\n * @api public\n */\nmodule.exports = function(path, obj) {\n var info = getPathInfo(path, obj);\n return info.value;\n};\n","/*!\n * Chai - getProperties utility\n * Copyright(c) 2012-2014 Jake Luer \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 - hasProperty utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\nvar type = require('type-detect');\n\n/**\n * ### .hasProperty(object, name)\n *\n * This allows checking whether an object has\n * named property or numeric array index.\n *\n * Basically does the same thing as the `in`\n * operator but works properly with natives\n * and null/undefined values.\n *\n * var obj = {\n * arr: ['a', 'b', 'c']\n * , str: 'Hello'\n * }\n *\n * The following would be the results.\n *\n * hasProperty('str', obj); // true\n * hasProperty('constructor', obj); // true\n * hasProperty('bar', obj); // false\n *\n * hasProperty('length', obj.str); // true\n * hasProperty(1, obj.str); // true\n * hasProperty(5, obj.str); // false\n *\n * hasProperty('length', obj.arr); // true\n * hasProperty(2, obj.arr); // true\n * hasProperty(3, obj.arr); // false\n *\n * @param {Objuect} object\n * @param {String|Number} name\n * @returns {Boolean} whether it exists\n * @namespace Utils\n * @name getPathInfo\n * @api public\n */\n\nvar literals = {\n 'number': Number\n , 'string': String\n};\n\nmodule.exports = function hasProperty(name, obj) {\n var ot = type(obj);\n\n // Bad Object, obviously no props at all\n if(ot === 'null' || ot === 'undefined')\n return false;\n\n // The `in` operator does not work with certain literals\n // box these before the check\n if(literals[ot] && typeof obj !== 'object')\n obj = new literals[ot](obj);\n\n return name in obj;\n};\n","/*!\n * chai\n * Copyright(c) 2011 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Main exports\n */\n\nvar exports = module.exports = {};\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 value\n */\n\nexports.getPathValue = require('./getPathValue');\n\n/*!\n * Deep path info\n */\n\nexports.getPathInfo = require('./getPathInfo');\n\n/*!\n * Check if a property exists\n */\n\nexports.hasProperty = require('./hasProperty');\n\n/*!\n * Function name\n */\n\nexports.getName = require('./getName');\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","// This is (almost) directly from Node.js utils\n// https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/util.js\n\nvar getName = require('./getName');\nvar getProperties = require('./getProperties');\nvar getEnumerableProperties = require('./getEnumerableProperties');\n\nmodule.exports = inspect;\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 {Boolean} showHidden Flag that shows hidden (not enumerable)\n * properties of objects.\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 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);\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 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 // Some type of object without properties can be shortcutted.\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 var name = getName(value);\n var 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 = '', 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 (typeof value === 'function') {\n var name = getName(value);\n var 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 {\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 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 // For some reason typeof null is \"object\", so special case here.\n if (value === null) {\n return ctx.stylize('null', 'null');\n }\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 (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 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;\n if (value.__lookupGetter__) {\n if (value.__lookupGetter__(key)) {\n if (value.__lookupSetter__(key)) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (value.__lookupSetter__(key)) {\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\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.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 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 \n * MIT Licensed\n */\n\n/*!\n * Module dependancies\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 (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 - overwriteChainableMethod utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * ### overwriteChainableMethod (ctx, name, method, chainingBehavior)\n *\n * Overwites 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, 'length',\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.length(3);\n * expect(myFoo).to.have.length.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 (ctx, name, method, chainingBehavior) {\n var chainableBehavior = ctx.__methods[name];\n\n var _chainingBehavior = chainableBehavior.chainingBehavior;\n chainableBehavior.chainingBehavior = function () {\n var result = chainingBehavior(_chainingBehavior).call(this);\n return result === undefined ? this : result;\n };\n\n var _method = chainableBehavior.method;\n chainableBehavior.method = function () {\n var result = method(_method).apply(this, arguments);\n return result === undefined ? this : result;\n };\n};\n","/*!\n * Chai - overwriteMethod utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * ### overwriteMethod (ctx, name, fn)\n *\n * Overwites 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 (ctx, name, method) {\n var _method = ctx[name]\n , _super = function () { return this; };\n\n if (_method && 'function' === typeof _method)\n _super = _method;\n\n ctx[name] = function () {\n var result = method(_super).apply(this, arguments);\n return result === undefined ? this : result;\n }\n};\n","/*!\n * Chai - overwriteProperty utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * ### overwriteProperty (ctx, name, fn)\n *\n * Overwites 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 (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 () {\n var result = getter(_super).call(this);\n return result === undefined ? this : result;\n }\n , configurable: true\n });\n};\n","/*!\n * Chai - test utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Module dependancies\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 (obj, args) {\n var negate = flag(obj, 'negate')\n , expr = args[0];\n return negate ? !expr : expr;\n};\n","/*!\n * Chai - transferFlags utility\n * Copyright(c) 2012-2014 Jake Luer \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`, and `message`)\n * will not be transferred.\n *\n *\n * var newAssertion = new Assertion();\n * utils.transferFlags(assertion, newAssertion);\n *\n * var anotherAsseriton = 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 (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 != 'message')) {\n object.__flags[flag] = flags[flag];\n }\n }\n};\n","\"use strict\";\n\nfunction dedent(strings) {\n\n var raw = void 0;\n if (typeof strings === \"string\") {\n // dedent can be used as a plain function\n raw = [strings];\n } else {\n raw = strings.raw;\n }\n\n // first, perform interpolation\n var result = \"\";\n for (var i = 0; i < raw.length; i++) {\n result += raw[i].\n // join lines when there is a suppressed newline\n replace(/\\\\\\n[ \\t]*/g, \"\").\n\n // handle escaped backticks\n replace(/\\\\`/g, \"`\");\n\n if (i < (arguments.length <= 1 ? 0 : arguments.length - 1)) {\n result += arguments.length <= i + 1 ? undefined : arguments[i + 1];\n }\n }\n\n // now strip indentation\n var lines = result.split(\"\\n\");\n var mindent = null;\n lines.forEach(function (l) {\n var m = l.match(/^(\\s+)\\S+/);\n if (m) {\n var indent = m[1].length;\n if (!mindent) {\n // this is the first indented line\n mindent = indent;\n } else {\n mindent = Math.min(mindent, indent);\n }\n }\n });\n\n if (mindent !== null) {\n result = lines.map(function (l) {\n return l[0] === \" \" ? l.slice(mindent) : l;\n }).join(\"\\n\");\n }\n\n // dedent eats leading and trailing whitespace too\n result = result.trim();\n\n // handle escaped newlines at the end to ensure they don't get stripped too\n return result.replace(/\\\\n/g, \"\\n\");\n}\n\nif (typeof module !== \"undefined\") {\n module.exports = dedent;\n}\n","module.exports = require('./lib/eql');\n","/*!\n * deep-eql\n * Copyright(c) 2013 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Module dependencies\n */\n\nvar type = require('type-detect');\n\n/*!\n * Buffer.isBuffer browser shim\n */\n\nvar Buffer;\ntry { Buffer = require('buffer').Buffer; }\ncatch(ex) {\n Buffer = {};\n Buffer.isBuffer = function() { return false; }\n}\n\n/*!\n * Primary Export\n */\n\nmodule.exports = deepEqual;\n\n/**\n * Assert super-strict (egal) equality between\n * two objects of any type.\n *\n * @param {Mixed} a\n * @param {Mixed} b\n * @param {Array} memoised (optional)\n * @return {Boolean} equal match\n */\n\nfunction deepEqual(a, b, m) {\n if (sameValue(a, b)) {\n return true;\n } else if ('date' === type(a)) {\n return dateEqual(a, b);\n } else if ('regexp' === type(a)) {\n return regexpEqual(a, b);\n } else if (Buffer.isBuffer(a)) {\n return bufferEqual(a, b);\n } else if ('arguments' === type(a)) {\n return argumentsEqual(a, b, m);\n } else if (!typeEqual(a, b)) {\n return false;\n } else if (('object' !== type(a) && 'object' !== type(b))\n && ('array' !== type(a) && 'array' !== type(b))) {\n return sameValue(a, b);\n } else {\n return objectEqual(a, b, m);\n }\n}\n\n/*!\n * Strict (egal) equality test. Ensures that NaN always\n * equals NaN and `-0` does not equal `+0`.\n *\n * @param {Mixed} a\n * @param {Mixed} b\n * @return {Boolean} equal match\n */\n\nfunction sameValue(a, b) {\n if (a === b) return a !== 0 || 1 / a === 1 / b;\n return a !== a && b !== b;\n}\n\n/*!\n * Compare the types of two given objects and\n * return if they are equal. Note that an Array\n * has a type of `array` (not `object`) and arguments\n * have a type of `arguments` (not `array`/`object`).\n *\n * @param {Mixed} a\n * @param {Mixed} b\n * @return {Boolean} result\n */\n\nfunction typeEqual(a, b) {\n return type(a) === type(b);\n}\n\n/*!\n * Compare two Date objects by asserting that\n * the time values are equal using `saveValue`.\n *\n * @param {Date} a\n * @param {Date} b\n * @return {Boolean} result\n */\n\nfunction dateEqual(a, b) {\n if ('date' !== type(b)) return false;\n return sameValue(a.getTime(), b.getTime());\n}\n\n/*!\n * Compare two regular expressions by converting them\n * to string and checking for `sameValue`.\n *\n * @param {RegExp} a\n * @param {RegExp} b\n * @return {Boolean} result\n */\n\nfunction regexpEqual(a, b) {\n if ('regexp' !== type(b)) return false;\n return sameValue(a.toString(), b.toString());\n}\n\n/*!\n * Assert deep equality of two `arguments` objects.\n * Unfortunately, these must be sliced to arrays\n * prior to test to ensure no bad behavior.\n *\n * @param {Arguments} a\n * @param {Arguments} b\n * @param {Array} memoize (optional)\n * @return {Boolean} result\n */\n\nfunction argumentsEqual(a, b, m) {\n if ('arguments' !== type(b)) return false;\n a = [].slice.call(a);\n b = [].slice.call(b);\n return deepEqual(a, b, m);\n}\n\n/*!\n * Get enumerable properties of a given object.\n *\n * @param {Object} a\n * @return {Array} property names\n */\n\nfunction enumerable(a) {\n var res = [];\n for (var key in a) res.push(key);\n return res;\n}\n\n/*!\n * Simple equality for flat iterable objects\n * such as Arrays or Node.js buffers.\n *\n * @param {Iterable} a\n * @param {Iterable} b\n * @return {Boolean} result\n */\n\nfunction iterableEqual(a, b) {\n if (a.length !== b.length) return false;\n\n var i = 0;\n var match = true;\n\n for (; i < a.length; i++) {\n if (a[i] !== b[i]) {\n match = false;\n break;\n }\n }\n\n return match;\n}\n\n/*!\n * Extension to `iterableEqual` specifically\n * for Node.js Buffers.\n *\n * @param {Buffer} a\n * @param {Mixed} b\n * @return {Boolean} result\n */\n\nfunction bufferEqual(a, b) {\n if (!Buffer.isBuffer(b)) return false;\n return iterableEqual(a, b);\n}\n\n/*!\n * Block for `objectEqual` ensuring non-existing\n * values don't get in.\n *\n * @param {Mixed} object\n * @return {Boolean} result\n */\n\nfunction isValue(a) {\n return a !== null && a !== undefined;\n}\n\n/*!\n * Recursively check the equality of two objects.\n * Once basic sameness has been established it will\n * defer to `deepEqual` for each enumerable key\n * in the object.\n *\n * @param {Mixed} a\n * @param {Mixed} b\n * @return {Boolean} result\n */\n\nfunction objectEqual(a, b, m) {\n if (!isValue(a) || !isValue(b)) {\n return false;\n }\n\n if (a.prototype !== b.prototype) {\n return false;\n }\n\n var i;\n if (m) {\n for (i = 0; i < m.length; i++) {\n if ((m[i][0] === a && m[i][1] === b)\n || (m[i][0] === b && m[i][1] === a)) {\n return true;\n }\n }\n } else {\n m = [];\n }\n\n try {\n var ka = enumerable(a);\n var kb = enumerable(b);\n } catch (ex) {\n return false;\n }\n\n ka.sort();\n kb.sort();\n\n if (!iterableEqual(ka, kb)) {\n return false;\n }\n\n m.push([ a, b ]);\n\n var key;\n for (i = ka.length - 1; i >= 0; i--) {\n key = ka[i];\n if (!deepEqual(a[key], b[key], m)) {\n return false;\n }\n }\n\n return true;\n}\n","/*!\n localForage -- Offline Storage, Improved\n Version 1.5.0\n https://localforage.github.io/localForage\n (c) 2013-2017 Mozilla, Apache License 2.0\n*/\n(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.localforage = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw (f.code=\"MODULE_NOT_FOUND\", f)}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var scriptEl = global.document.createElement('script');\n scriptEl.onreadystatechange = function () {\n nextTick();\n\n scriptEl.onreadystatechange = null;\n scriptEl.parentNode.removeChild(scriptEl);\n scriptEl = null;\n };\n global.document.documentElement.appendChild(scriptEl);\n };\n } else {\n scheduleDrain = function () {\n setTimeout(nextTick, 0);\n };\n }\n}\n\nvar draining;\nvar queue = [];\n//named nextTick for less confusing stack traces\nfunction nextTick() {\n draining = true;\n var i, oldQueue;\n var len = queue.length;\n while (len) {\n oldQueue = queue;\n queue = [];\n i = -1;\n while (++i < len) {\n oldQueue[i]();\n }\n len = queue.length;\n }\n draining = false;\n}\n\nmodule.exports = immediate;\nfunction immediate(task) {\n if (queue.push(task) === 1 && !draining) {\n scheduleDrain();\n }\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{}],2:[function(_dereq_,module,exports){\n'use strict';\nvar immediate = _dereq_(1);\n\n/* istanbul ignore next */\nfunction INTERNAL() {}\n\nvar handlers = {};\n\nvar REJECTED = ['REJECTED'];\nvar FULFILLED = ['FULFILLED'];\nvar PENDING = ['PENDING'];\n\nmodule.exports = exports = Promise;\n\nfunction Promise(resolver) {\n if (typeof resolver !== 'function') {\n throw new TypeError('resolver must be a function');\n }\n this.state = PENDING;\n this.queue = [];\n this.outcome = void 0;\n if (resolver !== INTERNAL) {\n safelyResolveThenable(this, resolver);\n }\n}\n\nPromise.prototype[\"catch\"] = function (onRejected) {\n return this.then(null, onRejected);\n};\nPromise.prototype.then = function (onFulfilled, onRejected) {\n if (typeof onFulfilled !== 'function' && this.state === FULFILLED ||\n typeof onRejected !== 'function' && this.state === REJECTED) {\n return this;\n }\n var promise = new this.constructor(INTERNAL);\n if (this.state !== PENDING) {\n var resolver = this.state === FULFILLED ? onFulfilled : onRejected;\n unwrap(promise, resolver, this.outcome);\n } else {\n this.queue.push(new QueueItem(promise, onFulfilled, onRejected));\n }\n\n return promise;\n};\nfunction QueueItem(promise, onFulfilled, onRejected) {\n this.promise = promise;\n if (typeof onFulfilled === 'function') {\n this.onFulfilled = onFulfilled;\n this.callFulfilled = this.otherCallFulfilled;\n }\n if (typeof onRejected === 'function') {\n this.onRejected = onRejected;\n this.callRejected = this.otherCallRejected;\n }\n}\nQueueItem.prototype.callFulfilled = function (value) {\n handlers.resolve(this.promise, value);\n};\nQueueItem.prototype.otherCallFulfilled = function (value) {\n unwrap(this.promise, this.onFulfilled, value);\n};\nQueueItem.prototype.callRejected = function (value) {\n handlers.reject(this.promise, value);\n};\nQueueItem.prototype.otherCallRejected = function (value) {\n unwrap(this.promise, this.onRejected, value);\n};\n\nfunction unwrap(promise, func, value) {\n immediate(function () {\n var returnValue;\n try {\n returnValue = func(value);\n } catch (e) {\n return handlers.reject(promise, e);\n }\n if (returnValue === promise) {\n handlers.reject(promise, new TypeError('Cannot resolve promise with itself'));\n } else {\n handlers.resolve(promise, returnValue);\n }\n });\n}\n\nhandlers.resolve = function (self, value) {\n var result = tryCatch(getThen, value);\n if (result.status === 'error') {\n return handlers.reject(self, result.value);\n }\n var thenable = result.value;\n\n if (thenable) {\n safelyResolveThenable(self, thenable);\n } else {\n self.state = FULFILLED;\n self.outcome = value;\n var i = -1;\n var len = self.queue.length;\n while (++i < len) {\n self.queue[i].callFulfilled(value);\n }\n }\n return self;\n};\nhandlers.reject = function (self, error) {\n self.state = REJECTED;\n self.outcome = error;\n var i = -1;\n var len = self.queue.length;\n while (++i < len) {\n self.queue[i].callRejected(error);\n }\n return self;\n};\n\nfunction getThen(obj) {\n // Make sure we only access the accessor once as required by the spec\n var then = obj && obj.then;\n if (obj && typeof obj === 'object' && typeof then === 'function') {\n return function appyThen() {\n then.apply(obj, arguments);\n };\n }\n}\n\nfunction safelyResolveThenable(self, thenable) {\n // Either fulfill, reject or reject with error\n var called = false;\n function onError(value) {\n if (called) {\n return;\n }\n called = true;\n handlers.reject(self, value);\n }\n\n function onSuccess(value) {\n if (called) {\n return;\n }\n called = true;\n handlers.resolve(self, value);\n }\n\n function tryToUnwrap() {\n thenable(onSuccess, onError);\n }\n\n var result = tryCatch(tryToUnwrap);\n if (result.status === 'error') {\n onError(result.value);\n }\n}\n\nfunction tryCatch(func, value) {\n var out = {};\n try {\n out.value = func(value);\n out.status = 'success';\n } catch (e) {\n out.status = 'error';\n out.value = e;\n }\n return out;\n}\n\nexports.resolve = resolve;\nfunction resolve(value) {\n if (value instanceof this) {\n return value;\n }\n return handlers.resolve(new this(INTERNAL), value);\n}\n\nexports.reject = reject;\nfunction reject(reason) {\n var promise = new this(INTERNAL);\n return handlers.reject(promise, reason);\n}\n\nexports.all = all;\nfunction all(iterable) {\n var self = this;\n if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n return this.reject(new TypeError('must be an array'));\n }\n\n var len = iterable.length;\n var called = false;\n if (!len) {\n return this.resolve([]);\n }\n\n var values = new Array(len);\n var resolved = 0;\n var i = -1;\n var promise = new this(INTERNAL);\n\n while (++i < len) {\n allResolver(iterable[i], i);\n }\n return promise;\n function allResolver(value, i) {\n self.resolve(value).then(resolveFromAll, function (error) {\n if (!called) {\n called = true;\n handlers.reject(promise, error);\n }\n });\n function resolveFromAll(outValue) {\n values[i] = outValue;\n if (++resolved === len && !called) {\n called = true;\n handlers.resolve(promise, values);\n }\n }\n }\n}\n\nexports.race = race;\nfunction race(iterable) {\n var self = this;\n if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n return this.reject(new TypeError('must be an array'));\n }\n\n var len = iterable.length;\n var called = false;\n if (!len) {\n return this.resolve([]);\n }\n\n var i = -1;\n var promise = new this(INTERNAL);\n\n while (++i < len) {\n resolver(iterable[i]);\n }\n return promise;\n function resolver(value) {\n self.resolve(value).then(function (response) {\n if (!called) {\n called = true;\n handlers.resolve(promise, response);\n }\n }, function (error) {\n if (!called) {\n called = true;\n handlers.reject(promise, error);\n }\n });\n }\n}\n\n},{\"1\":1}],3:[function(_dereq_,module,exports){\n(function (global){\n'use strict';\nif (typeof global.Promise !== 'function') {\n global.Promise = _dereq_(2);\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"2\":2}],4:[function(_dereq_,module,exports){\n'use strict';\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction getIDB() {\n /* global indexedDB,webkitIndexedDB,mozIndexedDB,OIndexedDB,msIndexedDB */\n try {\n if (typeof indexedDB !== 'undefined') {\n return indexedDB;\n }\n if (typeof webkitIndexedDB !== 'undefined') {\n return webkitIndexedDB;\n }\n if (typeof mozIndexedDB !== 'undefined') {\n return mozIndexedDB;\n }\n if (typeof OIndexedDB !== 'undefined') {\n return OIndexedDB;\n }\n if (typeof msIndexedDB !== 'undefined') {\n return msIndexedDB;\n }\n } catch (e) {}\n}\n\nvar idb = getIDB();\n\nfunction isIndexedDBValid() {\n try {\n // Initialize IndexedDB; fall back to vendor-prefixed versions\n // if needed.\n if (!idb) {\n return false;\n }\n // We mimic PouchDB here;\n //\n // We test for openDatabase because IE Mobile identifies itself\n // as Safari. Oh the lulz...\n var isSafari = typeof openDatabase !== 'undefined' && /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform);\n\n var hasFetch = typeof fetch === 'function' && fetch.toString().indexOf('[native code') !== -1;\n\n // Safari <10.1 does not meet our requirements for IDB support (#5572)\n // since Safari 10.1 shipped with fetch, we can use that to detect it\n return (!isSafari || hasFetch) && typeof indexedDB !== 'undefined' &&\n // some outdated implementations of IDB that appear on Samsung\n // and HTC Android devices <4.4 are missing IDBKeyRange\n typeof IDBKeyRange !== 'undefined';\n } catch (e) {\n return false;\n }\n}\n\nfunction isWebSQLValid() {\n return typeof openDatabase === 'function';\n}\n\nfunction isLocalStorageValid() {\n try {\n return typeof localStorage !== 'undefined' && 'setItem' in localStorage && localStorage.setItem;\n } catch (e) {\n return false;\n }\n}\n\n// Abstracts constructing a Blob object, so it also works in older\n// browsers that don't support the native Blob constructor. (i.e.\n// old QtWebKit versions, at least).\n// Abstracts constructing a Blob object, so it also works in older\n// browsers that don't support the native Blob constructor. (i.e.\n// old QtWebKit versions, at least).\nfunction createBlob(parts, properties) {\n /* global BlobBuilder,MSBlobBuilder,MozBlobBuilder,WebKitBlobBuilder */\n parts = parts || [];\n properties = properties || {};\n try {\n return new Blob(parts, properties);\n } catch (e) {\n if (e.name !== 'TypeError') {\n throw e;\n }\n var Builder = typeof BlobBuilder !== 'undefined' ? BlobBuilder : typeof MSBlobBuilder !== 'undefined' ? MSBlobBuilder : typeof MozBlobBuilder !== 'undefined' ? MozBlobBuilder : WebKitBlobBuilder;\n var builder = new Builder();\n for (var i = 0; i < parts.length; i += 1) {\n builder.append(parts[i]);\n }\n return builder.getBlob(properties.type);\n }\n}\n\n// This is CommonJS because lie is an external dependency, so Rollup\n// can just ignore it.\nif (typeof Promise === 'undefined') {\n // In the \"nopromises\" build this will just throw if you don't have\n // a global promise object, but it would throw anyway later.\n _dereq_(3);\n}\nvar Promise$1 = Promise;\n\nfunction executeCallback(promise, callback) {\n if (callback) {\n promise.then(function (result) {\n callback(null, result);\n }, function (error) {\n callback(error);\n });\n }\n}\n\nfunction executeTwoCallbacks(promise, callback, errorCallback) {\n if (typeof callback === 'function') {\n promise.then(callback);\n }\n\n if (typeof errorCallback === 'function') {\n promise[\"catch\"](errorCallback);\n }\n}\n\n// Some code originally from async_storage.js in\n// [Gaia](https://github.com/mozilla-b2g/gaia).\n\nvar DETECT_BLOB_SUPPORT_STORE = 'local-forage-detect-blob-support';\nvar supportsBlobs;\nvar dbContexts;\nvar toString = Object.prototype.toString;\n\n// Transform a binary string to an array buffer, because otherwise\n// weird stuff happens when you try to work with the binary string directly.\n// It is known.\n// From http://stackoverflow.com/questions/14967647/ (continues on next line)\n// encode-decode-image-with-base64-breaks-image (2013-04-21)\nfunction _binStringToArrayBuffer(bin) {\n var length = bin.length;\n var buf = new ArrayBuffer(length);\n var arr = new Uint8Array(buf);\n for (var i = 0; i < length; i++) {\n arr[i] = bin.charCodeAt(i);\n }\n return buf;\n}\n\n//\n// Blobs are not supported in all versions of IndexedDB, notably\n// Chrome <37 and Android <5. In those versions, storing a blob will throw.\n//\n// Various other blob bugs exist in Chrome v37-42 (inclusive).\n// Detecting them is expensive and confusing to users, and Chrome 37-42\n// is at very low usage worldwide, so we do a hacky userAgent check instead.\n//\n// content-type bug: https://code.google.com/p/chromium/issues/detail?id=408120\n// 404 bug: https://code.google.com/p/chromium/issues/detail?id=447916\n// FileReader bug: https://code.google.com/p/chromium/issues/detail?id=447836\n//\n// Code borrowed from PouchDB. See:\n// https://github.com/pouchdb/pouchdb/blob/master/packages/node_modules/pouchdb-adapter-idb/src/blobSupport.js\n//\nfunction _checkBlobSupportWithoutCaching(idb) {\n return new Promise$1(function (resolve) {\n var txn = idb.transaction(DETECT_BLOB_SUPPORT_STORE, 'readwrite');\n var blob = createBlob(['']);\n txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob, 'key');\n\n txn.onabort = function (e) {\n // If the transaction aborts now its due to not being able to\n // write to the database, likely due to the disk being full\n e.preventDefault();\n e.stopPropagation();\n resolve(false);\n };\n\n txn.oncomplete = function () {\n var matchedChrome = navigator.userAgent.match(/Chrome\\/(\\d+)/);\n var matchedEdge = navigator.userAgent.match(/Edge\\//);\n // MS Edge pretends to be Chrome 42:\n // https://msdn.microsoft.com/en-us/library/hh869301%28v=vs.85%29.aspx\n resolve(matchedEdge || !matchedChrome || parseInt(matchedChrome[1], 10) >= 43);\n };\n })[\"catch\"](function () {\n return false; // error, so assume unsupported\n });\n}\n\nfunction _checkBlobSupport(idb) {\n if (typeof supportsBlobs === 'boolean') {\n return Promise$1.resolve(supportsBlobs);\n }\n return _checkBlobSupportWithoutCaching(idb).then(function (value) {\n supportsBlobs = value;\n return supportsBlobs;\n });\n}\n\nfunction _deferReadiness(dbInfo) {\n var dbContext = dbContexts[dbInfo.name];\n\n // Create a deferred object representing the current database operation.\n var deferredOperation = {};\n\n deferredOperation.promise = new Promise$1(function (resolve) {\n deferredOperation.resolve = resolve;\n });\n\n // Enqueue the deferred operation.\n dbContext.deferredOperations.push(deferredOperation);\n\n // Chain its promise to the database readiness.\n if (!dbContext.dbReady) {\n dbContext.dbReady = deferredOperation.promise;\n } else {\n dbContext.dbReady = dbContext.dbReady.then(function () {\n return deferredOperation.promise;\n });\n }\n}\n\nfunction _advanceReadiness(dbInfo) {\n var dbContext = dbContexts[dbInfo.name];\n\n // Dequeue a deferred operation.\n var deferredOperation = dbContext.deferredOperations.pop();\n\n // Resolve its promise (which is part of the database readiness\n // chain of promises).\n if (deferredOperation) {\n deferredOperation.resolve();\n }\n}\n\nfunction _getConnection(dbInfo, upgradeNeeded) {\n return new Promise$1(function (resolve, reject) {\n\n if (dbInfo.db) {\n if (upgradeNeeded) {\n _deferReadiness(dbInfo);\n dbInfo.db.close();\n } else {\n return resolve(dbInfo.db);\n }\n }\n\n var dbArgs = [dbInfo.name];\n\n if (upgradeNeeded) {\n dbArgs.push(dbInfo.version);\n }\n\n var openreq = idb.open.apply(idb, dbArgs);\n\n if (upgradeNeeded) {\n openreq.onupgradeneeded = function (e) {\n var db = openreq.result;\n try {\n db.createObjectStore(dbInfo.storeName);\n if (e.oldVersion <= 1) {\n // Added when support for blob shims was added\n db.createObjectStore(DETECT_BLOB_SUPPORT_STORE);\n }\n } catch (ex) {\n if (ex.name === 'ConstraintError') {\n console.warn('The database \"' + dbInfo.name + '\"' + ' has been upgraded from version ' + e.oldVersion + ' to version ' + e.newVersion + ', but the storage \"' + dbInfo.storeName + '\" already exists.');\n } else {\n throw ex;\n }\n }\n };\n }\n\n openreq.onerror = function (e) {\n e.preventDefault();\n reject(openreq.error);\n };\n\n openreq.onsuccess = function () {\n resolve(openreq.result);\n _advanceReadiness(dbInfo);\n };\n });\n}\n\nfunction _getOriginalConnection(dbInfo) {\n return _getConnection(dbInfo, false);\n}\n\nfunction _getUpgradedConnection(dbInfo) {\n return _getConnection(dbInfo, true);\n}\n\nfunction _isUpgradeNeeded(dbInfo, defaultVersion) {\n if (!dbInfo.db) {\n return true;\n }\n\n var isNewStore = !dbInfo.db.objectStoreNames.contains(dbInfo.storeName);\n var isDowngrade = dbInfo.version < dbInfo.db.version;\n var isUpgrade = dbInfo.version > dbInfo.db.version;\n\n if (isDowngrade) {\n // If the version is not the default one\n // then warn for impossible downgrade.\n if (dbInfo.version !== defaultVersion) {\n console.warn('The database \"' + dbInfo.name + '\"' + ' can\\'t be downgraded from version ' + dbInfo.db.version + ' to version ' + dbInfo.version + '.');\n }\n // Align the versions to prevent errors.\n dbInfo.version = dbInfo.db.version;\n }\n\n if (isUpgrade || isNewStore) {\n // If the store is new then increment the version (if needed).\n // This will trigger an \"upgradeneeded\" event which is required\n // for creating a store.\n if (isNewStore) {\n var incVersion = dbInfo.db.version + 1;\n if (incVersion > dbInfo.version) {\n dbInfo.version = incVersion;\n }\n }\n\n return true;\n }\n\n return false;\n}\n\n// encode a blob for indexeddb engines that don't support blobs\nfunction _encodeBlob(blob) {\n return new Promise$1(function (resolve, reject) {\n var reader = new FileReader();\n reader.onerror = reject;\n reader.onloadend = function (e) {\n var base64 = btoa(e.target.result || '');\n resolve({\n __local_forage_encoded_blob: true,\n data: base64,\n type: blob.type\n });\n };\n reader.readAsBinaryString(blob);\n });\n}\n\n// decode an encoded blob\nfunction _decodeBlob(encodedBlob) {\n var arrayBuff = _binStringToArrayBuffer(atob(encodedBlob.data));\n return createBlob([arrayBuff], { type: encodedBlob.type });\n}\n\n// is this one of our fancy encoded blobs?\nfunction _isEncodedBlob(value) {\n return value && value.__local_forage_encoded_blob;\n}\n\n// Specialize the default `ready()` function by making it dependent\n// on the current database operations. Thus, the driver will be actually\n// ready when it's been initialized (default) *and* there are no pending\n// operations on the database (initiated by some other instances).\nfunction _fullyReady(callback) {\n var self = this;\n\n var promise = self._initReady().then(function () {\n var dbContext = dbContexts[self._dbInfo.name];\n\n if (dbContext && dbContext.dbReady) {\n return dbContext.dbReady;\n }\n });\n\n executeTwoCallbacks(promise, callback, callback);\n return promise;\n}\n\n// Open the IndexedDB database (automatically creates one if one didn't\n// previously exist), using any options set in the config.\nfunction _initStorage(options) {\n var self = this;\n var dbInfo = {\n db: null\n };\n\n if (options) {\n for (var i in options) {\n dbInfo[i] = options[i];\n }\n }\n\n // Initialize a singleton container for all running localForages.\n if (!dbContexts) {\n dbContexts = {};\n }\n\n // Get the current context of the database;\n var dbContext = dbContexts[dbInfo.name];\n\n // ...or create a new context.\n if (!dbContext) {\n dbContext = {\n // Running localForages sharing a database.\n forages: [],\n // Shared database.\n db: null,\n // Database readiness (promise).\n dbReady: null,\n // Deferred operations on the database.\n deferredOperations: []\n };\n // Register the new context in the global container.\n dbContexts[dbInfo.name] = dbContext;\n }\n\n // Register itself as a running localForage in the current context.\n dbContext.forages.push(self);\n\n // Replace the default `ready()` function with the specialized one.\n if (!self._initReady) {\n self._initReady = self.ready;\n self.ready = _fullyReady;\n }\n\n // Create an array of initialization states of the related localForages.\n var initPromises = [];\n\n function ignoreErrors() {\n // Don't handle errors here,\n // just makes sure related localForages aren't pending.\n return Promise$1.resolve();\n }\n\n for (var j = 0; j < dbContext.forages.length; j++) {\n var forage = dbContext.forages[j];\n if (forage !== self) {\n // Don't wait for itself...\n initPromises.push(forage._initReady()[\"catch\"](ignoreErrors));\n }\n }\n\n // Take a snapshot of the related localForages.\n var forages = dbContext.forages.slice(0);\n\n // Initialize the connection process only when\n // all the related localForages aren't pending.\n return Promise$1.all(initPromises).then(function () {\n dbInfo.db = dbContext.db;\n // Get the connection or open a new one without upgrade.\n return _getOriginalConnection(dbInfo);\n }).then(function (db) {\n dbInfo.db = db;\n if (_isUpgradeNeeded(dbInfo, self._defaultConfig.version)) {\n // Reopen the database for upgrading.\n return _getUpgradedConnection(dbInfo);\n }\n return db;\n }).then(function (db) {\n dbInfo.db = dbContext.db = db;\n self._dbInfo = dbInfo;\n // Share the final connection amongst related localForages.\n for (var k = 0; k < forages.length; k++) {\n var forage = forages[k];\n if (forage !== self) {\n // Self is already up-to-date.\n forage._dbInfo.db = dbInfo.db;\n forage._dbInfo.version = dbInfo.version;\n }\n }\n });\n}\n\nfunction getItem(key, callback) {\n var self = this;\n\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var store = dbInfo.db.transaction(dbInfo.storeName, 'readonly').objectStore(dbInfo.storeName);\n var req = store.get(key);\n\n req.onsuccess = function () {\n var value = req.result;\n if (value === undefined) {\n value = null;\n }\n if (_isEncodedBlob(value)) {\n value = _decodeBlob(value);\n }\n resolve(value);\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Iterate over all items stored in database.\nfunction iterate(iterator, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var store = dbInfo.db.transaction(dbInfo.storeName, 'readonly').objectStore(dbInfo.storeName);\n\n var req = store.openCursor();\n var iterationNumber = 1;\n\n req.onsuccess = function () {\n var cursor = req.result;\n\n if (cursor) {\n var value = cursor.value;\n if (_isEncodedBlob(value)) {\n value = _decodeBlob(value);\n }\n var result = iterator(value, cursor.key, iterationNumber++);\n\n if (result !== void 0) {\n resolve(result);\n } else {\n cursor[\"continue\"]();\n }\n } else {\n resolve();\n }\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n\n return promise;\n}\n\nfunction setItem(key, value, callback) {\n var self = this;\n\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n var promise = new Promise$1(function (resolve, reject) {\n var dbInfo;\n self.ready().then(function () {\n dbInfo = self._dbInfo;\n if (toString.call(value) === '[object Blob]') {\n return _checkBlobSupport(dbInfo.db).then(function (blobSupport) {\n if (blobSupport) {\n return value;\n }\n return _encodeBlob(value);\n });\n }\n return value;\n }).then(function (value) {\n var transaction = dbInfo.db.transaction(dbInfo.storeName, 'readwrite');\n var store = transaction.objectStore(dbInfo.storeName);\n var req = store.put(value, key);\n\n // The reason we don't _save_ null is because IE 10 does\n // not support saving the `null` type in IndexedDB. How\n // ironic, given the bug below!\n // See: https://github.com/mozilla/localForage/issues/161\n if (value === null) {\n value = undefined;\n }\n\n transaction.oncomplete = function () {\n // Cast to undefined so the value passed to\n // callback/promise is the same as what one would get out\n // of `getItem()` later. This leads to some weirdness\n // (setItem('foo', undefined) will return `null`), but\n // it's not my fault localStorage is our baseline and that\n // it's weird.\n if (value === undefined) {\n value = null;\n }\n\n resolve(value);\n };\n transaction.onabort = transaction.onerror = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction removeItem(key, callback) {\n var self = this;\n\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var transaction = dbInfo.db.transaction(dbInfo.storeName, 'readwrite');\n var store = transaction.objectStore(dbInfo.storeName);\n\n // We use a Grunt task to make this safe for IE and some\n // versions of Android (including those used by Cordova).\n // Normally IE won't like `.delete()` and will insist on\n // using `['delete']()`, but we have a build step that\n // fixes this for us now.\n var req = store[\"delete\"](key);\n transaction.oncomplete = function () {\n resolve();\n };\n\n transaction.onerror = function () {\n reject(req.error);\n };\n\n // The request will be also be aborted if we've exceeded our storage\n // space.\n transaction.onabort = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction clear(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var transaction = dbInfo.db.transaction(dbInfo.storeName, 'readwrite');\n var store = transaction.objectStore(dbInfo.storeName);\n var req = store.clear();\n\n transaction.oncomplete = function () {\n resolve();\n };\n\n transaction.onabort = transaction.onerror = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction length(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var store = dbInfo.db.transaction(dbInfo.storeName, 'readonly').objectStore(dbInfo.storeName);\n var req = store.count();\n\n req.onsuccess = function () {\n resolve(req.result);\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction key(n, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n if (n < 0) {\n resolve(null);\n\n return;\n }\n\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var store = dbInfo.db.transaction(dbInfo.storeName, 'readonly').objectStore(dbInfo.storeName);\n\n var advanced = false;\n var req = store.openCursor();\n req.onsuccess = function () {\n var cursor = req.result;\n if (!cursor) {\n // this means there weren't enough keys\n resolve(null);\n\n return;\n }\n\n if (n === 0) {\n // We have the first key, return it if that's what they\n // wanted.\n resolve(cursor.key);\n } else {\n if (!advanced) {\n // Otherwise, ask the cursor to skip ahead n\n // records.\n advanced = true;\n cursor.advance(n);\n } else {\n // When we get here, we've got the nth key.\n resolve(cursor.key);\n }\n }\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var store = dbInfo.db.transaction(dbInfo.storeName, 'readonly').objectStore(dbInfo.storeName);\n\n var req = store.openCursor();\n var keys = [];\n\n req.onsuccess = function () {\n var cursor = req.result;\n\n if (!cursor) {\n resolve(keys);\n return;\n }\n\n keys.push(cursor.key);\n cursor[\"continue\"]();\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar asyncStorage = {\n _driver: 'asyncStorage',\n _initStorage: _initStorage,\n iterate: iterate,\n getItem: getItem,\n setItem: setItem,\n removeItem: removeItem,\n clear: clear,\n length: length,\n key: key,\n keys: keys\n};\n\n// Sadly, the best way to save binary data in WebSQL/localStorage is serializing\n// it to Base64, so this is how we store it to prevent very strange errors with less\n// verbose ways of binary <-> string data storage.\nvar BASE_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\nvar BLOB_TYPE_PREFIX = '~~local_forage_type~';\nvar BLOB_TYPE_PREFIX_REGEX = /^~~local_forage_type~([^~]+)~/;\n\nvar SERIALIZED_MARKER = '__lfsc__:';\nvar SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER.length;\n\n// OMG the serializations!\nvar TYPE_ARRAYBUFFER = 'arbf';\nvar TYPE_BLOB = 'blob';\nvar TYPE_INT8ARRAY = 'si08';\nvar TYPE_UINT8ARRAY = 'ui08';\nvar TYPE_UINT8CLAMPEDARRAY = 'uic8';\nvar TYPE_INT16ARRAY = 'si16';\nvar TYPE_INT32ARRAY = 'si32';\nvar TYPE_UINT16ARRAY = 'ur16';\nvar TYPE_UINT32ARRAY = 'ui32';\nvar TYPE_FLOAT32ARRAY = 'fl32';\nvar TYPE_FLOAT64ARRAY = 'fl64';\nvar TYPE_SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER_LENGTH + TYPE_ARRAYBUFFER.length;\n\nvar toString$1 = Object.prototype.toString;\n\nfunction stringToBuffer(serializedString) {\n // Fill the string into a ArrayBuffer.\n var bufferLength = serializedString.length * 0.75;\n var len = serializedString.length;\n var i;\n var p = 0;\n var encoded1, encoded2, encoded3, encoded4;\n\n if (serializedString[serializedString.length - 1] === '=') {\n bufferLength--;\n if (serializedString[serializedString.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n var buffer = new ArrayBuffer(bufferLength);\n var bytes = new Uint8Array(buffer);\n\n for (i = 0; i < len; i += 4) {\n encoded1 = BASE_CHARS.indexOf(serializedString[i]);\n encoded2 = BASE_CHARS.indexOf(serializedString[i + 1]);\n encoded3 = BASE_CHARS.indexOf(serializedString[i + 2]);\n encoded4 = BASE_CHARS.indexOf(serializedString[i + 3]);\n\n /*jslint bitwise: true */\n bytes[p++] = encoded1 << 2 | encoded2 >> 4;\n bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2;\n bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63;\n }\n return buffer;\n}\n\n// Converts a buffer to a string to store, serialized, in the backend\n// storage library.\nfunction bufferToString(buffer) {\n // base64-arraybuffer\n var bytes = new Uint8Array(buffer);\n var base64String = '';\n var i;\n\n for (i = 0; i < bytes.length; i += 3) {\n /*jslint bitwise: true */\n base64String += BASE_CHARS[bytes[i] >> 2];\n base64String += BASE_CHARS[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4];\n base64String += BASE_CHARS[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6];\n base64String += BASE_CHARS[bytes[i + 2] & 63];\n }\n\n if (bytes.length % 3 === 2) {\n base64String = base64String.substring(0, base64String.length - 1) + '=';\n } else if (bytes.length % 3 === 1) {\n base64String = base64String.substring(0, base64String.length - 2) + '==';\n }\n\n return base64String;\n}\n\n// Serialize a value, afterwards executing a callback (which usually\n// instructs the `setItem()` callback/promise to be executed). This is how\n// we store binary data with localStorage.\nfunction serialize(value, callback) {\n var valueType = '';\n if (value) {\n valueType = toString$1.call(value);\n }\n\n // Cannot use `value instanceof ArrayBuffer` or such here, as these\n // checks fail when running the tests using casper.js...\n //\n // TODO: See why those tests fail and use a better solution.\n if (value && (valueType === '[object ArrayBuffer]' || value.buffer && toString$1.call(value.buffer) === '[object ArrayBuffer]')) {\n // Convert binary arrays to a string and prefix the string with\n // a special marker.\n var buffer;\n var marker = SERIALIZED_MARKER;\n\n if (value instanceof ArrayBuffer) {\n buffer = value;\n marker += TYPE_ARRAYBUFFER;\n } else {\n buffer = value.buffer;\n\n if (valueType === '[object Int8Array]') {\n marker += TYPE_INT8ARRAY;\n } else if (valueType === '[object Uint8Array]') {\n marker += TYPE_UINT8ARRAY;\n } else if (valueType === '[object Uint8ClampedArray]') {\n marker += TYPE_UINT8CLAMPEDARRAY;\n } else if (valueType === '[object Int16Array]') {\n marker += TYPE_INT16ARRAY;\n } else if (valueType === '[object Uint16Array]') {\n marker += TYPE_UINT16ARRAY;\n } else if (valueType === '[object Int32Array]') {\n marker += TYPE_INT32ARRAY;\n } else if (valueType === '[object Uint32Array]') {\n marker += TYPE_UINT32ARRAY;\n } else if (valueType === '[object Float32Array]') {\n marker += TYPE_FLOAT32ARRAY;\n } else if (valueType === '[object Float64Array]') {\n marker += TYPE_FLOAT64ARRAY;\n } else {\n callback(new Error('Failed to get type for BinaryArray'));\n }\n }\n\n callback(marker + bufferToString(buffer));\n } else if (valueType === '[object Blob]') {\n // Conver the blob to a binaryArray and then to a string.\n var fileReader = new FileReader();\n\n fileReader.onload = function () {\n // Backwards-compatible prefix for the blob type.\n var str = BLOB_TYPE_PREFIX + value.type + '~' + bufferToString(this.result);\n\n callback(SERIALIZED_MARKER + TYPE_BLOB + str);\n };\n\n fileReader.readAsArrayBuffer(value);\n } else {\n try {\n callback(JSON.stringify(value));\n } catch (e) {\n console.error(\"Couldn't convert value into a JSON string: \", value);\n\n callback(null, e);\n }\n }\n}\n\n// Deserialize data we've inserted into a value column/field. We place\n// special markers into our strings to mark them as encoded; this isn't\n// as nice as a meta field, but it's the only sane thing we can do whilst\n// keeping localStorage support intact.\n//\n// Oftentimes this will just deserialize JSON content, but if we have a\n// special marker (SERIALIZED_MARKER, defined above), we will extract\n// some kind of arraybuffer/binary data/typed array out of the string.\nfunction deserialize(value) {\n // If we haven't marked this string as being specially serialized (i.e.\n // something other than serialized JSON), we can just return it and be\n // done with it.\n if (value.substring(0, SERIALIZED_MARKER_LENGTH) !== SERIALIZED_MARKER) {\n return JSON.parse(value);\n }\n\n // The following code deals with deserializing some kind of Blob or\n // TypedArray. First we separate out the type of data we're dealing\n // with from the data itself.\n var serializedString = value.substring(TYPE_SERIALIZED_MARKER_LENGTH);\n var type = value.substring(SERIALIZED_MARKER_LENGTH, TYPE_SERIALIZED_MARKER_LENGTH);\n\n var blobType;\n // Backwards-compatible blob type serialization strategy.\n // DBs created with older versions of localForage will simply not have the blob type.\n if (type === TYPE_BLOB && BLOB_TYPE_PREFIX_REGEX.test(serializedString)) {\n var matcher = serializedString.match(BLOB_TYPE_PREFIX_REGEX);\n blobType = matcher[1];\n serializedString = serializedString.substring(matcher[0].length);\n }\n var buffer = stringToBuffer(serializedString);\n\n // Return the right type based on the code/type set during\n // serialization.\n switch (type) {\n case TYPE_ARRAYBUFFER:\n return buffer;\n case TYPE_BLOB:\n return createBlob([buffer], { type: blobType });\n case TYPE_INT8ARRAY:\n return new Int8Array(buffer);\n case TYPE_UINT8ARRAY:\n return new Uint8Array(buffer);\n case TYPE_UINT8CLAMPEDARRAY:\n return new Uint8ClampedArray(buffer);\n case TYPE_INT16ARRAY:\n return new Int16Array(buffer);\n case TYPE_UINT16ARRAY:\n return new Uint16Array(buffer);\n case TYPE_INT32ARRAY:\n return new Int32Array(buffer);\n case TYPE_UINT32ARRAY:\n return new Uint32Array(buffer);\n case TYPE_FLOAT32ARRAY:\n return new Float32Array(buffer);\n case TYPE_FLOAT64ARRAY:\n return new Float64Array(buffer);\n default:\n throw new Error('Unkown type: ' + type);\n }\n}\n\nvar localforageSerializer = {\n serialize: serialize,\n deserialize: deserialize,\n stringToBuffer: stringToBuffer,\n bufferToString: bufferToString\n};\n\n/*\n * Includes code from:\n *\n * base64-arraybuffer\n * https://github.com/niklasvh/base64-arraybuffer\n *\n * Copyright (c) 2012 Niklas von Hertzen\n * Licensed under the MIT license.\n */\n// Open the WebSQL database (automatically creates one if one didn't\n// previously exist), using any options set in the config.\nfunction _initStorage$1(options) {\n var self = this;\n var dbInfo = {\n db: null\n };\n\n if (options) {\n for (var i in options) {\n dbInfo[i] = typeof options[i] !== 'string' ? options[i].toString() : options[i];\n }\n }\n\n var dbInfoPromise = new Promise$1(function (resolve, reject) {\n // Open the database; the openDatabase API will automatically\n // create it for us if it doesn't exist.\n try {\n dbInfo.db = openDatabase(dbInfo.name, String(dbInfo.version), dbInfo.description, dbInfo.size);\n } catch (e) {\n return reject(e);\n }\n\n // Create our key/value table if it doesn't exist.\n dbInfo.db.transaction(function (t) {\n t.executeSql('CREATE TABLE IF NOT EXISTS ' + dbInfo.storeName + ' (id INTEGER PRIMARY KEY, key unique, value)', [], function () {\n self._dbInfo = dbInfo;\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n });\n\n dbInfo.serializer = localforageSerializer;\n return dbInfoPromise;\n}\n\nfunction getItem$1(key, callback) {\n var self = this;\n\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n t.executeSql('SELECT * FROM ' + dbInfo.storeName + ' WHERE key = ? LIMIT 1', [key], function (t, results) {\n var result = results.rows.length ? results.rows.item(0).value : null;\n\n // Check to see if this is serialized content we need to\n // unpack.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n resolve(result);\n }, function (t, error) {\n\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction iterate$1(iterator, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n\n dbInfo.db.transaction(function (t) {\n t.executeSql('SELECT * FROM ' + dbInfo.storeName, [], function (t, results) {\n var rows = results.rows;\n var length = rows.length;\n\n for (var i = 0; i < length; i++) {\n var item = rows.item(i);\n var result = item.value;\n\n // Check to see if this is serialized content\n // we need to unpack.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n result = iterator(result, item.key, i + 1);\n\n // void(0) prevents problems with redefinition\n // of `undefined`.\n if (result !== void 0) {\n resolve(result);\n return;\n }\n }\n\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction _setItem(key, value, callback, retriesLeft) {\n var self = this;\n\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n // The localStorage API doesn't return undefined values in an\n // \"expected\" way, so undefined is always cast to null in all\n // drivers. See: https://github.com/mozilla/localForage/pull/42\n if (value === undefined) {\n value = null;\n }\n\n // Save the original value to pass to the callback.\n var originalValue = value;\n\n var dbInfo = self._dbInfo;\n dbInfo.serializer.serialize(value, function (value, error) {\n if (error) {\n reject(error);\n } else {\n dbInfo.db.transaction(function (t) {\n t.executeSql('INSERT OR REPLACE INTO ' + dbInfo.storeName + ' (key, value) VALUES (?, ?)', [key, value], function () {\n resolve(originalValue);\n }, function (t, error) {\n reject(error);\n });\n }, function (sqlError) {\n // The transaction failed; check\n // to see if it's a quota error.\n if (sqlError.code === sqlError.QUOTA_ERR) {\n // We reject the callback outright for now, but\n // it's worth trying to re-run the transaction.\n // Even if the user accepts the prompt to use\n // more storage on Safari, this error will\n // be called.\n //\n // Try to re-run the transaction.\n if (retriesLeft > 0) {\n resolve(_setItem.apply(self, [key, originalValue, callback, retriesLeft - 1]));\n return;\n }\n reject(sqlError);\n }\n });\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction setItem$1(key, value, callback) {\n return _setItem.apply(this, [key, value, callback, 1]);\n}\n\nfunction removeItem$1(key, callback) {\n var self = this;\n\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n t.executeSql('DELETE FROM ' + dbInfo.storeName + ' WHERE key = ?', [key], function () {\n resolve();\n }, function (t, error) {\n\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Deletes every item in the table.\n// TODO: Find out if this resets the AUTO_INCREMENT number.\nfunction clear$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n t.executeSql('DELETE FROM ' + dbInfo.storeName, [], function () {\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Does a simple `COUNT(key)` to get the number of items stored in\n// localForage.\nfunction length$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n // Ahhh, SQL makes this one soooooo easy.\n t.executeSql('SELECT COUNT(key) as c FROM ' + dbInfo.storeName, [], function (t, results) {\n var result = results.rows.item(0).c;\n\n resolve(result);\n }, function (t, error) {\n\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Return the key located at key index X; essentially gets the key from a\n// `WHERE id = ?`. This is the most efficient way I can think to implement\n// this rarely-used (in my experience) part of the API, but it can seem\n// inconsistent, because we do `INSERT OR REPLACE INTO` on `setItem()`, so\n// the ID of each key will change every time it's updated. Perhaps a stored\n// procedure for the `setItem()` SQL would solve this problem?\n// TODO: Don't change ID on `setItem()`.\nfunction key$1(n, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n t.executeSql('SELECT key FROM ' + dbInfo.storeName + ' WHERE id = ? LIMIT 1', [n + 1], function (t, results) {\n var result = results.rows.length ? results.rows.item(0).key : null;\n resolve(result);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n t.executeSql('SELECT key FROM ' + dbInfo.storeName, [], function (t, results) {\n var keys = [];\n\n for (var i = 0; i < results.rows.length; i++) {\n keys.push(results.rows.item(i).key);\n }\n\n resolve(keys);\n }, function (t, error) {\n\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar webSQLStorage = {\n _driver: 'webSQLStorage',\n _initStorage: _initStorage$1,\n iterate: iterate$1,\n getItem: getItem$1,\n setItem: setItem$1,\n removeItem: removeItem$1,\n clear: clear$1,\n length: length$1,\n key: key$1,\n keys: keys$1\n};\n\n// Config the localStorage backend, using options set in the config.\nfunction _initStorage$2(options) {\n var self = this;\n var dbInfo = {};\n if (options) {\n for (var i in options) {\n dbInfo[i] = options[i];\n }\n }\n\n dbInfo.keyPrefix = dbInfo.name + '/';\n\n if (dbInfo.storeName !== self._defaultConfig.storeName) {\n dbInfo.keyPrefix += dbInfo.storeName + '/';\n }\n\n self._dbInfo = dbInfo;\n dbInfo.serializer = localforageSerializer;\n\n return Promise$1.resolve();\n}\n\n// Remove all keys from the datastore, effectively destroying all data in\n// the app's key/value store!\nfunction clear$2(callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var keyPrefix = self._dbInfo.keyPrefix;\n\n for (var i = localStorage.length - 1; i >= 0; i--) {\n var key = localStorage.key(i);\n\n if (key.indexOf(keyPrefix) === 0) {\n localStorage.removeItem(key);\n }\n }\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Retrieve an item from the store. Unlike the original async_storage\n// library in Gaia, we don't modify return values at all. If a key's value\n// is `undefined`, we pass that value to the callback function.\nfunction getItem$2(key, callback) {\n var self = this;\n\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var result = localStorage.getItem(dbInfo.keyPrefix + key);\n\n // If a result was found, parse it from the serialized\n // string into a JS object. If result isn't truthy, the key\n // is likely undefined and we'll pass it straight to the\n // callback.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n return result;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Iterate over all items in the store.\nfunction iterate$2(iterator, callback) {\n var self = this;\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var keyPrefix = dbInfo.keyPrefix;\n var keyPrefixLength = keyPrefix.length;\n var length = localStorage.length;\n\n // We use a dedicated iterator instead of the `i` variable below\n // so other keys we fetch in localStorage aren't counted in\n // the `iterationNumber` argument passed to the `iterate()`\n // callback.\n //\n // See: github.com/mozilla/localForage/pull/435#discussion_r38061530\n var iterationNumber = 1;\n\n for (var i = 0; i < length; i++) {\n var key = localStorage.key(i);\n if (key.indexOf(keyPrefix) !== 0) {\n continue;\n }\n var value = localStorage.getItem(key);\n\n // If a result was found, parse it from the serialized\n // string into a JS object. If result isn't truthy, the\n // key is likely undefined and we'll pass it straight\n // to the iterator.\n if (value) {\n value = dbInfo.serializer.deserialize(value);\n }\n\n value = iterator(value, key.substring(keyPrefixLength), iterationNumber++);\n\n if (value !== void 0) {\n return value;\n }\n }\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Same as localStorage's key() method, except takes a callback.\nfunction key$2(n, callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var result;\n try {\n result = localStorage.key(n);\n } catch (error) {\n result = null;\n }\n\n // Remove the prefix from the key, if a key is found.\n if (result) {\n result = result.substring(dbInfo.keyPrefix.length);\n }\n\n return result;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys$2(callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var length = localStorage.length;\n var keys = [];\n\n for (var i = 0; i < length; i++) {\n if (localStorage.key(i).indexOf(dbInfo.keyPrefix) === 0) {\n keys.push(localStorage.key(i).substring(dbInfo.keyPrefix.length));\n }\n }\n\n return keys;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Supply the number of keys in the datastore to the callback function.\nfunction length$2(callback) {\n var self = this;\n var promise = self.keys().then(function (keys) {\n return keys.length;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Remove an item from the store, nice and simple.\nfunction removeItem$2(key, callback) {\n var self = this;\n\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n localStorage.removeItem(dbInfo.keyPrefix + key);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Set a key's value and run an optional callback once the value is set.\n// Unlike Gaia's implementation, the callback function is passed the value,\n// in case you want to operate on that value only after you're sure it\n// saved, or something like that.\nfunction setItem$2(key, value, callback) {\n var self = this;\n\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n var promise = self.ready().then(function () {\n // Convert undefined values to null.\n // https://github.com/mozilla/localForage/pull/42\n if (value === undefined) {\n value = null;\n }\n\n // Save the original value to pass to the callback.\n var originalValue = value;\n\n return new Promise$1(function (resolve, reject) {\n var dbInfo = self._dbInfo;\n dbInfo.serializer.serialize(value, function (value, error) {\n if (error) {\n reject(error);\n } else {\n try {\n localStorage.setItem(dbInfo.keyPrefix + key, value);\n resolve(originalValue);\n } catch (e) {\n // localStorage capacity exceeded.\n // TODO: Make this a specific error/event.\n if (e.name === 'QuotaExceededError' || e.name === 'NS_ERROR_DOM_QUOTA_REACHED') {\n reject(e);\n }\n reject(e);\n }\n }\n });\n });\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar localStorageWrapper = {\n _driver: 'localStorageWrapper',\n _initStorage: _initStorage$2,\n // Default API, from Gaia/localStorage.\n iterate: iterate$2,\n getItem: getItem$2,\n setItem: setItem$2,\n removeItem: removeItem$2,\n clear: clear$2,\n length: length$2,\n key: key$2,\n keys: keys$2\n};\n\n// Custom drivers are stored here when `defineDriver()` is called.\n// They are shared across all instances of localForage.\nvar CustomDrivers = {};\n\nvar DriverType = {\n INDEXEDDB: 'asyncStorage',\n LOCALSTORAGE: 'localStorageWrapper',\n WEBSQL: 'webSQLStorage'\n};\n\nvar DefaultDriverOrder = [DriverType.INDEXEDDB, DriverType.WEBSQL, DriverType.LOCALSTORAGE];\n\nvar LibraryMethods = ['clear', 'getItem', 'iterate', 'key', 'keys', 'length', 'removeItem', 'setItem'];\n\nvar DefaultConfig = {\n description: '',\n driver: DefaultDriverOrder.slice(),\n name: 'localforage',\n // Default DB size is _JUST UNDER_ 5MB, as it's the highest size\n // we can use without a prompt.\n size: 4980736,\n storeName: 'keyvaluepairs',\n version: 1.0\n};\n\nvar driverSupport = {};\n// Check to see if IndexedDB is available and if it is the latest\n// implementation; it's our preferred backend library. We use \"_spec_test\"\n// as the name of the database because it's not the one we'll operate on,\n// but it's useful to make sure its using the right spec.\n// See: https://github.com/mozilla/localForage/issues/128\ndriverSupport[DriverType.INDEXEDDB] = isIndexedDBValid();\n\ndriverSupport[DriverType.WEBSQL] = isWebSQLValid();\n\ndriverSupport[DriverType.LOCALSTORAGE] = isLocalStorageValid();\n\nvar isArray = Array.isArray || function (arg) {\n return Object.prototype.toString.call(arg) === '[object Array]';\n};\n\nfunction callWhenReady(localForageInstance, libraryMethod) {\n localForageInstance[libraryMethod] = function () {\n var _args = arguments;\n return localForageInstance.ready().then(function () {\n return localForageInstance[libraryMethod].apply(localForageInstance, _args);\n });\n };\n}\n\nfunction extend() {\n for (var i = 1; i < arguments.length; i++) {\n var arg = arguments[i];\n\n if (arg) {\n for (var key in arg) {\n if (arg.hasOwnProperty(key)) {\n if (isArray(arg[key])) {\n arguments[0][key] = arg[key].slice();\n } else {\n arguments[0][key] = arg[key];\n }\n }\n }\n }\n }\n\n return arguments[0];\n}\n\nfunction isLibraryDriver(driverName) {\n for (var driver in DriverType) {\n if (DriverType.hasOwnProperty(driver) && DriverType[driver] === driverName) {\n return true;\n }\n }\n\n return false;\n}\n\nvar LocalForage = function () {\n function LocalForage(options) {\n _classCallCheck(this, LocalForage);\n\n this.INDEXEDDB = DriverType.INDEXEDDB;\n this.LOCALSTORAGE = DriverType.LOCALSTORAGE;\n this.WEBSQL = DriverType.WEBSQL;\n\n this._defaultConfig = extend({}, DefaultConfig);\n this._config = extend({}, this._defaultConfig, options);\n this._driverSet = null;\n this._initDriver = null;\n this._ready = false;\n this._dbInfo = null;\n\n this._wrapLibraryMethodsWithReady();\n this.setDriver(this._config.driver)[\"catch\"](function () {});\n }\n\n // Set any config values for localForage; can be called anytime before\n // the first API call (e.g. `getItem`, `setItem`).\n // We loop through options so we don't overwrite existing config\n // values.\n\n\n LocalForage.prototype.config = function config(options) {\n // If the options argument is an object, we use it to set values.\n // Otherwise, we return either a specified config value or all\n // config values.\n if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') {\n // If localforage is ready and fully initialized, we can't set\n // any new configuration values. Instead, we return an error.\n if (this._ready) {\n return new Error(\"Can't call config() after localforage \" + 'has been used.');\n }\n\n for (var i in options) {\n if (i === 'storeName') {\n options[i] = options[i].replace(/\\W/g, '_');\n }\n\n if (i === 'version' && typeof options[i] !== 'number') {\n return new Error('Database version must be a number.');\n }\n\n this._config[i] = options[i];\n }\n\n // after all config options are set and\n // the driver option is used, try setting it\n if ('driver' in options && options.driver) {\n return this.setDriver(this._config.driver);\n }\n\n return true;\n } else if (typeof options === 'string') {\n return this._config[options];\n } else {\n return this._config;\n }\n };\n\n // Used to define a custom driver, shared across all instances of\n // localForage.\n\n\n LocalForage.prototype.defineDriver = function defineDriver(driverObject, callback, errorCallback) {\n var promise = new Promise$1(function (resolve, reject) {\n try {\n var driverName = driverObject._driver;\n var complianceError = new Error('Custom driver not compliant; see ' + 'https://mozilla.github.io/localForage/#definedriver');\n var namingError = new Error('Custom driver name already in use: ' + driverObject._driver);\n\n // A driver name should be defined and not overlap with the\n // library-defined, default drivers.\n if (!driverObject._driver) {\n reject(complianceError);\n return;\n }\n if (isLibraryDriver(driverObject._driver)) {\n reject(namingError);\n return;\n }\n\n var customDriverMethods = LibraryMethods.concat('_initStorage');\n for (var i = 0; i < customDriverMethods.length; i++) {\n var customDriverMethod = customDriverMethods[i];\n if (!customDriverMethod || !driverObject[customDriverMethod] || typeof driverObject[customDriverMethod] !== 'function') {\n reject(complianceError);\n return;\n }\n }\n\n var supportPromise = Promise$1.resolve(true);\n if ('_support' in driverObject) {\n if (driverObject._support && typeof driverObject._support === 'function') {\n supportPromise = driverObject._support();\n } else {\n supportPromise = Promise$1.resolve(!!driverObject._support);\n }\n }\n\n supportPromise.then(function (supportResult) {\n driverSupport[driverName] = supportResult;\n CustomDrivers[driverName] = driverObject;\n resolve();\n }, reject);\n } catch (e) {\n reject(e);\n }\n });\n\n executeTwoCallbacks(promise, callback, errorCallback);\n return promise;\n };\n\n LocalForage.prototype.driver = function driver() {\n return this._driver || null;\n };\n\n LocalForage.prototype.getDriver = function getDriver(driverName, callback, errorCallback) {\n var self = this;\n var getDriverPromise = Promise$1.resolve().then(function () {\n if (isLibraryDriver(driverName)) {\n switch (driverName) {\n case self.INDEXEDDB:\n return asyncStorage;\n case self.LOCALSTORAGE:\n return localStorageWrapper;\n case self.WEBSQL:\n return webSQLStorage;\n }\n } else if (CustomDrivers[driverName]) {\n return CustomDrivers[driverName];\n } else {\n throw new Error('Driver not found.');\n }\n });\n executeTwoCallbacks(getDriverPromise, callback, errorCallback);\n return getDriverPromise;\n };\n\n LocalForage.prototype.getSerializer = function getSerializer(callback) {\n var serializerPromise = Promise$1.resolve(localforageSerializer);\n executeTwoCallbacks(serializerPromise, callback);\n return serializerPromise;\n };\n\n LocalForage.prototype.ready = function ready(callback) {\n var self = this;\n\n var promise = self._driverSet.then(function () {\n if (self._ready === null) {\n self._ready = self._initDriver();\n }\n\n return self._ready;\n });\n\n executeTwoCallbacks(promise, callback, callback);\n return promise;\n };\n\n LocalForage.prototype.setDriver = function setDriver(drivers, callback, errorCallback) {\n var self = this;\n\n if (!isArray(drivers)) {\n drivers = [drivers];\n }\n\n var supportedDrivers = this._getSupportedDrivers(drivers);\n\n function setDriverToConfig() {\n self._config.driver = self.driver();\n }\n\n function extendSelfWithDriver(driver) {\n self._extend(driver);\n setDriverToConfig();\n\n self._ready = self._initStorage(self._config);\n return self._ready;\n }\n\n function initDriver(supportedDrivers) {\n return function () {\n var currentDriverIndex = 0;\n\n function driverPromiseLoop() {\n while (currentDriverIndex < supportedDrivers.length) {\n var driverName = supportedDrivers[currentDriverIndex];\n currentDriverIndex++;\n\n self._dbInfo = null;\n self._ready = null;\n\n return self.getDriver(driverName).then(extendSelfWithDriver)[\"catch\"](driverPromiseLoop);\n }\n\n setDriverToConfig();\n var error = new Error('No available storage method found.');\n self._driverSet = Promise$1.reject(error);\n return self._driverSet;\n }\n\n return driverPromiseLoop();\n };\n }\n\n // There might be a driver initialization in progress\n // so wait for it to finish in order to avoid a possible\n // race condition to set _dbInfo\n var oldDriverSetDone = this._driverSet !== null ? this._driverSet[\"catch\"](function () {\n return Promise$1.resolve();\n }) : Promise$1.resolve();\n\n this._driverSet = oldDriverSetDone.then(function () {\n var driverName = supportedDrivers[0];\n self._dbInfo = null;\n self._ready = null;\n\n return self.getDriver(driverName).then(function (driver) {\n self._driver = driver._driver;\n setDriverToConfig();\n self._wrapLibraryMethodsWithReady();\n self._initDriver = initDriver(supportedDrivers);\n });\n })[\"catch\"](function () {\n setDriverToConfig();\n var error = new Error('No available storage method found.');\n self._driverSet = Promise$1.reject(error);\n return self._driverSet;\n });\n\n executeTwoCallbacks(this._driverSet, callback, errorCallback);\n return this._driverSet;\n };\n\n LocalForage.prototype.supports = function supports(driverName) {\n return !!driverSupport[driverName];\n };\n\n LocalForage.prototype._extend = function _extend(libraryMethodsAndProperties) {\n extend(this, libraryMethodsAndProperties);\n };\n\n LocalForage.prototype._getSupportedDrivers = function _getSupportedDrivers(drivers) {\n var supportedDrivers = [];\n for (var i = 0, len = drivers.length; i < len; i++) {\n var driverName = drivers[i];\n if (this.supports(driverName)) {\n supportedDrivers.push(driverName);\n }\n }\n return supportedDrivers;\n };\n\n LocalForage.prototype._wrapLibraryMethodsWithReady = function _wrapLibraryMethodsWithReady() {\n // Add a stub for each driver API method that delays the call to the\n // corresponding driver method until localForage is ready. These stubs\n // will be replaced by the driver methods as soon as the driver is\n // loaded, so there is no performance impact.\n for (var i = 0; i < LibraryMethods.length; i++) {\n callWhenReady(this, LibraryMethods[i]);\n }\n };\n\n LocalForage.prototype.createInstance = function createInstance(options) {\n return new LocalForage(options);\n };\n\n return LocalForage;\n}();\n\n// The actual localForage object that we expose as a module or via a\n// global. It's extended by pulling in one of our other libraries.\n\n\nvar localforage_js = new LocalForage();\n\nmodule.exports = localforage_js;\n\n},{\"3\":3}]},{},[4])(4)\n});","const initial = require('./problems/initial');\nconst arrays = require('./problems/arrays');\n\nmodule.exports = {\n initial: initial,\n arrays: arrays\n};\n","module.exports = [\n {\n name: 'Access Array by index (first)',\n time: 10,\n prompt: 'Return the first value of the Array',\n given: `const fruits = ['apple', 'banana'];\\r`,\n answer: `const fruits = ['apple', 'banana'];\n return fruits[0];`,\n tests: [\n {\n name: 'Correct output',\n test: 'assert.deepEqual(output, \\'apple\\') === undefined'\n },\n {\n name: 'Returns a String',\n test: 'assert.isString(output) === undefined'\n }\n ]\n },\n {\n name: 'Access Array by index (last)',\n time: 10,\n prompt: 'Return the last value of the Array',\n given: `const fruits = ['apple', 'banana', 'orange'];\\r`,\n answer: `const fruits = ['apple', 'banana', 'orange'];\n return fruits[fruits.length - 1];`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, 'orange') === undefined;`\n },\n {\n name: 'Returns a String',\n test: `assert.isString(output) === undefined;`\n }\n ]\n },\n {\n name: 'Access Array by index (second)',\n time: 10,\n prompt: 'Return the second value of the Array',\n given: `const fruits = ['apple', 'banana'];\\r`,\n answer: `const fruits = ['apple', 'banana'];\n return fruits[1];`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, 'banana') === undefined;`\n },\n {\n name: 'Returns a String',\n test: `assert.isString(output) === undefined;`\n }\n ]\n },\n {\n name: 'Array.forEach()',\n time: 20,\n prompt: 'Loop over the array, add an \\'x\\' to the end of each name, push each fruit into a new array, then return the new array.',\n given: `const fruits = ['apple', 'banana'];\\r`,\n answer: `const fruits = ['apple', 'banana'];\n const newFruits = [];\n fruits.forEach(function(item) {\n newFruits.push(item+'x');\n });\n return newFruits;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, ['applex', 'bananax']) === undefined;`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 2 items',\n test: `assert.lengthOf(output, 2) === undefined;`\n }\n ]\n },\n {\n name: 'Array.push()',\n time: 10,\n prompt: `Add 'orange' to the end of the 'fruits' array and return 'fruits'.`,\n given: `const fruits = ['apple', 'banana'];\\r`,\n answer: `const fruits = ['apple', 'banana'];\n fruits.push('orange');\n return fruits;`,\n tests: [\n {\n name: 'Correct output',\n test: `(assert.deepEqual(output, ['apple', 'banana', 'orange']) === undefined);`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 3 items',\n test: `assert.lengthOf(output, 3) === undefined;`\n }\n ]\n },\n {\n name: 'Array.shift()',\n time: 10,\n prompt: `Remove 'apple' from the front of the 'fruits' array and return 'fruits'.`,\n given: `const fruits = ['apple', 'banana', 'orange'];\\r`,\n answer: `const fruits = ['apple', 'banana', 'orange'];\n fruits.shift();\n return fruits;`,\n tests: [\n {\n name: 'Output must be correct',\n test: `assert.deepEqual(output, ['banana', 'orange']) === undefined;`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 2 items',\n test: `assert.lengthOf(output, 2) === undefined;`\n }\n ]\n },\n {\n name: 'Array.unshift()',\n time: 10,\n prompt: `Add 'strawberry' to the front of the 'fruits' array and return 'fruits'.`,\n given: `const fruits = ['apple', 'banana', 'orange'];\\r`,\n answer: `const fruits = ['apple', 'banana', 'orange'];\n fruits.unshift('strawberry');\n return fruits;`,\n tests: [\n {\n name: 'Output must be correct',\n test: `(assert.deepEqual(output, [\n 'strawberry',\n 'apple',\n 'banana',\n 'orange'\n ]) === undefined)`\n },\n {\n name: 'Must return an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 4 items',\n test: `assert.lengthOf(output, 4) === undefined;`\n }\n ]\n },\n {\n name: 'Array.indexOf()',\n time: 10,\n prompt: `Return the index of 'banana' in the Array.`,\n given: `const fruits = ['strawberry', 'banana', 'mango'];\\r`,\n answer: `const fruits = ['strawberry', 'banana', 'mango'];\n const ind = fruits.indexOf('banana');\n return ind;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, 1) === undefined;`\n },\n {\n name: 'Returns a Number',\n test: `assert.isNumber(output) === undefined;`\n }\n ]\n },\n {\n name: 'Array.concat()',\n time: 10,\n prompt: `Merge the two arrays using Array's 'concat()' method. Return the resulting array.`,\n given: `const fruits = ['strawberry', 'banana'];\\rconst otherFruits = ['pear','peach'];\\r`,\n answer: `const fruits = ['strawberry', 'banana'];\n const otherFruits = ['pear','peach'];\n const allTheFruits = fruits.concat(otherFruits);\n return allTheFruits;\\r`,\n tests: [\n {\n name: 'Correct output',\n test: `(assert.deepEqual(output, [\n 'strawberry',\n 'banana',\n 'pear',\n 'peach'\n ]) === undefined\n );`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 4 items',\n test: `assert.lengthOf(output, 4) === undefined;`\n }\n ]\n },\n {\n name: 'Array.join()',\n time: 10,\n prompt: `Mix the two flavors with a '-' using Array's 'join' method. Return the resulting hybrid flavor.`,\n given: `const fruits = ['strawberry', 'banana'];\\r`,\n answer: `const fruits = ['strawberry', 'banana'];\n const hybrid = fruits.join('-');\n return hybrid;\\r`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, 'strawberry-banana') === undefined;`\n },\n {\n name: 'Returns a String',\n test: `assert.isString(output) === undefined;`\n }\n ]\n },\n {\n name: 'Array.slice()',\n time: 20,\n prompt: `Return just the citrus fruits from the 'fruits' array using 'Array.slice()'`,\n given: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\\r`,\n answer: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\n const citrus = fruits.slice(1, 3);\n return citrus;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, ['orange', 'lemon']) === undefined;`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 2 items',\n test: `assert.lengthOf(output, 2) === undefined;`\n }\n ]\n },\n {\n name: 'Array.reverse()',\n time: 10,\n prompt: `Reverse the order of the 'fruit' array using 'Array.reverse()'`,\n given: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\\r`,\n answer: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\n const stiurf = fruits.reverse();\n return stiurf;`,\n tests: [\n {\n name: 'Correct output',\n test: `(assert.deepEqual(output, [\n 'banana',\n 'lemon',\n 'orange',\n 'strawberry'\n ]) === undefined);`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 4 items',\n test: `assert.lengthOf(output, 4) === undefined;`\n },\n {\n name: `First item is 'banana'`,\n test: `assert.deepEqual(output[0], 'banana') === undefined;`\n }\n ]\n },\n {\n name: 'Array.sort()',\n time: 10,\n prompt: `Return the 'fruits' Array after sorting them using 'Array.sort()'.`,\n given: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\\r`,\n answer: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\n const orderlyFruit = fruits.sort();\n return orderlyFruit;`,\n tests: [\n {\n name: 'Correct output',\n test: `(assert.deepEqual(output, [\n 'banana',\n 'lemon',\n 'orange',\n 'strawberry'\n ]) === undefined);`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 4 items',\n test: `assert.lengthOf(output, 4) === undefined;`\n },\n {\n name: `First item is 'banana'`,\n test: `assert.deepEqual(output[0], 'banana') === undefined;`\n }\n ]\n },\n {\n name: 'Array.lastIndexOf()',\n time: 10,\n prompt: `Return the index of the last 'peach' instance in the 'fruit' array using 'Array.lastIndexOf()'`,\n given: `const fruits = ['peach', 'orange', 'lemon', 'peach'];\\r`,\n answer: `const fruits = ['peach', 'orange', 'lemon', 'peach'];\n const wheresTheLastPeach = fruits.lastIndexOf('peach');\n return wheresTheLastPeach;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, 3) === undefined;`\n },\n {\n name: 'Returns a Number',\n test: `assert.isNumber(output) === undefined;`\n }\n ]\n },\n {\n name: 'Array.filter()',\n time: 10,\n prompt: `Return an array of the numbers greater than 5 in 'numbers' using 'Array.filter()'`,\n given: `const numbers = [1, 1, 2, 3, 5, 8, 13, 21];\\r`,\n answer: `const numbers = [1, 1, 2, 3, 5, 8, 13, 21];\n const overFive = numbers.filter(num => num > 5);\n return overFive;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, [8, 13, 21]) === undefined;`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 3 items',\n test: `assert.lengthOf(output, 3) === undefined;`\n },\n {\n name: `First item is 8`,\n test: `assert.deepEqual(output[0], 8) === undefined;`\n }\n ]\n },\n {\n name: 'Array.map()',\n time: 10,\n prompt: `Return an array of 'numbers' array's square roots, using 'Array.map()' and 'Math.sqrt()'`,\n given: `const numbers = [25, 121, 169];\\r`,\n answer: `const numbers = [25, 121, 169];\n const roots = numbers.map(num => Math.sqrt(num));\n return roots;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, [5, 11, 13]) === undefined;`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 3 items',\n test: `assert.lengthOf(output, 3) === undefined;`\n },\n {\n name: `First item is 5`,\n test: `assert.deepEqual(output[0], 5) === undefined;`\n },\n {\n name: `Last item is 13`,\n test: `assert.deepEqual(output[output.length - 1], 13) === undefined;`\n }\n ]\n },\n {\n name: 'Array.every()',\n time: 10,\n prompt: `Return object that returns whether each array contains all even numbers using Array.every().`,\n given: `const evenNumbers = [2, 4, 6, 8];\n const someOddNumbers = [2, 5, 6, 8];\n function isEven(element) {\n \n }\n return {\n evenNumbers: evenNumbers.,\n someOddNumbers: someOddNumbers.\n };`,\n answer: `const evenNumbers = [2, 4, 6, 8];\n const someOddNumbers = [2, 5, 6, 8];\n function isEven(element) {\n return element % 2 === 0\n }\n return {\n evenNumbers: evenNumbers.every(isEven),\n someOddNumbers: someOddNumbers.every(isEven)\n };`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, {\n evenNumbers: true,\n someOddNumbers: false\n }) === undefined;`\n },\n {\n name: 'Returns an Object',\n test: `assert.isObject(output) === undefined;`\n },\n {\n name: 'Object has 2 items',\n test: `assert.lengthOf(Object.keys(output), 2) === undefined;`\n },\n {\n name: `First value is true`,\n test: `assert.isTrue(output.evenNumbers) === undefined;`\n },\n {\n name: `Second value is false`,\n test: `assert.isFalse(output.someOddNumbers) === undefined;`\n }\n ]\n },\n {\n name: 'Array.some()',\n time: 10,\n prompt: `Return 'Object' that returns whether each array contains some odd numbers using 'Array.some()'.`,\n given: `const evenNumbers = [2, 4, 6, 8];\n const someOddNumbers = [2, 4, 7, 8];\n function isOdd(element) {\n \n }\n return {\n evenNumbers: evenNumbers.,\n someOddNumbers: someOddNumbers.\n };`,\n answer: `const evenNumbers = [1, 3, 5, 7];\n const someOddNumbers = [1, 3, 6, 7];\n function isOdd(element) {\n return element % 2 !== 0;\n }\n return {\n evenNumbers: evenNumbers.some(isOdd),\n someOddNumbers: someOddNumbers.some(isOdd)\n };`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, {\n evenNumbers: false,\n someOddNumbers: true\n }) === undefined;`\n },\n {\n name: 'Returns an Object',\n test: `assert.isObject(output) === undefined;`\n },\n {\n name: 'Object has 2 items',\n test: `assert.lengthOf(Object.keys(output), 2) === undefined;`\n },\n {\n name: `First value is false`,\n test: `assert.isFalse(output.evenNumbers) === undefined;`\n },\n {\n name: `Second value is true`,\n test: `assert.isTrue(output.someOddNumbers) === undefined;`\n }\n ]\n }\n // Next problems to create:\n // forEach? fix one above that tried, but can't verify forEach was used\n // some\n // reduce\n // reduceRight\n // Array.from and other ways to turn array-like into array\n];\n","module.exports = [\n {\n name: 'Create Array',\n time: 10,\n prompt: 'Create and return an array that contains \\'apple\\' and \\'banana\\'',\n given: `const fruits = [];\\rreturn fruits;`,\n answer: `const fruits = ['apple', 'banana'];\n return fruits;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, ['apple', 'banana']) === undefined;`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 2 items',\n test: `assert.lengthOf(output, 2) === undefined;`\n }\n ]\n },\n {\n name: 'Array.pop()',\n time: 10,\n prompt: `Remove 'orange' from the end of the 'fruits' array and return 'fruits'.`,\n given: `const fruits = ['apple', 'banana', 'orange'];\\r`,\n answer: `const fruits = ['apple', 'banana', 'orange'];\n fruits.pop();\n return fruits;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, ['apple', 'banana']) === undefined;`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 2 items',\n test: `assert.lengthOf(output, 2) === undefined;`\n }\n ]\n }\n]\n","module.exports = require('./lib/type');\n","/*!\n * type-detect\n * Copyright(c) 2013 jake luer \n * MIT Licensed\n */\n\n/*!\n * Primary Exports\n */\n\nvar exports = module.exports = getType;\n\n/*!\n * Detectable javascript natives\n */\n\nvar natives = {\n '[object Array]': 'array'\n , '[object RegExp]': 'regexp'\n , '[object Function]': 'function'\n , '[object Arguments]': 'arguments'\n , '[object Date]': 'date'\n};\n\n/**\n * ### typeOf (obj)\n *\n * Use several different techniques to determine\n * the type of object being tested.\n *\n *\n * @param {Mixed} object\n * @return {String} object type\n * @api public\n */\n\nfunction getType (obj) {\n var str = Object.prototype.toString.call(obj);\n if (natives[str]) return natives[str];\n if (obj === null) return 'null';\n if (obj === undefined) return 'undefined';\n if (obj === Object(obj)) return 'object';\n return typeof obj;\n}\n\nexports.Library = Library;\n\n/**\n * ### Library\n *\n * Create a repository for custom type detection.\n *\n * ```js\n * var lib = new type.Library;\n * ```\n *\n */\n\nfunction Library () {\n this.tests = {};\n}\n\n/**\n * #### .of (obj)\n *\n * Expose replacement `typeof` detection to the library.\n *\n * ```js\n * if ('string' === lib.of('hello world')) {\n * // ...\n * }\n * ```\n *\n * @param {Mixed} object to test\n * @return {String} type\n */\n\nLibrary.prototype.of = getType;\n\n/**\n * #### .define (type, test)\n *\n * Add a test to for the `.test()` assertion.\n *\n * Can be defined as a regular expression:\n *\n * ```js\n * lib.define('int', /^[0-9]+$/);\n * ```\n *\n * ... or as a function:\n *\n * ```js\n * lib.define('bln', function (obj) {\n * if ('boolean' === lib.of(obj)) return true;\n * var blns = [ 'yes', 'no', 'true', 'false', 1, 0 ];\n * if ('string' === lib.of(obj)) obj = obj.toLowerCase();\n * return !! ~blns.indexOf(obj);\n * });\n * ```\n *\n * @param {String} type\n * @param {RegExp|Function} test\n * @api public\n */\n\nLibrary.prototype.define = function (type, test) {\n if (arguments.length === 1) return this.tests[type];\n this.tests[type] = test;\n return this;\n};\n\n/**\n * #### .test (obj, test)\n *\n * Assert that an object is of type. Will first\n * check natives, and if that does not pass it will\n * use the user defined custom tests.\n *\n * ```js\n * assert(lib.test('1', 'int'));\n * assert(lib.test('yes', 'bln'));\n * ```\n *\n * @param {Mixed} object\n * @param {String} type\n * @return {Boolean} result\n * @api public\n */\n\nLibrary.prototype.test = function (obj, type) {\n if (type === getType(obj)) return true;\n var test = this.tests[type];\n\n if (test && 'regexp' === getType(test)) {\n return test.test(obj);\n } else if (test && 'function' === getType(test)) {\n return test(obj);\n } else {\n throw new ReferenceError('Type test \"' + type + '\" not defined or invalid.');\n }\n};\n","/*!\n * type-detect\n * Copyright(c) 2013 jake luer \n * MIT Licensed\n */\n\n/*!\n * Primary Exports\n */\n\nvar exports = module.exports = getType;\n\n/**\n * ### typeOf (obj)\n *\n * Use several different techniques to determine\n * the type of object being tested.\n *\n *\n * @param {Mixed} object\n * @return {String} object type\n * @api public\n */\nvar objectTypeRegexp = /^\\[object (.*)\\]$/;\n\nfunction getType(obj) {\n var type = Object.prototype.toString.call(obj).match(objectTypeRegexp)[1].toLowerCase();\n // Let \"new String('')\" return 'object'\n if (typeof Promise === 'function' && obj instanceof Promise) return 'promise';\n // PhantomJS has type \"DOMWindow\" for null\n if (obj === null) return 'null';\n // PhantomJS has type \"DOMWindow\" for undefined\n if (obj === undefined) return 'undefined';\n return type;\n}\n\nexports.Library = Library;\n\n/**\n * ### Library\n *\n * Create a repository for custom type detection.\n *\n * ```js\n * var lib = new type.Library;\n * ```\n *\n */\n\nfunction Library() {\n if (!(this instanceof Library)) return new Library();\n this.tests = {};\n}\n\n/**\n * #### .of (obj)\n *\n * Expose replacement `typeof` detection to the library.\n *\n * ```js\n * if ('string' === lib.of('hello world')) {\n * // ...\n * }\n * ```\n *\n * @param {Mixed} object to test\n * @return {String} type\n */\n\nLibrary.prototype.of = getType;\n\n/**\n * #### .define (type, test)\n *\n * Add a test to for the `.test()` assertion.\n *\n * Can be defined as a regular expression:\n *\n * ```js\n * lib.define('int', /^[0-9]+$/);\n * ```\n *\n * ... or as a function:\n *\n * ```js\n * lib.define('bln', function (obj) {\n * if ('boolean' === lib.of(obj)) return true;\n * var blns = [ 'yes', 'no', 'true', 'false', 1, 0 ];\n * if ('string' === lib.of(obj)) obj = obj.toLowerCase();\n * return !! ~blns.indexOf(obj);\n * });\n * ```\n *\n * @param {String} type\n * @param {RegExp|Function} test\n * @api public\n */\n\nLibrary.prototype.define = function(type, test) {\n if (arguments.length === 1) return this.tests[type];\n this.tests[type] = test;\n return this;\n};\n\n/**\n * #### .test (obj, test)\n *\n * Assert that an object is of type. Will first\n * check natives, and if that does not pass it will\n * use the user defined custom tests.\n *\n * ```js\n * assert(lib.test('1', 'int'));\n * assert(lib.test('yes', 'bln'));\n * ```\n *\n * @param {Mixed} object\n * @param {String} type\n * @return {Boolean} result\n * @api public\n */\n\nLibrary.prototype.test = function(obj, type) {\n if (type === getType(obj)) return true;\n var test = this.tests[type];\n\n if (test && 'regexp' === getType(test)) {\n return test.test(obj);\n } else if (test && 'function' === getType(test)) {\n return test(obj);\n } else {\n throw new ReferenceError('Type test \"' + type + '\" not defined or invalid.');\n }\n};\n","(function (document, window) {\n // DEPENDENCIES\n // ============================================================\n const localforage = require('localforage');\n const probs = require('pjs-problems');\n const dedent = require('dedent');\n const assert = require('chai').assert;\n\n // PROBLEM TEMPLATE NICE-IFICATION\n // ============================================================\n\n function dedentStrings(problems) {\n return problems.map(prob => {\n prob.given = dedent(prob.given)\n prob.answer = dedent(prob.answer)\n return prob\n });\n }\n\n\n // PROBLEMS\n // ============================================================\n\n let problems = [];\n Object.keys(probs).forEach(subject => {\n problems.push(...probs[subject]);\n });\n problems = dedentStrings(problems);\n\n\n // CONFIG\n // ============================================================\n\n // Hoist current problem\n let currentProblem;\n\n // Keys to ignore while user is navigating around the textarea but not changing any code\n const ignoreKeyCodes = [\n 9, // Tab\n 37, // Left arrow\n 39, // Right arrow\n 38, // Up arrow\n 40 // Down arrow\n ];\n\n let config = {\n shuffle: true,\n timer: false,\n currentIndex: 0\n };\n\n // Pull config from localforage\n localforage\n .getItem('js_practice_config')\n .then(val => {\n if (val) {\n config = val;\n }\n loadApp(config);\n })\n .catch(err => {\n console.log('localforage err:', err);\n loadApp(config);\n });\n\n function updateLocalstore(config) {\n return localforage\n .setItem('js_practice_config', config)\n .then(val => val)\n .catch(err => {\n console.log('Settings update error:', err);\n });\n }\n\n // HELPERS\n // ============================================================\n\n function debounce(func, wait, immediate) {\n let timeout;\n return function () {\n const context = this;\n const args = arguments;\n const later = function () {\n timeout = null;\n if (!immediate) {\n func.apply(context, args);\n }\n };\n const callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) {\n func.apply(context, args);\n }\n };\n }\n\n // UI\n // ============================================================\n\n // elements\n const problemEl = document.getElementById('problem');\n const codeEl = document.getElementById('code');\n const testSuiteEl = document.getElementById('test-suite');\n const testTotalEl = document.getElementById('test-total');\n const evalConsoleEl = document.getElementById('eval-output');\n const assertConsoleEl = document.getElementById('assert-output');\n const shuffleProblemsButtonEl = document.getElementById('shuffle-problems');\n const previousProblemButtonEl = document.getElementById('prev-problem');\n const nextProblemButtonEl = document.getElementById('next-problem');\n\n // Get indexes\n function getRandomIndex(problemsArr) {\n const ind = Math.floor(Math.random() * problemsArr.length);\n config.currentIndex = ind;\n updateLocalstore(config);\n return ind;\n }\n\n function getPreviousIndex(problemsArr) {\n let probInd;\n const currentIndex = config.currentIndex;\n // If at beginning, go to end\n if (currentIndex === 0) {\n probInd = problemsArr.length - 1;\n } else {\n probInd = currentIndex - 1;\n }\n return probInd;\n }\n\n function getNextIndex(problemsArr) {\n let probInd;\n const currentIndex = config.currentIndex;\n // If at end or invalid, restart series\n if (currentIndex >= problemsArr.length - 1 || currentIndex < 0) {\n probInd = 0;\n } else {\n probInd = currentIndex + 1;\n }\n return probInd;\n }\n\n // Get problems\n function getCurrentProblem(problemsArr) {\n return problemsArr[config.currentIndex];\n }\n\n function previousProblem() {\n console.log('previousProblem!');\n // Activate back button, for visual queue of nav feedback\n previousProblemButtonEl.classList.add('active');\n config.currentIndex = config.shuffle\n ? getRandomIndex(problems)\n : getPreviousIndex(problems);\n updateLocalstore(config).then(() => {\n window.location.reload();\n });\n }\n\n function nextProblem() {\n console.log('nextProblem!');\n // Activate next button, for visual queue of nav feedback\n nextProblemButtonEl.classList.add('active');\n config.currentIndex = config.shuffle\n ? getRandomIndex(problems)\n : getNextIndex(problems);\n updateLocalstore(config).then(() => {\n window.location.reload();\n });\n }\n\n function toggleShuffle() {\n console.log('toggle shuffle!');\n config.shuffle = !config.shuffle; // Flip it\n shuffleProblemsButtonEl.classList.toggle('active');\n previousProblemButtonEl.parentNode.classList.toggle('hidden');\n updateLocalstore(config);\n }\n\n function loadProblem(problemObj) {\n currentProblem = problemObj;\n // Prob question\n problemEl.innerText = problemObj.prompt;\n // Prob given code\n if (problemObj.given) {\n codeEl.value = problemObj.given;\n }\n // Seed the tests, pass (init = true) as second param\n testSuite(null, true);\n }\n\n // TODO: Build the assert errors into the test dom on each update.\n function updateTests(testStatus, init) {\n if (init === true) {\n buildTests(currentProblem.tests);\n }\n updateTestStatus(testStatus);\n }\n\n function buildTests(tests) {\n if (tests) {\n const testsDom = tests\n .map(test => {\n return `
\n
[✘]
\n
${test.name}
\n
`;\n })\n .join('');\n testSuiteEl.innerHTML = testsDom;\n }\n }\n\n function updateTestStatus(testStatuses) {\n if (!testStatuses) {\n throw new Error('No testStatuses provided.');\n }\n // Find out if all tests have passed or not\n let allPassed = true;\n testStatuses.forEach(testPassed => {\n if (testPassed !== true) {\n allPassed = false;\n }\n });\n const testEls = [].slice.call(testSuiteEl.querySelectorAll('.test-state'));\n testEls.forEach((testStatusEl, iter) => {\n if (testStatuses[iter] === true) {\n testStatusEl.innerHTML = '[✓]';\n testStatusEl.classList.remove('fail');\n testStatusEl.classList.add('pass');\n } else {\n testStatusEl.innerHTML = '[✘]';\n testStatusEl.classList.remove('pass');\n testStatusEl.classList.add('fail');\n }\n });\n\n if (allPassed === true) {\n testTotalEl.innerText = 'PASS';\n testTotalEl.classList.remove('fail');\n testTotalEl.classList.add('pass');\n } else {\n testTotalEl.innerText = 'FAIL';\n testTotalEl.classList.remove('pass');\n testTotalEl.classList.add('fail');\n }\n }\n\n function printAssertError(errObj) {\n // Make element string\n let inner = '';\n if (errObj !== null) {\n inner = `\n
\n Expected: ${JSON.stringify(errObj.expected)}\n Actual: ${JSON.stringify(errObj.actual)}\n
`;\n }\n\n // Prepend element\n assertConsoleEl.innerHTML = inner;\n }\n\n function printEvalOutput(errObj, output) {\n // Make element string\n let inner = '';\n if (errObj && errObj.message !== undefined) {\n inner = `\n
\n Syntax Error: ${JSON.stringify(errObj.message)}\n
`;\n } else if (output) {\n inner = `\n
\n Output: ${JSON.stringify(output)}\n
`;\n }\n // Prepend element\n evalConsoleEl.innerHTML = inner;\n }\n\n\n // VERIFICATION LOGIC\n // ============================================================\n\n function testSuite(init) {\n // Show 'working' indicator\n testTotalEl.classList.toggle('working');\n // Run stuff\n const output = getOutput(codeEl.value);\n // Run tests on code, return object/array of test results\n const tested = runTests(output);\n // Hide 'working' indicator\n testTotalEl.classList.toggle('working');\n // Update UI with results\n updateTests(tested, init);\n }\n\n function getOutput(code) {\n let evald = false;\n try {\n evald = eval(`(function(){${code}})()`); // eslint-disable-line no-eval\n printEvalOutput(null, evald); // Print current output\n } catch (err) {\n printEvalOutput(err);\n }\n return evald;\n }\n\n function runTests(output) {\n let tested = false;\n tested = currentProblem.tests.map(test => {\n let testOutcome = false;\n try {\n if (output) {\n testOutcome = eval(test.test);\n }\n printAssertError(null);\n } catch (err) {\n printAssertError(err);\n }\n return testOutcome;\n });\n return tested;\n }\n\n // Wrapped to prevent race with local config retrieval\n function loadApp(config) {\n console.log('loading app!');\n\n // Show current toggle state\n if (config.shuffle === true) {\n shuffleProblemsButtonEl.classList.add('active');\n previousProblemButtonEl.parentNode.classList.add('hidden');\n }\n\n // Keybinding stuff\n // ============================================================\n\n // Debounced code validation\n const debouncedInputValidation = debounce(e => {\n // If not arrow keys or other non-character keys\n if (ignoreKeyCodes.indexOf(e.keyCode) === -1) {\n // Run test suite\n testSuite();\n }\n }, 200);\n\n function problemNav(e) {\n // Go to previous problem keybinding\n // If CMD/CTRL + SHIFT + RETURN/ENTER\n if (config.shuffle === false && e.keyCode === 13 && e.shiftKey && (e.metaKey || e.ctrlKey)) {\n // Go to next problem\n previousProblem();\n } else if (e.keyCode === 13 && !e.shiftKey && (e.metaKey || e.ctrlKey)) {\n // Go to next problem keybinding\n // If CMD/CTRL + RETURN/ENTER\n // Go to next problem\n nextProblem();\n }\n }\n\n // Event Bindings\n // ============================================================\n\n // Bind it up\n codeEl.addEventListener('keydown', debouncedInputValidation);\n document.addEventListener('keydown', problemNav);\n shuffleProblemsButtonEl.addEventListener('click', toggleShuffle);\n previousProblemButtonEl.addEventListener('click', previousProblem);\n nextProblemButtonEl.addEventListener('click', nextProblem);\n\n // Start it up!\n // Load current problem\n const currProb = getCurrentProblem(problems);\n loadProblem(currProb);\n // Initalized test suite with starting failures\n testSuite(true);\n }\n})(document, window);\n"]} \ No newline at end of file +{"version":3,"sources":["node_modules/.registry.npmjs.org/browser-pack/6.0.2/node_modules/browser-pack/_prelude.js","node_modules/.registry.npmjs.org/assertion-error/1.0.2/node_modules/assertion-error/index.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/index.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/assertion.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/config.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/core/assertions.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/interface/assert.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/interface/expect.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/interface/should.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/addChainableMethod.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/addMethod.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/addProperty.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/expectTypes.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/flag.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/getActual.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/getEnumerableProperties.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/getMessage.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/getName.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/getPathInfo.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/getPathValue.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/getProperties.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/hasProperty.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/index.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/inspect.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/objDisplay.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/overwriteMethod.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/overwriteProperty.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/test.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/transferFlags.js","node_modules/.registry.npmjs.org/dedent/0.7.0/node_modules/dedent/dist/dedent.js","node_modules/.registry.npmjs.org/deep-eql/0.1.3/node_modules/deep-eql/index.js","node_modules/.registry.npmjs.org/deep-eql/0.1.3/node_modules/deep-eql/lib/eql.js","node_modules/.registry.npmjs.org/pjs-problems/1.0.3/node_modules/pjs-problems/index.js","node_modules/.registry.npmjs.org/pjs-problems/1.0.3/node_modules/pjs-problems/problems/arrays.js","node_modules/.registry.npmjs.org/pjs-problems/1.0.3/node_modules/pjs-problems/problems/initial.js","node_modules/.registry.npmjs.org/type-detect/0.1.1/node_modules/type-detect/index.js","node_modules/.registry.npmjs.org/type-detect/0.1.1/node_modules/type-detect/lib/type.js","node_modules/.registry.npmjs.org/type-detect/1.0.0/node_modules/type-detect/lib/type.js","src/js/index.js"],"names":["e","t","n","r","s","o","u","a","require","i","f","Error","code","l","exports","call","length","1","module","exclude","excludeProps","res","obj","Object","keys","forEach","key","excludes","indexOf","slice","arguments","args","AssertionError","message","_props","ssf","props","this","showDiff","callee","captureStackTrace","stack","prototype","create","name","constructor","toJSON","used","version","util","use","fn","push","config","assertion","core","expect","should","assert","_chai","Assertion","msg","flag","defineProperty","get","console","warn","includeStack","set","value","addProperty","addMethod","addChainableMethod","chainingBehavior","overwriteProperty","overwriteMethod","overwriteChainableMethod","expr","negateMsg","expected","_actual","ok","test","getMessage","actual","getActual","val","truncateThreshold","chai","_","an","type","toLowerCase","article","charAt","includeChainingBehavior","include","expectTypes","eql","k","property","subset","undefined","inspect","checkArguments","toString","assertEqual","_obj","assertEql","assertAbove","to","have","len","assertLeast","assertBelow","assertMost","assertInstanceOf","getName","assertOwnProperty","hasOwnProperty","assertOwnPropertyDescriptor","descriptor","actualDescriptor","getOwnPropertyDescriptor","assertLengthChain","assertLength","assertMatch","re","exec","assertKeys","str","mixedArgsMsg","Array","any","all","filter","every","last","map","pop","join","sort","assertThrows","errMsg","is","thrown","desiredError","thrownError","RegExp","err","actuallyGot","expectedThrown","respondTo","method","itself","context","satisfy","matcher","result","objDisplay","negate","closeTo","delta","Math","abs","isSubsetOf","superset","cmp","elem","some","elem2","oneOf","list","be","assertChanges","object","prop","initial","assertIncreases","assertDecreases","chain","isNaN","isArray","start","finish","range","isDeep","pathInfo","getPathInfo","hasProperty","exists","isExtensible","TypeError","isSealed","isFrozen","express","errmsg","fail","operator","isOk","isNotOk","not","equal","act","exp","notEqual","strictEqual","notStrictEqual","deepEqual","notDeepEqual","isAbove","abv","above","isAtLeast","atlst","least","isBelow","blw","below","isAtMost","atmst","most","isTrue","isNotTrue","isFalse","isNotFalse","isNull","isNotNull","NaN","isNotNaN","isUndefined","isDefined","isFunction","isNotFunction","isObject","isNotObject","isNotArray","isString","isNotString","isNumber","isNotNumber","isBoolean","isNotBoolean","typeOf","notTypeOf","instanceOf","notInstanceOf","inc","notInclude","match","notMatch","notProperty","deepProperty","deep","notDeepProperty","propertyVal","propertyNotVal","deepPropertyVal","deepPropertyNotVal","lengthOf","throws","errt","errs","assertErr","throw","doesNotThrow","Throw","val2","approximately","sameMembers","set1","set2","same","members","sameDeepMembers","includeMembers","includeDeepMembers","inList","changes","change","doesNotChange","increases","increase","doesNotIncrease","decreases","decrease","doesNotDecrease","ifError","extensible","isNotExtensible","sealed","isNotSealed","frozen","isNotFrozen","alias","as","loadShould","shouldGetter","String","Number","Boolean","valueOf","shouldSetter","enumerable","configurable","writable","val1","exist","Should","transferFlags","hasProtoSupport","excludeNames","Function","apply","ctx","chainableBehavior","__methods","__proto__","getOwnPropertyNames","asserterName","pd","getter","types","index","art","flags","__flags","flagMsg","replace","func","parsePath","path","mArr","parseFloat","p","_getPathValue","parsed","tmp","part","info","parent","proto","getPrototypeOf","literals","number","string","ot","getPathValue","showHidden","depth","colors","formatValue","seen","stylize","recurseTimes","ret","primitive","formatPrimitive","isDOMElement","outerHTML","document","xmlVersion","XMLSerializer","serializeToString","container","createElementNS","appendChild","cloneNode","html","innerHTML","visibleKeys","getEnumerableProperties","getProperties","isError","nameSuffix","isRegExp","isDate","Date","toUTCString","formatError","base","array","braces","output","formatArray","formatProperty","reduceToSingleString","simple","JSON","stringify","Infinity","__lookupGetter__","__lookupSetter__","split","line","substr","numLinesEst","reduce","prev","cur","ar","objectToString","d","HTMLElement","nodeType","nodeName","splice","_chainingBehavior","_method","_super","_get","includeAll","dedent","strings","raw","lines","mindent","m","indent","min","trim","b","sameValue","dateEqual","regexpEqual","Buffer","isBuffer","bufferEqual","argumentsEqual","typeEqual","objectEqual","getTime","iterableEqual","isValue","ka","kb","ex","arrays","time","prompt","given","answer","tests","getType","natives","Library","[object Array]","[object RegExp]","[object Function]","[object Arguments]","[object Date]","of","define","ReferenceError","objectTypeRegexp","Promise","window","dedentStrings","problems","prob","debounce","wait","immediate","timeout","later","callNow","clearTimeout","setTimeout","updateLocalstore","resolve","reject","localStorage","setItem","log","getRandomIndex","problemsArr","ind","floor","random","currentIndex","getPreviousIndex","getNextIndex","getCurrentProblem","previousProblem","previousProblemButtonEl","classList","add","shuffle","then","location","reload","nextProblem","nextProblemButtonEl","toggleShuffle","shuffleProblemsButtonEl","toggle","parentNode","loadProblem","problemObj","currentProblem","problemEl","innerText","codeEl","testSuite","updateTests","testStatus","init","buildTests","updateTestStatus","testsDom","testSuiteEl","testStatuses","allPassed","testPassed","querySelectorAll","testStatusEl","iter","remove","testTotalEl","printAssertError","errObj","inner","assertConsoleEl","printEvalOutput","evalConsoleEl","tested","runTests","getOutput","evald","eval","testOutcome","loadApp","problemNav","keyCode","shiftKey","metaKey","ctrlKey","debouncedInputValidation","ignoreKeyCodes","addEventListener","probs","subject","_problems","_toConsumableArray","timer","getElementById","localConfig","getItem","parse"],"mappings":"CAAA,SAAAA,EAAAC,EAAAC,EAAAC,GAAA,SAAAC,EAAAC,EAAAC,GAAA,IAAAJ,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,IAAAE,EAAA,mBAAAC,SAAAA,QAAA,IAAAF,GAAAC,EAAA,OAAAA,EAAAF,GAAA,GAAA,GAAAI,EAAA,OAAAA,EAAAJ,GAAA,GAAA,IAAAK,EAAA,IAAAC,MAAA,uBAAAN,EAAA,KAAA,MAAAK,EAAAE,KAAA,mBAAAF,EAAA,IAAAG,EAAAX,EAAAG,IAAAS,YAAAb,EAAAI,GAAA,GAAAU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=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o\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 || arguments.callee;\n if (ssf && 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","module.exports = require('./lib/chai');\n","/*!\n * chai\n * Copyright(c) 2011-2014 Jake Luer \n * MIT Licensed\n */\n\nvar used = []\n , exports = module.exports = {};\n\n/*!\n * Chai version\n */\n\nexports.version = '3.5.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(this, util);\n used.push(fn);\n }\n\n return this;\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","/*!\n * chai\n * http://chaijs.com\n * Copyright(c) 2011-2014 Jake Luer \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 * @api private\n */\n\n function Assertion (obj, msg, stack) {\n flag(this, 'ssfi', stack || arguments.callee);\n flag(this, 'object', obj);\n flag(this, 'message', msg);\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 (true !== showDiff) showDiff = false;\n if (true !== config.showDiff) showDiff = false;\n\n if (!ok) {\n var msg = util.getMessage(this, arguments)\n , 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","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","/*!\n * chai\n * http://chaijs.com\n * Copyright(c) 2011-2014 Jake Luer \n * MIT Licensed\n */\n\nmodule.exports = function (chai, _) {\n var Assertion = chai.Assertion\n , toString = Object.prototype.toString\n , flag = _.flag;\n\n /**\n * ### Language Chains\n *\n * The following are provided as chainable getters to\n * improve the readability of your assertions. They\n * do not provide testing capabilities unless they\n * have been overwritten by a plugin.\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 *\n * @name language chains\n * @namespace BDD\n * @api public\n */\n\n [ 'to', 'be', 'been'\n , 'is', 'and', 'has', 'have'\n , 'with', 'that', 'which', 'at'\n , 'of', 'same' ].forEach(function (chain) {\n Assertion.addProperty(chain, function () {\n return this;\n });\n });\n\n /**\n * ### .not\n *\n * Negates any of assertions following in the chain.\n *\n * expect(foo).to.not.equal('bar');\n * expect(goodFn).to.not.throw(Error);\n * expect({ foo: 'baz' }).to.have.property('foo')\n * .and.not.equal('bar');\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 * Sets the `deep` flag, later used by the `equal` and\n * `property` assertions.\n *\n * expect(foo).to.deep.equal({ bar: 'baz' });\n * expect({ foo: { bar: { baz: 'quux' } } })\n * .to.have.deep.property('foo.bar.baz', 'quux');\n *\n * `.deep.property` special characters can be escaped\n * by adding two slashes before the `.` or `[]`.\n *\n * var deepCss = { '.link': { '[target]': 42 }};\n * expect(deepCss).to.have.deep.property('\\\\.link.\\\\[target\\\\]', 42);\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 * ### .any\n *\n * Sets the `any` flag, (opposite of the `all` flag)\n * later used in the `keys` assertion.\n *\n * expect(foo).to.have.any.keys('bar', 'baz');\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 /**\n * ### .all\n *\n * Sets the `all` flag (opposite of the `any` flag)\n * later used by the `keys` assertion.\n *\n * expect(foo).to.have.all.keys('bar', 'baz');\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)\n *\n * The `a` and `an` assertions are aliases that can be\n * used either as language chains or to assert a value's\n * type.\n *\n * // typeof\n * expect('test').to.be.a('string');\n * expect({ foo: 'bar' }).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(new Promise).to.be.a('promise');\n * expect(new Float32Array()).to.be.a('float32array');\n * expect(Symbol()).to.be.a('symbol');\n *\n * // es6 overrides\n * expect({[Symbol.toStringTag]:()=>'foo'}).to.be.a('foo');\n *\n * // language chain\n * expect(foo).to.be.an.instanceof(Foo);\n *\n * @name a\n * @alias an\n * @param {String} type\n * @param {String} message _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)\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(value)\n *\n * The `include` and `contain` assertions can be used as either property\n * based language chains or as methods to assert the inclusion of an object\n * in an array or a substring in a string. When used as language chains,\n * they toggle the `contains` flag for the `keys` assertion.\n *\n * expect([1,2,3]).to.include(2);\n * expect('foobar').to.contain('foo');\n * expect({ foo: 'bar', hello: 'universe' }).to.include.keys('foo');\n *\n * @name include\n * @alias contain\n * @alias includes\n * @alias contains\n * @param {Object|String|Number} obj\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function includeChainingBehavior () {\n flag(this, 'contains', true);\n }\n\n function include (val, msg) {\n _.expectTypes(this, ['array', 'object', 'string']);\n\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n var expected = false;\n\n if (_.type(obj) === 'array' && _.type(val) === 'object') {\n for (var i in obj) {\n if (_.eql(obj[i], val)) {\n expected = true;\n break;\n }\n }\n } else if (_.type(val) === 'object') {\n if (!flag(this, 'negate')) {\n for (var k in val) new Assertion(obj).property(k, val[k]);\n return;\n }\n var subset = {};\n for (var k in val) subset[k] = obj[k];\n expected = _.eql(subset, val);\n } else {\n expected = (obj != undefined) && ~obj.indexOf(val);\n }\n this.assert(\n expected\n , 'expected #{this} to include ' + _.inspect(val)\n , 'expected #{this} to not 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 truthy.\n *\n * expect('everything').to.be.ok;\n * expect(1).to.be.ok;\n * expect(false).to.not.be.ok;\n * expect(undefined).to.not.be.ok;\n * expect(null).to.not.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 `true`.\n *\n * expect(true).to.be.true;\n * expect(1).to.not.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 , this.negate ? false : true\n );\n });\n\n /**\n * ### .false\n *\n * Asserts that the target is `false`.\n *\n * expect(false).to.be.false;\n * expect(0).to.not.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 , this.negate ? true : false\n );\n });\n\n /**\n * ### .null\n *\n * Asserts that the target is `null`.\n *\n * expect(null).to.be.null;\n * expect(undefined).to.not.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 `undefined`.\n *\n * expect(undefined).to.be.undefined;\n * expect(null).to.not.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 * Asserts that the target is `NaN`.\n *\n * expect('foo').to.be.NaN;\n * expect(4).not.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 neither `null` nor `undefined`.\n *\n * var foo = 'hi'\n * , bar = null\n * , baz;\n *\n * expect(foo).to.exist;\n * expect(bar).to.not.exist;\n * expect(baz).to.not.exist;\n *\n * @name exist\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('exist', function () {\n this.assert(\n null != flag(this, 'object')\n , 'expected #{this} to exist'\n , 'expected #{this} to not exist'\n );\n });\n\n\n /**\n * ### .empty\n *\n * Asserts that the target's length is `0`. For arrays and strings, it checks\n * the `length` property. For objects, it gets the count of\n * enumerable keys.\n *\n * expect([]).to.be.empty;\n * expect('').to.be.empty;\n * expect({}).to.be.empty;\n *\n * @name empty\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('empty', function () {\n var obj = flag(this, 'object')\n , expected = obj;\n\n if (Array.isArray(obj) || 'string' === typeof object) {\n expected = obj.length;\n } else if (typeof obj === 'object') {\n expected = Object.keys(obj).length;\n }\n\n this.assert(\n !expected\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 * @name arguments\n * @alias Arguments\n * @namespace BDD\n * @api public\n */\n\n function checkArguments () {\n var obj = flag(this, 'object')\n , type = Object.prototype.toString.call(obj);\n this.assert(\n '[object 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(value)\n *\n * Asserts that the target is strictly equal (`===`) to `value`.\n * Alternately, if the `deep` flag is set, asserts that\n * the target is deeply equal to `value`.\n *\n * expect('hello').to.equal('hello');\n * expect(42).to.equal(42);\n * expect(1).to.not.equal(true);\n * expect({ foo: 'bar' }).to.not.equal({ foo: 'bar' });\n * expect({ foo: 'bar' }).to.deep.equal({ foo: 'bar' });\n *\n * @name equal\n * @alias equals\n * @alias eq\n * @alias deep.equal\n * @param {Mixed} value\n * @param {String} message _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 return this.eql(val);\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(value)\n *\n * Asserts that the target is deeply equal to `value`.\n *\n * expect({ foo: 'bar' }).to.eql({ foo: 'bar' });\n * expect([ 1, 2, 3 ]).to.eql([ 1, 2, 3 ]);\n *\n * @name eql\n * @alias eqls\n * @param {Mixed} value\n * @param {String} message _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(value)\n *\n * Asserts that the target is greater than `value`.\n *\n * expect(10).to.be.above(5);\n *\n * Can also be used in conjunction with `length` to\n * assert a minimum length. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.above(2);\n * expect([ 1, 2, 3 ]).to.have.length.above(2);\n *\n * @name above\n * @alias gt\n * @alias greaterThan\n * @param {Number} value\n * @param {String} message _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 if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len > n\n , 'expected #{this} to have a length above #{exp} but got #{act}'\n , 'expected #{this} to not have a length above #{exp}'\n , n\n , len\n );\n } else {\n this.assert(\n obj > n\n , 'expected #{this} to be above ' + n\n , 'expected #{this} to be at most ' + n\n );\n }\n }\n\n Assertion.addMethod('above', assertAbove);\n Assertion.addMethod('gt', assertAbove);\n Assertion.addMethod('greaterThan', assertAbove);\n\n /**\n * ### .least(value)\n *\n * Asserts that the target is greater than or equal to `value`.\n *\n * expect(10).to.be.at.least(10);\n *\n * Can also be used in conjunction with `length` to\n * assert a minimum length. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.of.at.least(2);\n * expect([ 1, 2, 3 ]).to.have.length.of.at.least(3);\n *\n * @name least\n * @alias gte\n * @param {Number} value\n * @param {String} message _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 if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len >= n\n , 'expected #{this} to have a length at least #{exp} but got #{act}'\n , 'expected #{this} to have a length below #{exp}'\n , n\n , len\n );\n } else {\n this.assert(\n obj >= n\n , 'expected #{this} to be at least ' + n\n , 'expected #{this} to be below ' + n\n );\n }\n }\n\n Assertion.addMethod('least', assertLeast);\n Assertion.addMethod('gte', assertLeast);\n\n /**\n * ### .below(value)\n *\n * Asserts that the target is less than `value`.\n *\n * expect(5).to.be.below(10);\n *\n * Can also be used in conjunction with `length` to\n * assert a maximum length. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.below(4);\n * expect([ 1, 2, 3 ]).to.have.length.below(4);\n *\n * @name below\n * @alias lt\n * @alias lessThan\n * @param {Number} value\n * @param {String} message _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 if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len < n\n , 'expected #{this} to have a length below #{exp} but got #{act}'\n , 'expected #{this} to not have a length below #{exp}'\n , n\n , len\n );\n } else {\n this.assert(\n obj < n\n , 'expected #{this} to be below ' + n\n , 'expected #{this} to be at least ' + n\n );\n }\n }\n\n Assertion.addMethod('below', assertBelow);\n Assertion.addMethod('lt', assertBelow);\n Assertion.addMethod('lessThan', assertBelow);\n\n /**\n * ### .most(value)\n *\n * Asserts that the target is less than or equal to `value`.\n *\n * expect(5).to.be.at.most(5);\n *\n * Can also be used in conjunction with `length` to\n * assert a maximum length. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.of.at.most(4);\n * expect([ 1, 2, 3 ]).to.have.length.of.at.most(3);\n *\n * @name most\n * @alias lte\n * @param {Number} value\n * @param {String} message _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 if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len <= n\n , 'expected #{this} to have a length at most #{exp} but got #{act}'\n , 'expected #{this} to have a length above #{exp}'\n , n\n , len\n );\n } else {\n this.assert(\n obj <= n\n , 'expected #{this} to be at most ' + n\n , 'expected #{this} to be above ' + n\n );\n }\n }\n\n Assertion.addMethod('most', assertMost);\n Assertion.addMethod('lte', assertMost);\n\n /**\n * ### .within(start, finish)\n *\n * Asserts that the target is within a range.\n *\n * expect(7).to.be.within(5,10);\n *\n * Can also be used in conjunction with `length` to\n * assert a length range. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.within(2,4);\n * expect([ 1, 2, 3 ]).to.have.length.within(2,4);\n *\n * @name within\n * @param {Number} start lowerbound inclusive\n * @param {Number} finish upperbound inclusive\n * @param {String} message _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 , range = start + '..' + finish;\n if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len >= start && len <= finish\n , 'expected #{this} to have a length within ' + range\n , 'expected #{this} to not have a length 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)\n *\n * Asserts that the target is an instance of `constructor`.\n *\n * var Tea = function (name) { this.name = name; }\n * , Chai = new Tea('chai');\n *\n * expect(Chai).to.be.an.instanceof(Tea);\n * expect([ 1, 2, 3 ]).to.be.instanceof(Array);\n *\n * @name instanceof\n * @param {Constructor} constructor\n * @param {String} message _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 var name = _.getName(constructor);\n this.assert(\n flag(this, 'object') instanceof constructor\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, [value])\n *\n * Asserts that the target has a property `name`, optionally asserting that\n * the value of that property is strictly equal to `value`.\n * If the `deep` flag is set, you can use dot- and bracket-notation for deep\n * references into objects and arrays.\n *\n * // simple referencing\n * var obj = { foo: 'bar' };\n * expect(obj).to.have.property('foo');\n * expect(obj).to.have.property('foo', 'bar');\n *\n * // deep referencing\n * var deepObj = {\n * green: { tea: 'matcha' }\n * , teas: [ 'chai', 'matcha', { tea: 'konacha' } ]\n * };\n *\n * expect(deepObj).to.have.deep.property('green.tea', 'matcha');\n * expect(deepObj).to.have.deep.property('teas[1]', 'matcha');\n * expect(deepObj).to.have.deep.property('teas[2].tea', 'konacha');\n *\n * You can also use an array as the starting point of a `deep.property`\n * assertion, or traverse nested arrays.\n *\n * var arr = [\n * [ 'chai', 'matcha', 'konacha' ]\n * , [ { tea: 'chai' }\n * , { tea: 'matcha' }\n * , { tea: 'konacha' } ]\n * ];\n *\n * expect(arr).to.have.deep.property('[0][1]', 'matcha');\n * expect(arr).to.have.deep.property('[1][2].tea', 'konacha');\n *\n * Furthermore, `property` changes the subject of the assertion\n * to be the value of that property from the original object. This\n * permits for further chainable assertions on that property.\n *\n * expect(obj).to.have.property('foo')\n * .that.is.a('string');\n * expect(deepObj).to.have.property('green')\n * .that.is.an('object')\n * .that.deep.equals({ tea: 'matcha' });\n * expect(deepObj).to.have.property('teas')\n * .that.is.an('array')\n * .with.deep.property('[2]')\n * .that.deep.equals({ tea: 'konacha' });\n *\n * Note that dots and bracket in `name` must be backslash-escaped when\n * the `deep` flag is set, while they must NOT be escaped when the `deep`\n * flag is not set.\n *\n * // simple referencing\n * var css = { '.link[target]': 42 };\n * expect(css).to.have.property('.link[target]', 42);\n *\n * // deep referencing\n * var deepCss = { '.link': { '[target]': 42 }};\n * expect(deepCss).to.have.deep.property('\\\\.link.\\\\[target\\\\]', 42);\n *\n * @name property\n * @alias deep.property\n * @param {String} name\n * @param {Mixed} value (optional)\n * @param {String} message _optional_\n * @returns value of property for chaining\n * @namespace BDD\n * @api public\n */\n\n Assertion.addMethod('property', function (name, val, msg) {\n if (msg) flag(this, 'message', msg);\n\n var isDeep = !!flag(this, 'deep')\n , descriptor = isDeep ? 'deep property ' : 'property '\n , negate = flag(this, 'negate')\n , obj = flag(this, 'object')\n , pathInfo = isDeep ? _.getPathInfo(name, obj) : null\n , hasProperty = isDeep\n ? pathInfo.exists\n : _.hasProperty(name, obj)\n , value = isDeep\n ? pathInfo.value\n : obj[name];\n\n if (negate && arguments.length > 1) {\n if (undefined === value) {\n msg = (msg != null) ? msg + ': ' : '';\n throw new Error(msg + _.inspect(obj) + ' has no ' + descriptor + _.inspect(name));\n }\n } else {\n this.assert(\n hasProperty\n , 'expected #{this} to have a ' + descriptor + _.inspect(name)\n , 'expected #{this} to not have ' + descriptor + _.inspect(name));\n }\n\n if (arguments.length > 1) {\n this.assert(\n val === value\n , 'expected #{this} to have a ' + descriptor + _.inspect(name) + ' of #{exp}, but got #{act}'\n , 'expected #{this} to not have a ' + descriptor + _.inspect(name) + ' of #{act}'\n , val\n , value\n );\n }\n\n flag(this, 'object', value);\n });\n\n\n /**\n * ### .ownProperty(name)\n *\n * Asserts that the target has an own property `name`.\n *\n * expect('test').to.have.ownProperty('length');\n *\n * @name ownProperty\n * @alias haveOwnProperty\n * @param {String} name\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertOwnProperty (name, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n this.assert(\n obj.hasOwnProperty(name)\n , 'expected #{this} to have own property ' + _.inspect(name)\n , 'expected #{this} to not have own property ' + _.inspect(name)\n );\n }\n\n Assertion.addMethod('ownProperty', assertOwnProperty);\n Assertion.addMethod('haveOwnProperty', assertOwnProperty);\n\n /**\n * ### .ownPropertyDescriptor(name[, descriptor[, message]])\n *\n * Asserts that the target has an own property descriptor `name`, that optionally matches `descriptor`.\n *\n * expect('test').to.have.ownPropertyDescriptor('length');\n * expect('test').to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 4 });\n * expect('test').not.to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 3 });\n * expect('test').ownPropertyDescriptor('length').to.have.property('enumerable', false);\n * expect('test').ownPropertyDescriptor('length').to.have.keys('value');\n *\n * @name ownPropertyDescriptor\n * @alias haveOwnPropertyDescriptor\n * @param {String} name\n * @param {Object} descriptor _optional_\n * @param {String} message _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 * ### .length\n *\n * Sets the `doLength` flag later used as a chain precursor to a value\n * comparison for the `length` property.\n *\n * expect('foo').to.have.length.above(2);\n * expect([ 1, 2, 3 ]).to.have.length.above(2);\n * expect('foo').to.have.length.below(4);\n * expect([ 1, 2, 3 ]).to.have.length.below(4);\n * expect('foo').to.have.length.within(2,4);\n * expect([ 1, 2, 3 ]).to.have.length.within(2,4);\n *\n * *Deprecation notice:* Using `length` as an assertion will be deprecated\n * in version 2.4.0 and removed in 3.0.0. Code using the old style of\n * asserting for `length` property value using `length(value)` should be\n * switched to use `lengthOf(value)` instead.\n *\n * @name length\n * @namespace BDD\n * @api public\n */\n\n /**\n * ### .lengthOf(value[, message])\n *\n * Asserts that the target's `length` property has\n * the expected value.\n *\n * expect([ 1, 2, 3]).to.have.lengthOf(3);\n * expect('foobar').to.have.lengthOf(6);\n *\n * @name lengthOf\n * @param {Number} length\n * @param {String} message _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 new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n\n this.assert(\n len == n\n , 'expected #{this} to have a length of #{exp} but got #{act}'\n , 'expected #{this} to not have a length of #{act}'\n , n\n , len\n );\n }\n\n Assertion.addChainableMethod('length', assertLength, assertLengthChain);\n Assertion.addMethod('lengthOf', assertLength);\n\n /**\n * ### .match(regexp)\n *\n * Asserts that the target matches a regular expression.\n *\n * expect('foobar').to.match(/^foo/);\n *\n * @name match\n * @alias matches\n * @param {RegExp} RegularExpression\n * @param {String} message _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(string)\n *\n * Asserts that the string target contains another string.\n *\n * expect('foobar').to.have.string('bar');\n *\n * @name string\n * @param {String} string\n * @param {String} message _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 new Assertion(obj, msg).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 /**\n * ### .keys(key1, [key2], [...])\n *\n * Asserts that the target contains any or all of the passed-in keys.\n * Use in combination with `any`, `all`, `contains`, or `have` will affect\n * what will pass.\n *\n * When used in conjunction with `any`, at least one key that is passed\n * in must exist in the target object. This is regardless whether or not\n * the `have` or `contain` qualifiers are used. Note, either `any` or `all`\n * should be used in the assertion. If neither are used, the assertion is\n * defaulted to `all`.\n *\n * When both `all` and `contain` are used, the target object must have at\n * least all of the passed-in keys but may have more keys not listed.\n *\n * When both `all` and `have` are used, the target object must both contain\n * all of the passed-in keys AND the number of keys in the target object must\n * match the number of keys passed in (in other words, a target object must\n * have all and only all of the passed-in keys).\n *\n * expect({ foo: 1, bar: 2 }).to.have.any.keys('foo', 'baz');\n * expect({ foo: 1, bar: 2 }).to.have.any.keys('foo');\n * expect({ foo: 1, bar: 2 }).to.contain.any.keys('bar', 'baz');\n * expect({ foo: 1, bar: 2 }).to.contain.any.keys(['foo']);\n * expect({ foo: 1, bar: 2 }).to.contain.any.keys({'foo': 6});\n * expect({ foo: 1, bar: 2 }).to.have.all.keys(['bar', 'foo']);\n * expect({ foo: 1, bar: 2 }).to.have.all.keys({'bar': 6, 'foo': 7});\n * expect({ foo: 1, bar: 2, baz: 3 }).to.contain.all.keys(['bar', 'foo']);\n * expect({ foo: 1, bar: 2, baz: 3 }).to.contain.all.keys({'bar': 6});\n *\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 , str\n , ok = true\n , mixedArgsMsg = 'keys must be given single argument of Array|Object|String, or multiple String arguments';\n\n switch (_.type(keys)) {\n case \"array\":\n if (arguments.length > 1) throw (new Error(mixedArgsMsg));\n break;\n case \"object\":\n if (arguments.length > 1) throw (new Error(mixedArgsMsg));\n keys = Object.keys(keys);\n break;\n default:\n keys = Array.prototype.slice.call(arguments);\n }\n\n if (!keys.length) throw new Error('keys required');\n\n var actual = Object.keys(obj)\n , expected = keys\n , len = keys.length\n , any = flag(this, 'any')\n , all = flag(this, 'all');\n\n if (!any && !all) {\n all = true;\n }\n\n // Has any\n if (any) {\n var intersection = expected.filter(function(key) {\n return ~actual.indexOf(key);\n });\n ok = intersection.length > 0;\n }\n\n // Has all\n if (all) {\n ok = keys.every(function(key){\n return ~actual.indexOf(key);\n });\n if (!flag(this, 'negate') && !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 ' + str\n , 'expected #{this} to not ' + str\n , expected.slice(0).sort()\n , actual.sort()\n , true\n );\n }\n\n Assertion.addMethod('keys', assertKeys);\n Assertion.addMethod('key', assertKeys);\n\n /**\n * ### .throw(constructor)\n *\n * Asserts that the function target will throw a specific error, or specific type of error\n * (as determined using `instanceof`), optionally with a RegExp or string inclusion test\n * for the error's message.\n *\n * var err = new ReferenceError('This is a bad function.');\n * var fn = function () { throw err; }\n * expect(fn).to.throw(ReferenceError);\n * expect(fn).to.throw(Error);\n * expect(fn).to.throw(/bad function/);\n * expect(fn).to.not.throw('good function');\n * expect(fn).to.throw(ReferenceError, /bad function/);\n * expect(fn).to.throw(err);\n *\n * Please note that when a throw expectation is negated, it will check each\n * parameter independently, starting with error constructor type. The appropriate way\n * to check for the existence of a type of error but for a message that does not match\n * is to use `and`.\n *\n * expect(fn).to.throw(ReferenceError)\n * .and.not.throw(/good function/);\n *\n * @name throw\n * @alias throws\n * @alias Throw\n * @param {ErrorConstructor} constructor\n * @param {String|RegExp} expected error message\n * @param {String} message _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 (constructor, errMsg, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n new Assertion(obj, msg).is.a('function');\n\n var thrown = false\n , desiredError = null\n , name = null\n , thrownError = null;\n\n if (arguments.length === 0) {\n errMsg = null;\n constructor = null;\n } else if (constructor && (constructor instanceof RegExp || 'string' === typeof constructor)) {\n errMsg = constructor;\n constructor = null;\n } else if (constructor && constructor instanceof Error) {\n desiredError = constructor;\n constructor = null;\n errMsg = null;\n } else if (typeof constructor === 'function') {\n name = constructor.prototype.name;\n if (!name || (name === 'Error' && constructor !== Error)) {\n name = constructor.name || (new constructor()).name;\n }\n } else {\n constructor = null;\n }\n\n try {\n obj();\n } catch (err) {\n // first, check desired error\n if (desiredError) {\n this.assert(\n err === desiredError\n , 'expected #{this} to throw #{exp} but #{act} was thrown'\n , 'expected #{this} to not throw #{exp}'\n , (desiredError instanceof Error ? desiredError.toString() : desiredError)\n , (err instanceof Error ? err.toString() : err)\n );\n\n flag(this, 'object', err);\n return this;\n }\n\n // next, check constructor\n if (constructor) {\n this.assert(\n err instanceof constructor\n , 'expected #{this} to throw #{exp} but #{act} was thrown'\n , 'expected #{this} to not throw #{exp} but #{act} was thrown'\n , name\n , (err instanceof Error ? err.toString() : err)\n );\n\n if (!errMsg) {\n flag(this, 'object', err);\n return this;\n }\n }\n\n // next, check message\n var message = 'error' === _.type(err) && \"message\" in err\n ? err.message\n : '' + err;\n\n if ((message != null) && errMsg && errMsg instanceof RegExp) {\n this.assert(\n errMsg.exec(message)\n , 'expected #{this} to throw error matching #{exp} but got #{act}'\n , 'expected #{this} to throw error not matching #{exp}'\n , errMsg\n , message\n );\n\n flag(this, 'object', err);\n return this;\n } else if ((message != null) && errMsg && 'string' === typeof errMsg) {\n this.assert(\n ~message.indexOf(errMsg)\n , 'expected #{this} to throw error including #{exp} but got #{act}'\n , 'expected #{this} to throw error not including #{act}'\n , errMsg\n , message\n );\n\n flag(this, 'object', err);\n return this;\n } else {\n thrown = true;\n thrownError = err;\n }\n }\n\n var actuallyGot = ''\n , expectedThrown = name !== null\n ? name\n : desiredError\n ? '#{exp}' //_.inspect(desiredError)\n : 'an error';\n\n if (thrown) {\n actuallyGot = ' but #{act} was thrown'\n }\n\n this.assert(\n thrown === true\n , 'expected #{this} to throw ' + expectedThrown + actuallyGot\n , 'expected #{this} to not throw ' + expectedThrown + actuallyGot\n , (desiredError instanceof Error ? desiredError.toString() : desiredError)\n , (thrownError instanceof Error ? thrownError.toString() : thrownError)\n );\n\n flag(this, 'object', thrownError);\n };\n\n Assertion.addMethod('throw', assertThrows);\n Assertion.addMethod('throws', assertThrows);\n Assertion.addMethod('Throw', assertThrows);\n\n /**\n * ### .respondTo(method)\n *\n * Asserts that the object or class target will respond to a method.\n *\n * Klass.prototype.bar = function(){};\n * expect(Klass).to.respondTo('bar');\n * expect(obj).to.respondTo('bar');\n *\n * To check if a constructor will respond to a static function,\n * set the `itself` flag.\n *\n * Klass.baz = function(){};\n * expect(Klass).itself.to.respondTo('baz');\n *\n * @name respondTo\n * @alias respondsTo\n * @param {String} method\n * @param {String} message _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' === _.type(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 * Sets the `itself` flag, later used by the `respondTo` assertion.\n *\n * function Foo() {}\n * Foo.bar = function() {}\n * Foo.prototype.baz = function() {}\n *\n * expect(Foo).itself.to.respondTo('bar');\n * expect(Foo).itself.not.to.respondTo('baz');\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(method)\n *\n * Asserts that the target passes a given truth test.\n *\n * expect(1).to.satisfy(function(num) { return num > 0; });\n *\n * @name satisfy\n * @alias satisfies\n * @param {Function} matcher\n * @param {String} message _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 , 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)\n *\n * Asserts that the target is equal `expected`, to within a +/- `delta` range.\n *\n * expect(1.5).to.be.closeTo(1, 0.5);\n *\n * @name closeTo\n * @alias approximately\n * @param {Number} expected\n * @param {Number} delta\n * @param {String} message _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\n new Assertion(obj, msg).is.a('number');\n if (_.type(expected) !== 'number' || _.type(delta) !== 'number') {\n throw new Error('the arguments to closeTo or approximately must be numbers');\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 function isSubsetOf(subset, superset, cmp) {\n return subset.every(function(elem) {\n if (!cmp) return superset.indexOf(elem) !== -1;\n\n return superset.some(function(elem2) {\n return cmp(elem, elem2);\n });\n })\n }\n\n /**\n * ### .members(set)\n *\n * Asserts that the target is a superset of `set`,\n * or that the target and `set` have the same strictly-equal (===) members.\n * Alternately, if the `deep` flag is set, set members are compared for deep\n * equality.\n *\n * expect([1, 2, 3]).to.include.members([3, 2]);\n * expect([1, 2, 3]).to.not.include.members([3, 2, 8]);\n *\n * expect([4, 2]).to.have.members([2, 4]);\n * expect([5, 2]).to.not.have.members([5, 2, 1]);\n *\n * expect([{ id: 1 }]).to.deep.include.members([{ id: 1 }]);\n *\n * @name members\n * @param {Array} set\n * @param {String} message _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\n new Assertion(obj).to.be.an('array');\n new Assertion(subset).to.be.an('array');\n\n var cmp = flag(this, 'deep') ? _.eql : undefined;\n\n if (flag(this, 'contains')) {\n return this.assert(\n isSubsetOf(subset, obj, cmp)\n , 'expected #{this} to be a superset of #{act}'\n , 'expected #{this} to not be a superset of #{act}'\n , obj\n , subset\n );\n }\n\n this.assert(\n isSubsetOf(obj, subset, cmp) && isSubsetOf(subset, obj, cmp)\n , 'expected #{this} to have the same members as #{act}'\n , 'expected #{this} to not have the same members as #{act}'\n , obj\n , subset\n );\n });\n\n /**\n * ### .oneOf(list)\n *\n * Assert that a value appears somewhere in the top level of array `list`.\n *\n * expect('a').to.be.oneOf(['a', 'b', 'c']);\n * expect(9).to.not.be.oneOf(['z']);\n * expect([3]).to.not.be.oneOf([1, 2, [3]]);\n *\n * var three = [3];\n * // for object-types, contents are not compared\n * expect(three).to.not.be.oneOf([1, 2, [3]]);\n * // comparing references works\n * expect(three).to.be.oneOf([1, 2, three]);\n *\n * @name oneOf\n * @param {Array<*>} list\n * @param {String} message _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 new Assertion(list).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 /**\n * ### .change(function)\n *\n * Asserts that a function changes an object property\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val += 3 };\n * var noChangeFn = function() { return 'foo' + 'bar'; }\n * expect(fn).to.change(obj, 'val');\n * expect(noChangeFn).to.not.change(obj, 'val')\n *\n * @name change\n * @alias changes\n * @alias Change\n * @param {String} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertChanges (object, prop, msg) {\n if (msg) flag(this, 'message', msg);\n var fn = flag(this, 'object');\n new Assertion(object, msg).to.have.property(prop);\n new Assertion(fn).is.a('function');\n\n var initial = object[prop];\n fn();\n\n this.assert(\n initial !== object[prop]\n , 'expected .' + prop + ' to change'\n , 'expected .' + prop + ' to not change'\n );\n }\n\n Assertion.addChainableMethod('change', assertChanges);\n Assertion.addChainableMethod('changes', assertChanges);\n\n /**\n * ### .increase(function)\n *\n * Asserts that a function increases an object property\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 15 };\n * expect(fn).to.increase(obj, 'val');\n *\n * @name increase\n * @alias increases\n * @alias Increase\n * @param {String} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertIncreases (object, prop, msg) {\n if (msg) flag(this, 'message', msg);\n var fn = flag(this, 'object');\n new Assertion(object, msg).to.have.property(prop);\n new Assertion(fn).is.a('function');\n\n var initial = object[prop];\n fn();\n\n this.assert(\n object[prop] - initial > 0\n , 'expected .' + prop + ' to increase'\n , 'expected .' + prop + ' to not increase'\n );\n }\n\n Assertion.addChainableMethod('increase', assertIncreases);\n Assertion.addChainableMethod('increases', assertIncreases);\n\n /**\n * ### .decrease(function)\n *\n * Asserts that a function decreases an object property\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 5 };\n * expect(fn).to.decrease(obj, 'val');\n *\n * @name decrease\n * @alias decreases\n * @alias Decrease\n * @param {String} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertDecreases (object, prop, msg) {\n if (msg) flag(this, 'message', msg);\n var fn = flag(this, 'object');\n new Assertion(object, msg).to.have.property(prop);\n new Assertion(fn).is.a('function');\n\n var initial = object[prop];\n fn();\n\n this.assert(\n object[prop] - initial < 0\n , 'expected .' + prop + ' to decrease'\n , 'expected .' + prop + ' to not decrease'\n );\n }\n\n Assertion.addChainableMethod('decrease', assertDecreases);\n Assertion.addChainableMethod('decreases', assertDecreases);\n\n /**\n * ### .extensible\n *\n * Asserts that the target is extensible (can have new properties added to\n * it).\n *\n * var nonExtensibleObject = Object.preventExtensions({});\n * var sealedObject = Object.seal({});\n * var frozenObject = Object.freeze({});\n *\n * expect({}).to.be.extensible;\n * expect(nonExtensibleObject).to.not.be.extensible;\n * expect(sealedObject).to.not.be.extensible;\n * expect(frozenObject).to.not.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 not an object (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 when a TypeError is thrown under ES5.\n\n var isExtensible;\n\n try {\n isExtensible = Object.isExtensible(obj);\n } catch (err) {\n if (err instanceof TypeError) isExtensible = false;\n else throw err;\n }\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 (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.freeze({});\n *\n * expect(sealedObject).to.be.sealed;\n * expect(frozenObject).to.be.sealed;\n * expect({}).to.not.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 not an object (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 when a TypeError is thrown under ES5.\n\n var isSealed;\n\n try {\n isSealed = Object.isSealed(obj);\n } catch (err) {\n if (err instanceof TypeError) isSealed = true;\n else throw err;\n }\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 (cannot have new properties added to it\n * and its existing properties cannot be modified).\n *\n * var frozenObject = Object.freeze({});\n *\n * expect(frozenObject).to.be.frozen;\n * expect({}).to.not.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 not an object (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 when a TypeError is thrown under ES5.\n\n var isFrozen;\n\n try {\n isFrozen = Object.isFrozen(obj);\n } catch (err) {\n if (err instanceof TypeError) isFrozen = true;\n else throw err;\n }\n\n this.assert(\n isFrozen\n , 'expected #{this} to be frozen'\n , 'expected #{this} to not be frozen'\n );\n });\n};\n","/*!\n * chai\n * Copyright(c) 2011-2014 Jake Luer \n * MIT Licensed\n */\n\n\nmodule.exports = function (chai, util) {\n\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);\n test.assert(\n express\n , errmsg\n , '[ negation message unavailable ]'\n );\n };\n\n /**\n * ### .fail(actual, expected, [message], [operator])\n *\n * Throw a failure. Node.js `assert` module-compatible.\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 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).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).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);\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 );\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);\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 );\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).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).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 * @namespace Assert\n * @api public\n */\n\n assert.deepEqual = function (act, exp, msg) {\n new Assertion(act, msg).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).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).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).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).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).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).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).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).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).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).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).to.not.equal(null);\n };\n\n /**\n * ### .isNaN\n * Asserts that value is NaN\n *\n * assert.isNaN('foo', 'foo 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).to.be.NaN;\n };\n\n /**\n * ### .isNotNaN\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).not.to.be.NaN;\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).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).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).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).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).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).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).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).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).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).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).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).to.not.be.a('number');\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).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).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).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).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).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).to.not.be.instanceOf(type);\n };\n\n /**\n * ### .include(haystack, needle, [message])\n *\n * Asserts that `haystack` includes `needle`. Works\n * for strings and arrays.\n *\n * assert.include('foobar', 'bar', 'foobar contains string \"bar\"');\n * assert.include([ 1, 2, 3 ], 3, 'array contains value');\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).include(inc);\n };\n\n /**\n * ### .notInclude(haystack, needle, [message])\n *\n * Asserts that `haystack` does not include `needle`. Works\n * for strings and arrays.\n *\n * assert.notInclude('foobar', 'baz', 'string not include substring');\n * assert.notInclude([ 1, 2, 3 ], 4, 'array not include contain value');\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).not.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).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).to.not.match(re);\n };\n\n /**\n * ### .property(object, property, [message])\n *\n * Asserts that `object` has a property named by `property`.\n *\n * assert.property({ tea: { green: 'matcha' }}, 'tea');\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).to.have.property(prop);\n };\n\n /**\n * ### .notProperty(object, property, [message])\n *\n * Asserts that `object` does _not_ have a property named 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).to.not.have.property(prop);\n };\n\n /**\n * ### .deepProperty(object, property, [message])\n *\n * Asserts that `object` has a property named by `property`, which can be a\n * string using dot- and bracket-notation for deep reference.\n *\n * assert.deepProperty({ tea: { green: 'matcha' }}, 'tea.green');\n *\n * @name deepProperty\n * @param {Object} object\n * @param {String} property\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.deepProperty = function (obj, prop, msg) {\n new Assertion(obj, msg).to.have.deep.property(prop);\n };\n\n /**\n * ### .notDeepProperty(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 deep reference.\n *\n * assert.notDeepProperty({ tea: { green: 'matcha' }}, 'tea.oolong');\n *\n * @name notDeepProperty\n * @param {Object} object\n * @param {String} property\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notDeepProperty = function (obj, prop, msg) {\n new Assertion(obj, msg).to.not.have.deep.property(prop);\n };\n\n /**\n * ### .propertyVal(object, property, value, [message])\n *\n * Asserts that `object` has a property named by `property` with value given\n * by `value`.\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).to.have.property(prop, val);\n };\n\n /**\n * ### .propertyNotVal(object, property, value, [message])\n *\n * Asserts that `object` has a property named by `property`, but with a value\n * different from that given by `value`.\n *\n * assert.propertyNotVal({ tea: 'is good' }, 'tea', 'is bad');\n *\n * @name propertyNotVal\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.propertyNotVal = function (obj, prop, val, msg) {\n new Assertion(obj, msg).to.not.have.property(prop, val);\n };\n\n /**\n * ### .deepPropertyVal(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 deep\n * reference.\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).to.have.deep.property(prop, val);\n };\n\n /**\n * ### .deepPropertyNotVal(object, property, value, [message])\n *\n * Asserts that `object` has a property named by `property`, but with a value\n * different from that given by `value`. `property` can use dot- and\n * bracket-notation for deep reference.\n *\n * assert.deepPropertyNotVal({ tea: { green: 'matcha' }}, 'tea.green', 'konacha');\n *\n * @name deepPropertyNotVal\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.deepPropertyNotVal = function (obj, prop, val, msg) {\n new Assertion(obj, msg).to.not.have.deep.property(prop, val);\n };\n\n /**\n * ### .lengthOf(object, length, [message])\n *\n * Asserts that `object` has a `length` property 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 *\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).to.have.length(len);\n };\n\n /**\n * ### .throws(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 * assert.throws(fn, 'function throws a reference error');\n * assert.throws(fn, /function throws a reference error/);\n * assert.throws(fn, ReferenceError);\n * assert.throws(fn, ReferenceError, 'function throws a reference error');\n * assert.throws(fn, ReferenceError, /function throws a reference error/);\n *\n * @name throws\n * @alias 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 Assert\n * @api public\n */\n\n assert.throws = function (fn, errt, errs, msg) {\n if ('string' === typeof errt || errt instanceof RegExp) {\n errs = errt;\n errt = null;\n }\n\n var assertErr = new Assertion(fn, msg).to.throw(errt, errs);\n return flag(assertErr, 'object');\n };\n\n /**\n * ### .doesNotThrow(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 * assert.doesNotThrow(fn, Error, 'function does not throw');\n *\n * @name doesNotThrow\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 Assert\n * @api public\n */\n\n assert.doesNotThrow = function (fn, type, msg) {\n if ('string' === typeof type) {\n msg = type;\n type = null;\n }\n\n new Assertion(fn, msg).to.not.Throw(type);\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 throw new Error('Invalid operator \"' + operator + '\"');\n }\n var test = new Assertion(ok, msg);\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).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).to.be.approximately(exp, delta);\n };\n\n /**\n * ### .sameMembers(set1, set2, [message])\n *\n * Asserts that `set1` and `set2` have the same members.\n * Order is not taken into account.\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).to.have.same.members(set2);\n }\n\n /**\n * ### .sameDeepMembers(set1, set2, [message])\n *\n * Asserts that `set1` and `set2` have the same members - using a deep equality checking.\n * Order is not taken into account.\n *\n * assert.sameDeepMembers([ {b: 3}, {a: 2}, {c: 5} ], [ {c: 5}, {b: 3}, {a: 2} ], '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).to.have.same.deep.members(set2);\n }\n\n /**\n * ### .includeMembers(superset, subset, [message])\n *\n * Asserts that `subset` is included in `superset`.\n * Order is not taken into account.\n *\n * assert.includeMembers([ 1, 2, 3 ], [ 2, 1 ], '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).to.include.members(subset);\n }\n\n /**\n * ### .includeDeepMembers(superset, subset, [message])\n *\n * Asserts that `subset` is included in `superset` - using deep equality checking.\n * Order is not taken into account.\n * 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).to.include.deep.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).to.be.oneOf(list);\n }\n\n /**\n * ### .changes(function, object, property)\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\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.changes = function (fn, obj, prop) {\n new Assertion(fn).to.change(obj, prop);\n }\n\n /**\n * ### .doesNotChange(function, object, property)\n *\n * Asserts that a function does not changes 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\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotChange = function (fn, obj, prop) {\n new Assertion(fn).to.not.change(obj, prop);\n }\n\n /**\n * ### .increases(function, object, property)\n *\n * Asserts that a function increases an 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\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.increases = function (fn, obj, prop) {\n new Assertion(fn).to.increase(obj, prop);\n }\n\n /**\n * ### .doesNotIncrease(function, object, property)\n *\n * Asserts that a function does not increase 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\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotIncrease = function (fn, obj, prop) {\n new Assertion(fn).to.not.increase(obj, prop);\n }\n\n /**\n * ### .decreases(function, object, property)\n *\n * Asserts that a function decreases an 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\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.decreases = function (fn, obj, prop) {\n new Assertion(fn).to.decrease(obj, prop);\n }\n\n /**\n * ### .doesNotDecrease(function, object, property)\n *\n * Asserts that a function does not decreases an 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\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotDecrease = function (fn, obj, prop) {\n new Assertion(fn).to.not.decrease(obj, prop);\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).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.freese({});\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).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).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).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).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).to.not.be.frozen;\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};\n","/*!\n * chai\n * Copyright(c) 2011-2014 Jake Luer \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(actual, expected, [message], [operator])\n *\n * Throw a failure.\n *\n * @name fail\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @param {String} operator\n * @namespace Expect\n * @api public\n */\n\n chai.expect.fail = function (actual, expected, message, operator) {\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 \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 || this instanceof Number || this instanceof Boolean ) {\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(actual, expected, [message], [operator])\n *\n * Throw a failure.\n *\n * @name fail\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @param {String} operator\n * @namespace Should\n * @api public\n */\n\n should.fail = function (actual, expected, message, operator) {\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 - addChainingMethod utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Module dependencies\n */\n\nvar transferFlags = require('./transferFlags');\nvar flag = require('./flag');\nvar config = require('../config');\n\n/*!\n * Module variables\n */\n\n// Check whether `__proto__` is supported\nvar hasProtoSupport = '__proto__' in Object;\n\n// Without `__proto__` support, this module will need to add properties to a function.\n// However, some Function.prototype methods cannot be overwritten,\n// and there seems no easy cross-platform way to detect them (@see chaijs/chai/issues/69).\nvar excludeNames = /^(?:length|name|arguments|caller)$/;\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 (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 () {\n chainableBehavior.chainingBehavior.call(this);\n\n var assert = function assert() {\n var old_ssfi = flag(this, 'ssfi');\n if (old_ssfi && config.includeStack === false)\n flag(this, 'ssfi', assert);\n var result = chainableBehavior.method.apply(this, arguments);\n return result === undefined ? this : result;\n };\n\n // Use `__proto__` if available\n if (hasProtoSupport) {\n // Inherit all properties from the object by replacing the `Function` prototype\n var prototype = assert.__proto__ = Object.create(this);\n // Restore the `call` and `apply` methods from `Function`\n prototype.call = call;\n prototype.apply = apply;\n }\n // Otherwise, redefine all properties (slow!)\n else {\n var asserterNames = Object.getOwnPropertyNames(ctx);\n asserterNames.forEach(function (asserterName) {\n if (!excludeNames.test(asserterName)) {\n var pd = Object.getOwnPropertyDescriptor(ctx, asserterName);\n Object.defineProperty(assert, asserterName, pd);\n }\n });\n }\n\n transferFlags(this, assert);\n return assert;\n }\n , configurable: true\n });\n};\n","/*!\n * Chai - addMethod utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\nvar config = require('../config');\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 */\nvar flag = require('./flag');\n\nmodule.exports = function (ctx, name, method) {\n ctx[name] = function () {\n var old_ssfi = flag(this, 'ssfi');\n if (old_ssfi && config.includeStack === false)\n flag(this, 'ssfi', ctx[name]);\n var result = method.apply(this, arguments);\n return result === undefined ? this : result;\n };\n};\n","/*!\n * Chai - addProperty utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\nvar config = require('../config');\nvar flag = require('./flag');\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 (ctx, name, getter) {\n Object.defineProperty(ctx, name,\n { get: function addProperty() {\n var old_ssfi = flag(this, 'ssfi');\n if (old_ssfi && config.includeStack === false)\n flag(this, 'ssfi', addProperty);\n\n var result = getter.call(this);\n return result === undefined ? this : result;\n }\n , configurable: true\n });\n};\n","/*!\n * Chai - expectTypes utility\n * Copyright(c) 2012-2014 Jake Luer \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 (obj, types) {\n var obj = flag(obj, 'object');\n types = types.map(function (t) { return t.toLowerCase(); });\n types.sort();\n\n // Transforms ['lorem', 'ipsum'] into 'a lirum, 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 if (!types.some(function (expected) { return type(obj) === expected; })) {\n throw new AssertionError(\n 'object tested must be ' + str + ', but ' + type(obj) + ' given'\n );\n }\n};\n","/*!\n * Chai - flag utility\n * Copyright(c) 2012-2014 Jake Luer \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 (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 - getActual utility\n * Copyright(c) 2012-2014 Jake Luer \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 (obj, args) {\n return args.length > 4 ? args[4] : obj._obj;\n};\n","/*!\n * Chai - getEnumerableProperties utility\n * Copyright(c) 2012-2014 Jake Luer \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","/*!\n * Chai - message composition utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Module dependancies\n */\n\nvar flag = require('./flag')\n , getActual = require('./getActual')\n , inspect = require('./inspect')\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 (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 - getName utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * # getName(func)\n *\n * Gets the name of a function, in a cross-browser way.\n *\n * @param {Function} a function (usually a constructor)\n * @namespace Utils\n * @name getName\n */\n\nmodule.exports = function (func) {\n if (func.name) return func.name;\n\n var match = /^\\s?function ([^(]*)\\(/.exec(func);\n return match && match[1] ? match[1] : \"\";\n};\n","/*!\n * Chai - getPathInfo utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\nvar hasProperty = require('./hasProperty');\n\n/**\n * ### .getPathInfo(path, object)\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 {String} path\n * @param {Object} object\n * @returns {Object} info\n * @namespace Utils\n * @name getPathInfo\n * @api public\n */\n\nmodule.exports = function getPathInfo(path, obj) {\n var parsed = parsePath(path),\n last = parsed[parsed.length - 1];\n\n var info = {\n parent: parsed.length > 1 ? _getPathValue(parsed, obj, parsed.length - 1) : obj,\n name: last.p || last.i,\n value: _getPathValue(parsed, obj)\n };\n info.exists = hasProperty(info.name, info.parent);\n\n return info;\n};\n\n\n/*!\n * ## parsePath(path)\n *\n * Helper function used to parse string object\n * paths. Use in conjunction with `_getPathValue`.\n *\n * var parsed = parsePath('myobject.property.subprop');\n *\n * ### Paths:\n *\n * * Can be as near 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 , parts = str.match(/(\\\\\\.|[^.]+?)+/g);\n return parts.map(function (value) {\n var re = /^\\[(\\d+)\\]$/\n , mArr = re.exec(value);\n if (mArr) return { i: parseFloat(mArr[1]) };\n else return { p: value.replace(/\\\\([.\\[\\]])/g, '$1') };\n });\n}\n\n\n/*!\n * ## _getPathValue(parsed, obj)\n *\n * Helper companion function for `.parsePath` that returns\n * the value located at the parsed address.\n *\n * var value = getPathValue(parsed, obj);\n *\n * @param {Object} parsed definition from `parsePath`.\n * @param {Object} object to search against\n * @param {Number} object to search against\n * @returns {Object|Undefined} value\n * @api private\n */\n\nfunction _getPathValue (parsed, obj, index) {\n var tmp = obj\n , res;\n\n index = (index === undefined ? parsed.length : index);\n\n for (var i = 0, l = index; i < l; i++) {\n var part = parsed[i];\n if (tmp) {\n if ('undefined' !== typeof part.p)\n tmp = tmp[part.p];\n else if ('undefined' !== typeof part.i)\n tmp = tmp[part.i];\n if (i == (l - 1)) res = tmp;\n } else {\n res = undefined;\n }\n }\n return res;\n}\n","/*!\n * Chai - getPathValue utility\n * Copyright(c) 2012-2014 Jake Luer \n * @see https://github.com/logicalparadox/filtr\n * MIT Licensed\n */\n\nvar getPathInfo = require('./getPathInfo');\n\n/**\n * ### .getPathValue(path, object)\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('prop1.str', obj); // Hello\n * getPathValue('prop1.att[2]', obj); // b\n * getPathValue('prop2.arr[0].nested', obj); // Universe\n *\n * @param {String} path\n * @param {Object} object\n * @returns {Object} value or `undefined`\n * @namespace Utils\n * @name getPathValue\n * @api public\n */\nmodule.exports = function(path, obj) {\n var info = getPathInfo(path, obj);\n return info.value;\n};\n","/*!\n * Chai - getProperties utility\n * Copyright(c) 2012-2014 Jake Luer \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 - hasProperty utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\nvar type = require('type-detect');\n\n/**\n * ### .hasProperty(object, name)\n *\n * This allows checking whether an object has\n * named property or numeric array index.\n *\n * Basically does the same thing as the `in`\n * operator but works properly with natives\n * and null/undefined values.\n *\n * var obj = {\n * arr: ['a', 'b', 'c']\n * , str: 'Hello'\n * }\n *\n * The following would be the results.\n *\n * hasProperty('str', obj); // true\n * hasProperty('constructor', obj); // true\n * hasProperty('bar', obj); // false\n *\n * hasProperty('length', obj.str); // true\n * hasProperty(1, obj.str); // true\n * hasProperty(5, obj.str); // false\n *\n * hasProperty('length', obj.arr); // true\n * hasProperty(2, obj.arr); // true\n * hasProperty(3, obj.arr); // false\n *\n * @param {Objuect} object\n * @param {String|Number} name\n * @returns {Boolean} whether it exists\n * @namespace Utils\n * @name getPathInfo\n * @api public\n */\n\nvar literals = {\n 'number': Number\n , 'string': String\n};\n\nmodule.exports = function hasProperty(name, obj) {\n var ot = type(obj);\n\n // Bad Object, obviously no props at all\n if(ot === 'null' || ot === 'undefined')\n return false;\n\n // The `in` operator does not work with certain literals\n // box these before the check\n if(literals[ot] && typeof obj !== 'object')\n obj = new literals[ot](obj);\n\n return name in obj;\n};\n","/*!\n * chai\n * Copyright(c) 2011 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Main exports\n */\n\nvar exports = module.exports = {};\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 value\n */\n\nexports.getPathValue = require('./getPathValue');\n\n/*!\n * Deep path info\n */\n\nexports.getPathInfo = require('./getPathInfo');\n\n/*!\n * Check if a property exists\n */\n\nexports.hasProperty = require('./hasProperty');\n\n/*!\n * Function name\n */\n\nexports.getName = require('./getName');\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","// This is (almost) directly from Node.js utils\n// https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/util.js\n\nvar getName = require('./getName');\nvar getProperties = require('./getProperties');\nvar getEnumerableProperties = require('./getEnumerableProperties');\n\nmodule.exports = inspect;\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 {Boolean} showHidden Flag that shows hidden (not enumerable)\n * properties of objects.\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 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);\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 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 // Some type of object without properties can be shortcutted.\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 var name = getName(value);\n var 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 = '', 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 (typeof value === 'function') {\n var name = getName(value);\n var 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 {\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 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 // For some reason typeof null is \"object\", so special case here.\n if (value === null) {\n return ctx.stylize('null', 'null');\n }\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 (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 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;\n if (value.__lookupGetter__) {\n if (value.__lookupGetter__(key)) {\n if (value.__lookupSetter__(key)) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (value.__lookupSetter__(key)) {\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\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.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 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 \n * MIT Licensed\n */\n\n/*!\n * Module dependancies\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 (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 - overwriteChainableMethod utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * ### overwriteChainableMethod (ctx, name, method, chainingBehavior)\n *\n * Overwites 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, 'length',\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.length(3);\n * expect(myFoo).to.have.length.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 (ctx, name, method, chainingBehavior) {\n var chainableBehavior = ctx.__methods[name];\n\n var _chainingBehavior = chainableBehavior.chainingBehavior;\n chainableBehavior.chainingBehavior = function () {\n var result = chainingBehavior(_chainingBehavior).call(this);\n return result === undefined ? this : result;\n };\n\n var _method = chainableBehavior.method;\n chainableBehavior.method = function () {\n var result = method(_method).apply(this, arguments);\n return result === undefined ? this : result;\n };\n};\n","/*!\n * Chai - overwriteMethod utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * ### overwriteMethod (ctx, name, fn)\n *\n * Overwites 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 (ctx, name, method) {\n var _method = ctx[name]\n , _super = function () { return this; };\n\n if (_method && 'function' === typeof _method)\n _super = _method;\n\n ctx[name] = function () {\n var result = method(_super).apply(this, arguments);\n return result === undefined ? this : result;\n }\n};\n","/*!\n * Chai - overwriteProperty utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * ### overwriteProperty (ctx, name, fn)\n *\n * Overwites 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 (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 () {\n var result = getter(_super).call(this);\n return result === undefined ? this : result;\n }\n , configurable: true\n });\n};\n","/*!\n * Chai - test utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Module dependancies\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 (obj, args) {\n var negate = flag(obj, 'negate')\n , expr = args[0];\n return negate ? !expr : expr;\n};\n","/*!\n * Chai - transferFlags utility\n * Copyright(c) 2012-2014 Jake Luer \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`, and `message`)\n * will not be transferred.\n *\n *\n * var newAssertion = new Assertion();\n * utils.transferFlags(assertion, newAssertion);\n *\n * var anotherAsseriton = 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 (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 != 'message')) {\n object.__flags[flag] = flags[flag];\n }\n }\n};\n","\"use strict\";\n\nfunction dedent(strings) {\n\n var raw = void 0;\n if (typeof strings === \"string\") {\n // dedent can be used as a plain function\n raw = [strings];\n } else {\n raw = strings.raw;\n }\n\n // first, perform interpolation\n var result = \"\";\n for (var i = 0; i < raw.length; i++) {\n result += raw[i].\n // join lines when there is a suppressed newline\n replace(/\\\\\\n[ \\t]*/g, \"\").\n\n // handle escaped backticks\n replace(/\\\\`/g, \"`\");\n\n if (i < (arguments.length <= 1 ? 0 : arguments.length - 1)) {\n result += arguments.length <= i + 1 ? undefined : arguments[i + 1];\n }\n }\n\n // now strip indentation\n var lines = result.split(\"\\n\");\n var mindent = null;\n lines.forEach(function (l) {\n var m = l.match(/^(\\s+)\\S+/);\n if (m) {\n var indent = m[1].length;\n if (!mindent) {\n // this is the first indented line\n mindent = indent;\n } else {\n mindent = Math.min(mindent, indent);\n }\n }\n });\n\n if (mindent !== null) {\n result = lines.map(function (l) {\n return l[0] === \" \" ? l.slice(mindent) : l;\n }).join(\"\\n\");\n }\n\n // dedent eats leading and trailing whitespace too\n result = result.trim();\n\n // handle escaped newlines at the end to ensure they don't get stripped too\n return result.replace(/\\\\n/g, \"\\n\");\n}\n\nif (typeof module !== \"undefined\") {\n module.exports = dedent;\n}\n","module.exports = require('./lib/eql');\n","/*!\n * deep-eql\n * Copyright(c) 2013 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Module dependencies\n */\n\nvar type = require('type-detect');\n\n/*!\n * Buffer.isBuffer browser shim\n */\n\nvar Buffer;\ntry { Buffer = require('buffer').Buffer; }\ncatch(ex) {\n Buffer = {};\n Buffer.isBuffer = function() { return false; }\n}\n\n/*!\n * Primary Export\n */\n\nmodule.exports = deepEqual;\n\n/**\n * Assert super-strict (egal) equality between\n * two objects of any type.\n *\n * @param {Mixed} a\n * @param {Mixed} b\n * @param {Array} memoised (optional)\n * @return {Boolean} equal match\n */\n\nfunction deepEqual(a, b, m) {\n if (sameValue(a, b)) {\n return true;\n } else if ('date' === type(a)) {\n return dateEqual(a, b);\n } else if ('regexp' === type(a)) {\n return regexpEqual(a, b);\n } else if (Buffer.isBuffer(a)) {\n return bufferEqual(a, b);\n } else if ('arguments' === type(a)) {\n return argumentsEqual(a, b, m);\n } else if (!typeEqual(a, b)) {\n return false;\n } else if (('object' !== type(a) && 'object' !== type(b))\n && ('array' !== type(a) && 'array' !== type(b))) {\n return sameValue(a, b);\n } else {\n return objectEqual(a, b, m);\n }\n}\n\n/*!\n * Strict (egal) equality test. Ensures that NaN always\n * equals NaN and `-0` does not equal `+0`.\n *\n * @param {Mixed} a\n * @param {Mixed} b\n * @return {Boolean} equal match\n */\n\nfunction sameValue(a, b) {\n if (a === b) return a !== 0 || 1 / a === 1 / b;\n return a !== a && b !== b;\n}\n\n/*!\n * Compare the types of two given objects and\n * return if they are equal. Note that an Array\n * has a type of `array` (not `object`) and arguments\n * have a type of `arguments` (not `array`/`object`).\n *\n * @param {Mixed} a\n * @param {Mixed} b\n * @return {Boolean} result\n */\n\nfunction typeEqual(a, b) {\n return type(a) === type(b);\n}\n\n/*!\n * Compare two Date objects by asserting that\n * the time values are equal using `saveValue`.\n *\n * @param {Date} a\n * @param {Date} b\n * @return {Boolean} result\n */\n\nfunction dateEqual(a, b) {\n if ('date' !== type(b)) return false;\n return sameValue(a.getTime(), b.getTime());\n}\n\n/*!\n * Compare two regular expressions by converting them\n * to string and checking for `sameValue`.\n *\n * @param {RegExp} a\n * @param {RegExp} b\n * @return {Boolean} result\n */\n\nfunction regexpEqual(a, b) {\n if ('regexp' !== type(b)) return false;\n return sameValue(a.toString(), b.toString());\n}\n\n/*!\n * Assert deep equality of two `arguments` objects.\n * Unfortunately, these must be sliced to arrays\n * prior to test to ensure no bad behavior.\n *\n * @param {Arguments} a\n * @param {Arguments} b\n * @param {Array} memoize (optional)\n * @return {Boolean} result\n */\n\nfunction argumentsEqual(a, b, m) {\n if ('arguments' !== type(b)) return false;\n a = [].slice.call(a);\n b = [].slice.call(b);\n return deepEqual(a, b, m);\n}\n\n/*!\n * Get enumerable properties of a given object.\n *\n * @param {Object} a\n * @return {Array} property names\n */\n\nfunction enumerable(a) {\n var res = [];\n for (var key in a) res.push(key);\n return res;\n}\n\n/*!\n * Simple equality for flat iterable objects\n * such as Arrays or Node.js buffers.\n *\n * @param {Iterable} a\n * @param {Iterable} b\n * @return {Boolean} result\n */\n\nfunction iterableEqual(a, b) {\n if (a.length !== b.length) return false;\n\n var i = 0;\n var match = true;\n\n for (; i < a.length; i++) {\n if (a[i] !== b[i]) {\n match = false;\n break;\n }\n }\n\n return match;\n}\n\n/*!\n * Extension to `iterableEqual` specifically\n * for Node.js Buffers.\n *\n * @param {Buffer} a\n * @param {Mixed} b\n * @return {Boolean} result\n */\n\nfunction bufferEqual(a, b) {\n if (!Buffer.isBuffer(b)) return false;\n return iterableEqual(a, b);\n}\n\n/*!\n * Block for `objectEqual` ensuring non-existing\n * values don't get in.\n *\n * @param {Mixed} object\n * @return {Boolean} result\n */\n\nfunction isValue(a) {\n return a !== null && a !== undefined;\n}\n\n/*!\n * Recursively check the equality of two objects.\n * Once basic sameness has been established it will\n * defer to `deepEqual` for each enumerable key\n * in the object.\n *\n * @param {Mixed} a\n * @param {Mixed} b\n * @return {Boolean} result\n */\n\nfunction objectEqual(a, b, m) {\n if (!isValue(a) || !isValue(b)) {\n return false;\n }\n\n if (a.prototype !== b.prototype) {\n return false;\n }\n\n var i;\n if (m) {\n for (i = 0; i < m.length; i++) {\n if ((m[i][0] === a && m[i][1] === b)\n || (m[i][0] === b && m[i][1] === a)) {\n return true;\n }\n }\n } else {\n m = [];\n }\n\n try {\n var ka = enumerable(a);\n var kb = enumerable(b);\n } catch (ex) {\n return false;\n }\n\n ka.sort();\n kb.sort();\n\n if (!iterableEqual(ka, kb)) {\n return false;\n }\n\n m.push([ a, b ]);\n\n var key;\n for (i = ka.length - 1; i >= 0; i--) {\n key = ka[i];\n if (!deepEqual(a[key], b[key], m)) {\n return false;\n }\n }\n\n return true;\n}\n","const initial = require('./problems/initial');\nconst arrays = require('./problems/arrays');\n\nmodule.exports = {\n initial: initial,\n arrays: arrays\n};\n","module.exports = [\n {\n name: 'Access Array by index (first)',\n time: 10,\n prompt: 'Return the first value of the Array',\n given: `const fruits = ['apple', 'banana'];\\r`,\n answer: `const fruits = ['apple', 'banana'];\n return fruits[0];`,\n tests: [\n {\n name: 'Correct output',\n test: 'assert.deepEqual(output, \\'apple\\') === undefined'\n },\n {\n name: 'Returns a String',\n test: 'assert.isString(output) === undefined'\n }\n ]\n },\n {\n name: 'Access Array by index (last)',\n time: 10,\n prompt: 'Return the last value of the Array',\n given: `const fruits = ['apple', 'banana', 'orange'];\\r`,\n answer: `const fruits = ['apple', 'banana', 'orange'];\n return fruits[fruits.length - 1];`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, 'orange') === undefined;`\n },\n {\n name: 'Returns a String',\n test: `assert.isString(output) === undefined;`\n }\n ]\n },\n {\n name: 'Access Array by index (second)',\n time: 10,\n prompt: 'Return the second value of the Array',\n given: `const fruits = ['apple', 'banana'];\\r`,\n answer: `const fruits = ['apple', 'banana'];\n return fruits[1];`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, 'banana') === undefined;`\n },\n {\n name: 'Returns a String',\n test: `assert.isString(output) === undefined;`\n }\n ]\n },\n {\n name: 'Array.forEach()',\n time: 20,\n prompt: 'Loop over the array, add an \\'x\\' to the end of each name, push each fruit into a new array, then return the new array.',\n given: `const fruits = ['apple', 'banana'];\\r`,\n answer: `const fruits = ['apple', 'banana'];\n const newFruits = [];\n fruits.forEach(function(item) {\n newFruits.push(item+'x');\n });\n return newFruits;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, ['applex', 'bananax']) === undefined;`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 2 items',\n test: `assert.lengthOf(output, 2) === undefined;`\n }\n ]\n },\n {\n name: 'Array.push()',\n time: 10,\n prompt: `Add 'orange' to the end of the 'fruits' array and return 'fruits'.`,\n given: `const fruits = ['apple', 'banana'];\\r`,\n answer: `const fruits = ['apple', 'banana'];\n fruits.push('orange');\n return fruits;`,\n tests: [\n {\n name: 'Correct output',\n test: `(assert.deepEqual(output, ['apple', 'banana', 'orange']) === undefined);`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 3 items',\n test: `assert.lengthOf(output, 3) === undefined;`\n }\n ]\n },\n {\n name: 'Array.shift()',\n time: 10,\n prompt: `Remove 'apple' from the front of the 'fruits' array and return 'fruits'.`,\n given: `const fruits = ['apple', 'banana', 'orange'];\\r`,\n answer: `const fruits = ['apple', 'banana', 'orange'];\n fruits.shift();\n return fruits;`,\n tests: [\n {\n name: 'Output must be correct',\n test: `assert.deepEqual(output, ['banana', 'orange']) === undefined;`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 2 items',\n test: `assert.lengthOf(output, 2) === undefined;`\n }\n ]\n },\n {\n name: 'Array.unshift()',\n time: 10,\n prompt: `Add 'strawberry' to the front of the 'fruits' array and return 'fruits'.`,\n given: `const fruits = ['apple', 'banana', 'orange'];\\r`,\n answer: `const fruits = ['apple', 'banana', 'orange'];\n fruits.unshift('strawberry');\n return fruits;`,\n tests: [\n {\n name: 'Output must be correct',\n test: `(assert.deepEqual(output, [\n 'strawberry',\n 'apple',\n 'banana',\n 'orange'\n ]) === undefined)`\n },\n {\n name: 'Must return an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 4 items',\n test: `assert.lengthOf(output, 4) === undefined;`\n }\n ]\n },\n {\n name: 'Array.indexOf()',\n time: 10,\n prompt: `Return the index of 'banana' in the Array.`,\n given: `const fruits = ['strawberry', 'banana', 'mango'];\\r`,\n answer: `const fruits = ['strawberry', 'banana', 'mango'];\n const ind = fruits.indexOf('banana');\n return ind;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, 1) === undefined;`\n },\n {\n name: 'Returns a Number',\n test: `assert.isNumber(output) === undefined;`\n }\n ]\n },\n {\n name: 'Array.concat()',\n time: 10,\n prompt: `Merge the two arrays using Array's 'concat()' method. Return the resulting array.`,\n given: `const fruits = ['strawberry', 'banana'];\\rconst otherFruits = ['pear','peach'];\\r`,\n answer: `const fruits = ['strawberry', 'banana'];\n const otherFruits = ['pear','peach'];\n const allTheFruits = fruits.concat(otherFruits);\n return allTheFruits;\\r`,\n tests: [\n {\n name: 'Correct output',\n test: `(assert.deepEqual(output, [\n 'strawberry',\n 'banana',\n 'pear',\n 'peach'\n ]) === undefined\n );`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 4 items',\n test: `assert.lengthOf(output, 4) === undefined;`\n }\n ]\n },\n {\n name: 'Array.join()',\n time: 10,\n prompt: `Mix the two flavors with a '-' using Array's 'join' method. Return the resulting hybrid flavor.`,\n given: `const fruits = ['strawberry', 'banana'];\\r`,\n answer: `const fruits = ['strawberry', 'banana'];\n const hybrid = fruits.join('-');\n return hybrid;\\r`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, 'strawberry-banana') === undefined;`\n },\n {\n name: 'Returns a String',\n test: `assert.isString(output) === undefined;`\n }\n ]\n },\n {\n name: 'Array.slice()',\n time: 20,\n prompt: `Return just the citrus fruits from the 'fruits' array using 'Array.slice()'`,\n given: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\\r`,\n answer: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\n const citrus = fruits.slice(1, 3);\n return citrus;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, ['orange', 'lemon']) === undefined;`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 2 items',\n test: `assert.lengthOf(output, 2) === undefined;`\n }\n ]\n },\n {\n name: 'Array.reverse()',\n time: 10,\n prompt: `Reverse the order of the 'fruit' array using 'Array.reverse()'`,\n given: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\\r`,\n answer: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\n const stiurf = fruits.reverse();\n return stiurf;`,\n tests: [\n {\n name: 'Correct output',\n test: `(assert.deepEqual(output, [\n 'banana',\n 'lemon',\n 'orange',\n 'strawberry'\n ]) === undefined);`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 4 items',\n test: `assert.lengthOf(output, 4) === undefined;`\n },\n {\n name: `First item is 'banana'`,\n test: `assert.deepEqual(output[0], 'banana') === undefined;`\n }\n ]\n },\n {\n name: 'Array.sort()',\n time: 10,\n prompt: `Return the 'fruits' Array after sorting them using 'Array.sort()'.`,\n given: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\\r`,\n answer: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\n const orderlyFruit = fruits.sort();\n return orderlyFruit;`,\n tests: [\n {\n name: 'Correct output',\n test: `(assert.deepEqual(output, [\n 'banana',\n 'lemon',\n 'orange',\n 'strawberry'\n ]) === undefined);`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 4 items',\n test: `assert.lengthOf(output, 4) === undefined;`\n },\n {\n name: `First item is 'banana'`,\n test: `assert.deepEqual(output[0], 'banana') === undefined;`\n }\n ]\n },\n {\n name: 'Array.lastIndexOf()',\n time: 10,\n prompt: `Return the index of the last 'peach' instance in the 'fruit' array using 'Array.lastIndexOf()'`,\n given: `const fruits = ['peach', 'orange', 'lemon', 'peach'];\\r`,\n answer: `const fruits = ['peach', 'orange', 'lemon', 'peach'];\n const wheresTheLastPeach = fruits.lastIndexOf('peach');\n return wheresTheLastPeach;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, 3) === undefined;`\n },\n {\n name: 'Returns a Number',\n test: `assert.isNumber(output) === undefined;`\n }\n ]\n },\n {\n name: 'Array.filter()',\n time: 10,\n prompt: `Return an array of the numbers greater than 5 in 'numbers' using 'Array.filter()'`,\n given: `const numbers = [1, 1, 2, 3, 5, 8, 13, 21];\\r`,\n answer: `const numbers = [1, 1, 2, 3, 5, 8, 13, 21];\n const overFive = numbers.filter(num => num > 5);\n return overFive;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, [8, 13, 21]) === undefined;`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 3 items',\n test: `assert.lengthOf(output, 3) === undefined;`\n },\n {\n name: `First item is 8`,\n test: `assert.deepEqual(output[0], 8) === undefined;`\n }\n ]\n },\n {\n name: 'Array.map()',\n time: 10,\n prompt: `Return an array of 'numbers' array's square roots, using 'Array.map()' and 'Math.sqrt()'`,\n given: `const numbers = [25, 121, 169];\\r`,\n answer: `const numbers = [25, 121, 169];\n const roots = numbers.map(num => Math.sqrt(num));\n return roots;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, [5, 11, 13]) === undefined;`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 3 items',\n test: `assert.lengthOf(output, 3) === undefined;`\n },\n {\n name: `First item is 5`,\n test: `assert.deepEqual(output[0], 5) === undefined;`\n },\n {\n name: `Last item is 13`,\n test: `assert.deepEqual(output[output.length - 1], 13) === undefined;`\n }\n ]\n },\n {\n name: 'Array.every()',\n time: 10,\n prompt: `Return object that returns whether each array contains all even numbers using Array.every().`,\n given: `const evenNumbers = [2, 4, 6, 8];\n const someOddNumbers = [2, 5, 6, 8];\n function isEven(element) {\n \n }\n return {\n evenNumbers: evenNumbers.,\n someOddNumbers: someOddNumbers.\n };`,\n answer: `const evenNumbers = [2, 4, 6, 8];\n const someOddNumbers = [2, 5, 6, 8];\n function isEven(element) {\n return element % 2 === 0\n }\n return {\n evenNumbers: evenNumbers.every(isEven),\n someOddNumbers: someOddNumbers.every(isEven)\n };`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, {\n evenNumbers: true,\n someOddNumbers: false\n }) === undefined;`\n },\n {\n name: 'Returns an Object',\n test: `assert.isObject(output) === undefined;`\n },\n {\n name: 'Object has 2 items',\n test: `assert.lengthOf(Object.keys(output), 2) === undefined;`\n },\n {\n name: `First value is true`,\n test: `assert.isTrue(output.evenNumbers) === undefined;`\n },\n {\n name: `Second value is false`,\n test: `assert.isFalse(output.someOddNumbers) === undefined;`\n }\n ]\n },\n {\n name: 'Array.some()',\n time: 10,\n prompt: `Return 'Object' that returns whether each array contains some odd numbers using 'Array.some()'.`,\n given: `const evenNumbers = [2, 4, 6, 8];\n const someOddNumbers = [2, 4, 7, 8];\n function isOdd(element) {\n \n }\n return {\n evenNumbers: evenNumbers.,\n someOddNumbers: someOddNumbers.\n };`,\n answer: `const evenNumbers = [1, 3, 5, 7];\n const someOddNumbers = [1, 3, 6, 7];\n function isOdd(element) {\n return element % 2 !== 0;\n }\n return {\n evenNumbers: evenNumbers.some(isOdd),\n someOddNumbers: someOddNumbers.some(isOdd)\n };`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, {\n evenNumbers: false,\n someOddNumbers: true\n }) === undefined;`\n },\n {\n name: 'Returns an Object',\n test: `assert.isObject(output) === undefined;`\n },\n {\n name: 'Object has 2 items',\n test: `assert.lengthOf(Object.keys(output), 2) === undefined;`\n },\n {\n name: `First value is false`,\n test: `assert.isFalse(output.evenNumbers) === undefined;`\n },\n {\n name: `Second value is true`,\n test: `assert.isTrue(output.someOddNumbers) === undefined;`\n }\n ]\n }\n // Next problems to create:\n // forEach? fix one above that tried, but can't verify forEach was used\n // some\n // reduce\n // reduceRight\n // Array.from and other ways to turn array-like into array\n];\n","module.exports = [\n {\n name: 'Create Array',\n time: 10,\n prompt: 'Create and return an array that contains \\'apple\\' and \\'banana\\'',\n given: `const fruits = [];\\rreturn fruits;`,\n answer: `const fruits = ['apple', 'banana'];\n return fruits;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, ['apple', 'banana']) === undefined;`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 2 items',\n test: `assert.lengthOf(output, 2) === undefined;`\n }\n ]\n },\n {\n name: 'Array.pop()',\n time: 10,\n prompt: `Remove 'orange' from the end of the 'fruits' array and return 'fruits'.`,\n given: `const fruits = ['apple', 'banana', 'orange'];\\r`,\n answer: `const fruits = ['apple', 'banana', 'orange'];\n fruits.pop();\n return fruits;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, ['apple', 'banana']) === undefined;`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 2 items',\n test: `assert.lengthOf(output, 2) === undefined;`\n }\n ]\n }\n]\n","module.exports = require('./lib/type');\n","/*!\n * type-detect\n * Copyright(c) 2013 jake luer \n * MIT Licensed\n */\n\n/*!\n * Primary Exports\n */\n\nvar exports = module.exports = getType;\n\n/*!\n * Detectable javascript natives\n */\n\nvar natives = {\n '[object Array]': 'array'\n , '[object RegExp]': 'regexp'\n , '[object Function]': 'function'\n , '[object Arguments]': 'arguments'\n , '[object Date]': 'date'\n};\n\n/**\n * ### typeOf (obj)\n *\n * Use several different techniques to determine\n * the type of object being tested.\n *\n *\n * @param {Mixed} object\n * @return {String} object type\n * @api public\n */\n\nfunction getType (obj) {\n var str = Object.prototype.toString.call(obj);\n if (natives[str]) return natives[str];\n if (obj === null) return 'null';\n if (obj === undefined) return 'undefined';\n if (obj === Object(obj)) return 'object';\n return typeof obj;\n}\n\nexports.Library = Library;\n\n/**\n * ### Library\n *\n * Create a repository for custom type detection.\n *\n * ```js\n * var lib = new type.Library;\n * ```\n *\n */\n\nfunction Library () {\n this.tests = {};\n}\n\n/**\n * #### .of (obj)\n *\n * Expose replacement `typeof` detection to the library.\n *\n * ```js\n * if ('string' === lib.of('hello world')) {\n * // ...\n * }\n * ```\n *\n * @param {Mixed} object to test\n * @return {String} type\n */\n\nLibrary.prototype.of = getType;\n\n/**\n * #### .define (type, test)\n *\n * Add a test to for the `.test()` assertion.\n *\n * Can be defined as a regular expression:\n *\n * ```js\n * lib.define('int', /^[0-9]+$/);\n * ```\n *\n * ... or as a function:\n *\n * ```js\n * lib.define('bln', function (obj) {\n * if ('boolean' === lib.of(obj)) return true;\n * var blns = [ 'yes', 'no', 'true', 'false', 1, 0 ];\n * if ('string' === lib.of(obj)) obj = obj.toLowerCase();\n * return !! ~blns.indexOf(obj);\n * });\n * ```\n *\n * @param {String} type\n * @param {RegExp|Function} test\n * @api public\n */\n\nLibrary.prototype.define = function (type, test) {\n if (arguments.length === 1) return this.tests[type];\n this.tests[type] = test;\n return this;\n};\n\n/**\n * #### .test (obj, test)\n *\n * Assert that an object is of type. Will first\n * check natives, and if that does not pass it will\n * use the user defined custom tests.\n *\n * ```js\n * assert(lib.test('1', 'int'));\n * assert(lib.test('yes', 'bln'));\n * ```\n *\n * @param {Mixed} object\n * @param {String} type\n * @return {Boolean} result\n * @api public\n */\n\nLibrary.prototype.test = function (obj, type) {\n if (type === getType(obj)) return true;\n var test = this.tests[type];\n\n if (test && 'regexp' === getType(test)) {\n return test.test(obj);\n } else if (test && 'function' === getType(test)) {\n return test(obj);\n } else {\n throw new ReferenceError('Type test \"' + type + '\" not defined or invalid.');\n }\n};\n","/*!\n * type-detect\n * Copyright(c) 2013 jake luer \n * MIT Licensed\n */\n\n/*!\n * Primary Exports\n */\n\nvar exports = module.exports = getType;\n\n/**\n * ### typeOf (obj)\n *\n * Use several different techniques to determine\n * the type of object being tested.\n *\n *\n * @param {Mixed} object\n * @return {String} object type\n * @api public\n */\nvar objectTypeRegexp = /^\\[object (.*)\\]$/;\n\nfunction getType(obj) {\n var type = Object.prototype.toString.call(obj).match(objectTypeRegexp)[1].toLowerCase();\n // Let \"new String('')\" return 'object'\n if (typeof Promise === 'function' && obj instanceof Promise) return 'promise';\n // PhantomJS has type \"DOMWindow\" for null\n if (obj === null) return 'null';\n // PhantomJS has type \"DOMWindow\" for undefined\n if (obj === undefined) return 'undefined';\n return type;\n}\n\nexports.Library = Library;\n\n/**\n * ### Library\n *\n * Create a repository for custom type detection.\n *\n * ```js\n * var lib = new type.Library;\n * ```\n *\n */\n\nfunction Library() {\n if (!(this instanceof Library)) return new Library();\n this.tests = {};\n}\n\n/**\n * #### .of (obj)\n *\n * Expose replacement `typeof` detection to the library.\n *\n * ```js\n * if ('string' === lib.of('hello world')) {\n * // ...\n * }\n * ```\n *\n * @param {Mixed} object to test\n * @return {String} type\n */\n\nLibrary.prototype.of = getType;\n\n/**\n * #### .define (type, test)\n *\n * Add a test to for the `.test()` assertion.\n *\n * Can be defined as a regular expression:\n *\n * ```js\n * lib.define('int', /^[0-9]+$/);\n * ```\n *\n * ... or as a function:\n *\n * ```js\n * lib.define('bln', function (obj) {\n * if ('boolean' === lib.of(obj)) return true;\n * var blns = [ 'yes', 'no', 'true', 'false', 1, 0 ];\n * if ('string' === lib.of(obj)) obj = obj.toLowerCase();\n * return !! ~blns.indexOf(obj);\n * });\n * ```\n *\n * @param {String} type\n * @param {RegExp|Function} test\n * @api public\n */\n\nLibrary.prototype.define = function(type, test) {\n if (arguments.length === 1) return this.tests[type];\n this.tests[type] = test;\n return this;\n};\n\n/**\n * #### .test (obj, test)\n *\n * Assert that an object is of type. Will first\n * check natives, and if that does not pass it will\n * use the user defined custom tests.\n *\n * ```js\n * assert(lib.test('1', 'int'));\n * assert(lib.test('yes', 'bln'));\n * ```\n *\n * @param {Mixed} object\n * @param {String} type\n * @return {Boolean} result\n * @api public\n */\n\nLibrary.prototype.test = function(obj, type) {\n if (type === getType(obj)) return true;\n var test = this.tests[type];\n\n if (test && 'regexp' === getType(test)) {\n return test.test(obj);\n } else if (test && 'function' === getType(test)) {\n return test(obj);\n } else {\n throw new ReferenceError('Type test \"' + type + '\" not defined or invalid.');\n }\n};\n","(function (document, window) {\n // DEPENDENCIES\n // ============================================================\n const probs = require('pjs-problems');\n const dedent = require('dedent');\n const assert = require('chai').assert;\n\n // PROBLEM TEMPLATE NICE-IFICATION\n // ============================================================\n\n function dedentStrings(problems) {\n return problems.map(prob => {\n prob.given = dedent(prob.given)\n prob.answer = dedent(prob.answer)\n return prob\n });\n }\n\n\n // PROBLEMS\n // ============================================================\n\n let problems = [];\n Object.keys(probs).forEach(subject => {\n problems.push(...probs[subject]);\n });\n problems = dedentStrings(problems);\n\n\n // CONFIG\n // ============================================================\n\n // Hoist current problem\n let currentProblem;\n\n // Keys to ignore while user is navigating around the textarea but not changing any code\n const ignoreKeyCodes = [\n 9, // Tab\n 37, // Left arrow\n 39, // Right arrow\n 38, // Up arrow\n 40 // Down arrow\n ];\n\n let config = {\n shuffle: true,\n timer: false,\n currentIndex: 0\n };\n\n\n // HELPERS\n // ============================================================\n\n function debounce(func, wait, immediate) {\n let timeout;\n return function () {\n const context = this;\n const args = arguments;\n const later = function () {\n timeout = null;\n if (!immediate) {\n func.apply(context, args);\n }\n };\n const callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) {\n func.apply(context, args);\n }\n };\n }\n\n // UI\n // ============================================================\n\n // elements\n const problemEl = document.getElementById('problem');\n const codeEl = document.getElementById('code');\n const testSuiteEl = document.getElementById('test-suite');\n const testTotalEl = document.getElementById('test-total');\n const evalConsoleEl = document.getElementById('eval-output');\n const assertConsoleEl = document.getElementById('assert-output');\n const shuffleProblemsButtonEl = document.getElementById('shuffle-problems');\n const previousProblemButtonEl = document.getElementById('prev-problem');\n const nextProblemButtonEl = document.getElementById('next-problem');\n\n // LOCALSTORE\n // --------------------------------------------------------------------------------\n\n // Pull config from localstorage\n if (window.localStorage) {\n const localConfig = localStorage.getItem('js_practice_config');\n if (localConfig) {\n try {\n config = JSON.parse(localConfig);\n loadApp(config);\n } catch (err) {\n console.log('LOCAL_CONFIG PARSE ERR:', err);\n }\n } else {\n console.log('LOCAL_CONFIG: No local config');\n loadApp(config);\n }\n }\n\n function updateLocalstore(config) {\n return new Promise((resolve, reject) => {\n if (window.localStorage) {\n localStorage.setItem('js_practice_config', JSON.stringify(config));\n console.log('Saved config: ', config);\n resolve();\n } else {\n reject();\n }\n });\n }\n\n // Get indexes\n function getRandomIndex(problemsArr) {\n const ind = Math.floor(Math.random() * problemsArr.length);\n config.currentIndex = ind;\n updateLocalstore(config);\n return ind;\n }\n\n function getPreviousIndex(problemsArr) {\n let probInd;\n const currentIndex = config.currentIndex;\n // If at beginning, go to end\n if (currentIndex === 0) {\n probInd = problemsArr.length - 1;\n } else {\n probInd = currentIndex - 1;\n }\n return probInd;\n }\n\n function getNextIndex(problemsArr) {\n let probInd;\n const currentIndex = config.currentIndex;\n // If at end or invalid, restart series\n if (currentIndex >= problemsArr.length - 1 || currentIndex < 0) {\n probInd = 0;\n } else {\n probInd = currentIndex + 1;\n }\n return probInd;\n }\n\n // Get problems\n function getCurrentProblem(problemsArr) {\n return problemsArr[config.currentIndex];\n }\n\n function previousProblem() {\n console.log('previousProblem!');\n // Activate back button, for visual queue of nav feedback\n previousProblemButtonEl.classList.add('active');\n config.currentIndex = config.shuffle\n ? getRandomIndex(problems)\n : getPreviousIndex(problems);\n updateLocalstore(config).then(() => {\n window.location.reload();\n });\n }\n\n function nextProblem() {\n console.log('nextProblem!');\n // Activate next button, for visual queue of nav feedback\n nextProblemButtonEl.classList.add('active');\n config.currentIndex = config.shuffle\n ? getRandomIndex(problems)\n : getNextIndex(problems);\n updateLocalstore(config).then(() => {\n window.location.reload();\n });\n }\n\n function toggleShuffle() {\n console.log('toggle shuffle!');\n config.shuffle = !config.shuffle; // Flip it\n shuffleProblemsButtonEl.classList.toggle('active');\n previousProblemButtonEl.parentNode.classList.toggle('hidden');\n updateLocalstore(config);\n }\n\n function loadProblem(problemObj) {\n currentProblem = problemObj;\n // Prob question\n problemEl.innerText = problemObj.prompt;\n // Prob given code\n if (problemObj.given) {\n codeEl.value = problemObj.given;\n }\n // Seed the tests, pass (init = true) as second param\n testSuite(null, true);\n }\n\n // TODO: Build the assert errors into the test dom on each update.\n function updateTests(testStatus, init) {\n if (init === true) {\n buildTests(currentProblem.tests);\n }\n updateTestStatus(testStatus);\n }\n\n function buildTests(tests) {\n if (tests) {\n const testsDom = tests\n .map(test => {\n return `
\n
[✘]
\n
${test.name}
\n
`;\n })\n .join('');\n testSuiteEl.innerHTML = testsDom;\n }\n }\n\n function updateTestStatus(testStatuses) {\n if (!testStatuses) {\n throw new Error('No testStatuses provided.');\n }\n // Find out if all tests have passed or not\n let allPassed = true;\n testStatuses.forEach(testPassed => {\n if (testPassed !== true) {\n allPassed = false;\n }\n });\n const testEls = [].slice.call(testSuiteEl.querySelectorAll('.test-state'));\n testEls.forEach((testStatusEl, iter) => {\n if (testStatuses[iter] === true) {\n testStatusEl.innerHTML = '[✓]';\n testStatusEl.classList.remove('fail');\n testStatusEl.classList.add('pass');\n } else {\n testStatusEl.innerHTML = '[✘]';\n testStatusEl.classList.remove('pass');\n testStatusEl.classList.add('fail');\n }\n });\n\n if (allPassed === true) {\n testTotalEl.innerText = 'PASS';\n testTotalEl.classList.remove('fail');\n testTotalEl.classList.add('pass');\n } else {\n testTotalEl.innerText = 'FAIL';\n testTotalEl.classList.remove('pass');\n testTotalEl.classList.add('fail');\n }\n }\n\n function printAssertError(errObj) {\n // Make element string\n let inner = '';\n if (errObj !== null) {\n inner = `\n
\n Expected: ${JSON.stringify(errObj.expected)}\n Actual: ${JSON.stringify(errObj.actual)}\n
`;\n }\n\n // Prepend element\n assertConsoleEl.innerHTML = inner;\n }\n\n function printEvalOutput(errObj, output) {\n // Make element string\n let inner = '';\n if (errObj && errObj.message !== undefined) {\n inner = `\n
\n Syntax Error: ${JSON.stringify(errObj.message)}\n
`;\n } else if (output) {\n inner = `\n
\n Output: ${JSON.stringify(output)}\n
`;\n }\n // Prepend element\n evalConsoleEl.innerHTML = inner;\n }\n\n\n // VERIFICATION LOGIC\n // ============================================================\n\n function testSuite(init) {\n // Show 'working' indicator\n testTotalEl.classList.toggle('working');\n // Run stuff\n const output = getOutput(codeEl.value);\n // Run tests on code, return object/array of test results\n const tested = runTests(output);\n // Hide 'working' indicator\n testTotalEl.classList.toggle('working');\n // Update UI with results\n updateTests(tested, init);\n }\n\n function getOutput(code) {\n let evald = false;\n try {\n evald = eval(`(function(){${code}})()`); // eslint-disable-line no-eval\n printEvalOutput(null, evald); // Print current output\n } catch (err) {\n printEvalOutput(err);\n }\n return evald;\n }\n\n function runTests(output) {\n let tested = false;\n tested = currentProblem.tests.map(test => {\n let testOutcome = false;\n try {\n if (output) {\n testOutcome = eval(test.test);\n }\n printAssertError(null);\n } catch (err) {\n printAssertError(err);\n }\n return testOutcome;\n });\n return tested;\n }\n\n // Wrapped to prevent race with local config retrieval\n function loadApp(config) {\n console.log('loading app!');\n\n // Show current toggle state\n if (config.shuffle === true) {\n shuffleProblemsButtonEl.classList.add('active');\n previousProblemButtonEl.parentNode.classList.add('hidden');\n }\n\n // Keybinding stuff\n // ============================================================\n\n // Debounced code validation\n const debouncedInputValidation = debounce(e => {\n // If not arrow keys or other non-character keys\n if (ignoreKeyCodes.indexOf(e.keyCode) === -1) {\n // Run test suite\n testSuite();\n }\n }, 200);\n\n function problemNav(e) {\n // Go to previous problem keybinding\n // If CMD/CTRL + SHIFT + RETURN/ENTER\n if (config.shuffle === false && e.keyCode === 13 && e.shiftKey && (e.metaKey || e.ctrlKey)) {\n // Go to next problem\n previousProblem();\n } else if (e.keyCode === 13 && !e.shiftKey && (e.metaKey || e.ctrlKey)) {\n // Go to next problem keybinding\n // If CMD/CTRL + RETURN/ENTER\n // Go to next problem\n nextProblem();\n }\n }\n\n // Event Bindings\n // ============================================================\n\n // Bind it up\n codeEl.addEventListener('keydown', debouncedInputValidation);\n document.addEventListener('keydown', problemNav);\n shuffleProblemsButtonEl.addEventListener('click', toggleShuffle);\n previousProblemButtonEl.addEventListener('click', previousProblem);\n nextProblemButtonEl.addEventListener('click', nextProblem);\n\n // Start it up!\n // Load current problem\n const currProb = getCurrentProblem(problems);\n loadProblem(currProb);\n // Initalized test suite with starting failures\n testSuite(true);\n }\n})(document, window);\n"]} \ No newline at end of file diff --git a/public/service-worker.js b/public/service-worker.js index e2df7b3..b4de3bd 100644 --- a/public/service-worker.js +++ b/public/service-worker.js @@ -1,2 +1,2 @@ -"use strict";function setOfCachedUrls(e){return e.keys().then(function(e){return e.map(function(e){return e.url})}).then(function(e){return new Set(e)})}var precacheConfig=[["/dist/css/style.css","ba4d66c91d1ed66848154a34ab4948cf"],["/dist/img/back.svg","898ada2a32ec64bd5b6959c22e8f231d"],["/dist/img/monitor.svg","348592da5567b5a3c46acfb5dcd341bc"],["/dist/img/next.svg","045593410b9f51390e750b9e1e7fff15"],["/dist/img/reload.svg","a0ab1b765280e4d22e6fb747042f6503"],["/dist/img/shuffle.svg","3a5e3c1bf04eb3493d8a2ffa547aa58f"],["/dist/img/social-banner.png","7c1a8058bb3d00c2b40283c735748cfc"],["/dist/js/bundle.min.js","d6329d2b9a6a07313555b757df5081d3"],["/dist/js/loadJS.js","72c55936069f60560a386e46f462c73a"],["/dist/js/sw-registration.js","677217d8e642c1ccff69fc01c96b4431"],["/index.html","c7522a5d3255caca0f12c5282ef0644d"]],cacheName="sw-precache-v3--"+(self.registration?self.registration.scope:""),ignoreUrlParametersMatching=[/^utm_/],addDirectoryIndex=function(e,t){var n=new URL(e);return"/"===n.pathname.slice(-1)&&(n.pathname+=t),n.toString()},cleanResponse=function(e){return e.redirected?("body"in e?Promise.resolve(e.body):e.blob()).then(function(t){return new Response(t,{headers:e.headers,status:e.status,statusText:e.statusText})}):Promise.resolve(e)},createCacheKey=function(e,t,n,r){var a=new URL(e);return r&&a.pathname.match(r)||(a.search+=(a.search?"&":"")+encodeURIComponent(t)+"="+encodeURIComponent(n)),a.toString()},isPathWhitelisted=function(e,t){if(0===e.length)return!0;var n=new URL(t).pathname;return e.some(function(e){return n.match(e)})},stripIgnoredUrlParameters=function(e,t){var n=new URL(e);return n.hash="",n.search=n.search.slice(1).split("&").map(function(e){return e.split("=")}).filter(function(e){return t.every(function(t){return!t.test(e[0])})}).map(function(e){return e.join("=")}).join("&"),n.toString()},hashParamName="_sw-precache",urlsToCacheKeys=new Map(precacheConfig.map(function(e){var t=e[0],n=e[1],r=new URL(t,self.location),a=createCacheKey(r,hashParamName,n,!1);return[r.toString(),a]}));self.addEventListener("install",function(e){e.waitUntil(caches.open(cacheName).then(function(e){return setOfCachedUrls(e).then(function(t){return Promise.all(Array.from(urlsToCacheKeys.values()).map(function(n){if(!t.has(n)){var r=new Request(n,{credentials:"same-origin"});return fetch(r).then(function(t){if(!t.ok)throw new Error("Request for "+n+" returned a response with status "+t.status);return cleanResponse(t).then(function(t){return e.put(n,t)})})}}))})}).then(function(){return self.skipWaiting()}))}),self.addEventListener("activate",function(e){var t=new Set(urlsToCacheKeys.values());e.waitUntil(caches.open(cacheName).then(function(e){return e.keys().then(function(n){return Promise.all(n.map(function(n){if(!t.has(n.url))return e.delete(n)}))})}).then(function(){return self.clients.claim()}))}),self.addEventListener("fetch",function(e){if("GET"===e.request.method){var t,n=stripIgnoredUrlParameters(e.request.url,ignoreUrlParametersMatching);(t=urlsToCacheKeys.has(n))||(n=addDirectoryIndex(n,"index.html"),t=urlsToCacheKeys.has(n));t&&e.respondWith(caches.open(cacheName).then(function(e){return e.match(urlsToCacheKeys.get(n)).then(function(e){if(e)return e;throw Error("The cached response that was expected is missing.")})}).catch(function(t){return console.warn('Couldn\'t serve response for "%s" from cache: %O',e.request.url,t),fetch(e.request)}))}}); +"use strict";function setOfCachedUrls(e){return e.keys().then(function(e){return e.map(function(e){return e.url})}).then(function(e){return new Set(e)})}var precacheConfig=[["/dist/css/style.css","ba4d66c91d1ed66848154a34ab4948cf"],["/dist/img/back.svg","898ada2a32ec64bd5b6959c22e8f231d"],["/dist/img/monitor.svg","348592da5567b5a3c46acfb5dcd341bc"],["/dist/img/next.svg","045593410b9f51390e750b9e1e7fff15"],["/dist/img/reload.svg","a0ab1b765280e4d22e6fb747042f6503"],["/dist/img/shuffle.svg","3a5e3c1bf04eb3493d8a2ffa547aa58f"],["/dist/img/social-banner.png","7c1a8058bb3d00c2b40283c735748cfc"],["/dist/js/bundle.min.js","e534dee6ffdd27dae5b8137ef1f2acc5"],["/dist/js/loadJS.js","72c55936069f60560a386e46f462c73a"],["/dist/js/sw-registration.js","677217d8e642c1ccff69fc01c96b4431"],["/index.html","c7522a5d3255caca0f12c5282ef0644d"]],cacheName="sw-precache-v3--"+(self.registration?self.registration.scope:""),ignoreUrlParametersMatching=[/^utm_/],addDirectoryIndex=function(e,t){var n=new URL(e);return"/"===n.pathname.slice(-1)&&(n.pathname+=t),n.toString()},cleanResponse=function(e){return e.redirected?("body"in e?Promise.resolve(e.body):e.blob()).then(function(t){return new Response(t,{headers:e.headers,status:e.status,statusText:e.statusText})}):Promise.resolve(e)},createCacheKey=function(e,t,n,r){var a=new URL(e);return r&&a.pathname.match(r)||(a.search+=(a.search?"&":"")+encodeURIComponent(t)+"="+encodeURIComponent(n)),a.toString()},isPathWhitelisted=function(e,t){if(0===e.length)return!0;var n=new URL(t).pathname;return e.some(function(e){return n.match(e)})},stripIgnoredUrlParameters=function(e,t){var n=new URL(e);return n.hash="",n.search=n.search.slice(1).split("&").map(function(e){return e.split("=")}).filter(function(e){return t.every(function(t){return!t.test(e[0])})}).map(function(e){return e.join("=")}).join("&"),n.toString()},hashParamName="_sw-precache",urlsToCacheKeys=new Map(precacheConfig.map(function(e){var t=e[0],n=e[1],r=new URL(t,self.location),a=createCacheKey(r,hashParamName,n,!1);return[r.toString(),a]}));self.addEventListener("install",function(e){e.waitUntil(caches.open(cacheName).then(function(e){return setOfCachedUrls(e).then(function(t){return Promise.all(Array.from(urlsToCacheKeys.values()).map(function(n){if(!t.has(n)){var r=new Request(n,{credentials:"same-origin"});return fetch(r).then(function(t){if(!t.ok)throw new Error("Request for "+n+" returned a response with status "+t.status);return cleanResponse(t).then(function(t){return e.put(n,t)})})}}))})}).then(function(){return self.skipWaiting()}))}),self.addEventListener("activate",function(e){var t=new Set(urlsToCacheKeys.values());e.waitUntil(caches.open(cacheName).then(function(e){return e.keys().then(function(n){return Promise.all(n.map(function(n){if(!t.has(n.url))return e.delete(n)}))})}).then(function(){return self.clients.claim()}))}),self.addEventListener("fetch",function(e){if("GET"===e.request.method){var t,n=stripIgnoredUrlParameters(e.request.url,ignoreUrlParametersMatching);(t=urlsToCacheKeys.has(n))||(n=addDirectoryIndex(n,"index.html"),t=urlsToCacheKeys.has(n));t&&e.respondWith(caches.open(cacheName).then(function(e){return e.match(urlsToCacheKeys.get(n)).then(function(e){if(e)return e;throw Error("The cached response that was expected is missing.")})}).catch(function(t){return console.warn('Couldn\'t serve response for "%s" from cache: %O',e.request.url,t),fetch(e.request)}))}}); //# sourceMappingURL=service-worker.js.map diff --git a/public/service-worker.js.map b/public/service-worker.js.map index e9cb7a5..4ddd931 100644 --- a/public/service-worker.js.map +++ b/public/service-worker.js.map @@ -1 +1 @@ -{"version":3,"sources":["service-worker.js"],"names":["setOfCachedUrls","cache","keys","then","requests","map","request","url","urls","Set","precacheConfig","cacheName","self","registration","scope","ignoreUrlParametersMatching","addDirectoryIndex","originalUrl","index","URL","pathname","slice","toString","cleanResponse","originalResponse","redirected","Promise","resolve","body","blob","Response","headers","status","statusText","createCacheKey","paramName","paramValue","dontCacheBustUrlsMatching","match","search","encodeURIComponent","isPathWhitelisted","whitelist","absoluteUrlString","length","path","some","whitelistedPathRegex","stripIgnoredUrlParameters","hash","split","kv","filter","every","ignoredRegex","test","join","hashParamName","urlsToCacheKeys","Map","item","relativeUrl","absoluteUrl","location","cacheKey","addEventListener","event","waitUntil","caches","open","cachedUrls","all","Array","from","values","has","Request","credentials","fetch","response","ok","Error","responseToCache","put","skipWaiting","setOfExpectedUrls","existingRequests","existingRequest","delete","clients","claim","method","shouldRespond","respondWith","get","catch","e","console","warn"],"mappings":"AAqCA,aAyGA,SAASA,gBAAgBC,GACvB,OAAOA,EAAMC,OAAOC,KAAK,SAASC,GAChC,OAAOA,EAASC,IAAI,SAASC,GAC3B,OAAOA,EAAQC,QAEhBJ,KAAK,SAASK,GACf,OAAO,IAAIC,IAAID,KA7GnB,IAAIE,iBAAmB,sBAAsB,qCAAqC,qBAAqB,qCAAqC,wBAAwB,qCAAqC,qBAAqB,qCAAqC,uBAAuB,qCAAqC,wBAAwB,qCAAqC,8BAA8B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9E,KAAKqD,iBAAiB,QAAS,SAASC,GACtC,GAA6B,QAAzBA,EAAM5D,QAAQqF,OAAkB,CAIlC,IAAIC,EAIArF,EAAMyC,0BAA0BkB,EAAM5D,QAAQC,IAAKQ,8BACvD6E,EAAgBlC,gBAAgBiB,IAAIpE,MAMlCA,EAAMS,kBAAkBT,EAFL,cAGnBqF,EAAgBlC,gBAAgBiB,IAAIpE,IAgBlCqF,GACF1B,EAAM2B,YACJzB,OAAOC,KAAK1D,WAAWR,KAAK,SAASF,GACnC,OAAOA,EAAMqC,MAAMoB,gBAAgBoC,IAAIvF,IAAMJ,KAAK,SAAS4E,GACzD,GAAIA,EACF,OAAOA,EAET,MAAME,MAAM,yDAEbc,MAAM,SAASC,GAIhB,OADAC,QAAQC,KAAK,mDAAoDhC,EAAM5D,QAAQC,IAAKyF,GAC7ElB,MAAMZ,EAAM5D","file":"service-worker.js","sourcesContent":["/**\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n*/\n\n// DO NOT EDIT THIS GENERATED OUTPUT DIRECTLY!\n// This file should be overwritten as part of your build process.\n// If you need to extend the behavior of the generated service worker, the best approach is to write\n// additional code and include it using the importScripts option:\n// https://github.com/GoogleChrome/sw-precache#importscripts-arraystring\n//\n// Alternatively, it's possible to make changes to the underlying template file and then use that as the\n// new base for generating output, via the templateFilePath option:\n// https://github.com/GoogleChrome/sw-precache#templatefilepath-string\n//\n// If you go that route, make sure that whenever you update your sw-precache dependency, you reconcile any\n// changes made to this original template file with your modified copy.\n\n// This generated service worker JavaScript will precache your site's resources.\n// The code needs to be saved in a .js file at the top-level of your site, and registered\n// from your pages in order to be used. See\n// https://github.com/googlechrome/sw-precache/blob/master/demo/app/js/service-worker-registration.js\n// for an example of how you can register this script and handle various service worker events.\n\n/* eslint-env worker, serviceworker */\n/* eslint-disable indent, no-unused-vars, no-multiple-empty-lines, max-nested-callbacks, space-before-function-paren, quotes, comma-spacing */\n'use strict';\n\nvar precacheConfig = [[\"/dist/css/style.css\",\"ba4d66c91d1ed66848154a34ab4948cf\"],[\"/dist/img/back.svg\",\"898ada2a32ec64bd5b6959c22e8f231d\"],[\"/dist/img/monitor.svg\",\"348592da5567b5a3c46acfb5dcd341bc\"],[\"/dist/img/next.svg\",\"045593410b9f51390e750b9e1e7fff15\"],[\"/dist/img/reload.svg\",\"a0ab1b765280e4d22e6fb747042f6503\"],[\"/dist/img/shuffle.svg\",\"3a5e3c1bf04eb3493d8a2ffa547aa58f\"],[\"/dist/img/social-banner.png\",\"7c1a8058bb3d00c2b40283c735748cfc\"],[\"/dist/js/bundle.min.js\",\"d6329d2b9a6a07313555b757df5081d3\"],[\"/dist/js/loadJS.js\",\"72c55936069f60560a386e46f462c73a\"],[\"/dist/js/sw-registration.js\",\"677217d8e642c1ccff69fc01c96b4431\"],[\"/index.html\",\"c7522a5d3255caca0f12c5282ef0644d\"]];\nvar cacheName = 'sw-precache-v3--' + (self.registration ? self.registration.scope : '');\n\n\nvar ignoreUrlParametersMatching = [/^utm_/];\n\n\n\nvar addDirectoryIndex = function (originalUrl, index) {\n var url = new URL(originalUrl);\n if (url.pathname.slice(-1) === '/') {\n url.pathname += index;\n }\n return url.toString();\n };\n\nvar cleanResponse = function (originalResponse) {\n // If this is not a redirected response, then we don't have to do anything.\n if (!originalResponse.redirected) {\n return Promise.resolve(originalResponse);\n }\n\n // Firefox 50 and below doesn't support the Response.body stream, so we may\n // need to read the entire body to memory as a Blob.\n var bodyPromise = 'body' in originalResponse ?\n Promise.resolve(originalResponse.body) :\n originalResponse.blob();\n\n return bodyPromise.then(function(body) {\n // new Response() is happy when passed either a stream or a Blob.\n return new Response(body, {\n headers: originalResponse.headers,\n status: originalResponse.status,\n statusText: originalResponse.statusText\n });\n });\n };\n\nvar createCacheKey = function (originalUrl, paramName, paramValue,\n dontCacheBustUrlsMatching) {\n // Create a new URL object to avoid modifying originalUrl.\n var url = new URL(originalUrl);\n\n // If dontCacheBustUrlsMatching is not set, or if we don't have a match,\n // then add in the extra cache-busting URL parameter.\n if (!dontCacheBustUrlsMatching ||\n !(url.pathname.match(dontCacheBustUrlsMatching))) {\n url.search += (url.search ? '&' : '') +\n encodeURIComponent(paramName) + '=' + encodeURIComponent(paramValue);\n }\n\n return url.toString();\n };\n\nvar isPathWhitelisted = function (whitelist, absoluteUrlString) {\n // If the whitelist is empty, then consider all URLs to be whitelisted.\n if (whitelist.length === 0) {\n return true;\n }\n\n // Otherwise compare each path regex to the path of the URL passed in.\n var path = (new URL(absoluteUrlString)).pathname;\n return whitelist.some(function(whitelistedPathRegex) {\n return path.match(whitelistedPathRegex);\n });\n };\n\nvar stripIgnoredUrlParameters = function (originalUrl,\n ignoreUrlParametersMatching) {\n var url = new URL(originalUrl);\n // Remove the hash; see https://github.com/GoogleChrome/sw-precache/issues/290\n url.hash = '';\n\n url.search = url.search.slice(1) // Exclude initial '?'\n .split('&') // Split into an array of 'key=value' strings\n .map(function(kv) {\n return kv.split('='); // Split each 'key=value' string into a [key, value] array\n })\n .filter(function(kv) {\n return ignoreUrlParametersMatching.every(function(ignoredRegex) {\n return !ignoredRegex.test(kv[0]); // Return true iff the key doesn't match any of the regexes.\n });\n })\n .map(function(kv) {\n return kv.join('='); // Join each [key, value] array into a 'key=value' string\n })\n .join('&'); // Join the array of 'key=value' strings into a string with '&' in between each\n\n return url.toString();\n };\n\n\nvar hashParamName = '_sw-precache';\nvar urlsToCacheKeys = new Map(\n precacheConfig.map(function(item) {\n var relativeUrl = item[0];\n var hash = item[1];\n var absoluteUrl = new URL(relativeUrl, self.location);\n var cacheKey = createCacheKey(absoluteUrl, hashParamName, hash, false);\n return [absoluteUrl.toString(), cacheKey];\n })\n);\n\nfunction setOfCachedUrls(cache) {\n return cache.keys().then(function(requests) {\n return requests.map(function(request) {\n return request.url;\n });\n }).then(function(urls) {\n return new Set(urls);\n });\n}\n\nself.addEventListener('install', function(event) {\n event.waitUntil(\n caches.open(cacheName).then(function(cache) {\n return setOfCachedUrls(cache).then(function(cachedUrls) {\n return Promise.all(\n Array.from(urlsToCacheKeys.values()).map(function(cacheKey) {\n // If we don't have a key matching url in the cache already, add it.\n if (!cachedUrls.has(cacheKey)) {\n var request = new Request(cacheKey, {credentials: 'same-origin'});\n return fetch(request).then(function(response) {\n // Bail out of installation unless we get back a 200 OK for\n // every request.\n if (!response.ok) {\n throw new Error('Request for ' + cacheKey + ' returned a ' +\n 'response with status ' + response.status);\n }\n\n return cleanResponse(response).then(function(responseToCache) {\n return cache.put(cacheKey, responseToCache);\n });\n });\n }\n })\n );\n });\n }).then(function() {\n \n // Force the SW to transition from installing -> active state\n return self.skipWaiting();\n \n })\n );\n});\n\nself.addEventListener('activate', function(event) {\n var setOfExpectedUrls = new Set(urlsToCacheKeys.values());\n\n event.waitUntil(\n caches.open(cacheName).then(function(cache) {\n return cache.keys().then(function(existingRequests) {\n return Promise.all(\n existingRequests.map(function(existingRequest) {\n if (!setOfExpectedUrls.has(existingRequest.url)) {\n return cache.delete(existingRequest);\n }\n })\n );\n });\n }).then(function() {\n \n return self.clients.claim();\n \n })\n );\n});\n\n\nself.addEventListener('fetch', function(event) {\n if (event.request.method === 'GET') {\n // Should we call event.respondWith() inside this fetch event handler?\n // This needs to be determined synchronously, which will give other fetch\n // handlers a chance to handle the request if need be.\n var shouldRespond;\n\n // First, remove all the ignored parameters and hash fragment, and see if we\n // have that URL in our cache. If so, great! shouldRespond will be true.\n var url = stripIgnoredUrlParameters(event.request.url, ignoreUrlParametersMatching);\n shouldRespond = urlsToCacheKeys.has(url);\n\n // If shouldRespond is false, check again, this time with 'index.html'\n // (or whatever the directoryIndex option is set to) at the end.\n var directoryIndex = 'index.html';\n if (!shouldRespond && directoryIndex) {\n url = addDirectoryIndex(url, directoryIndex);\n shouldRespond = urlsToCacheKeys.has(url);\n }\n\n // If shouldRespond is still false, check to see if this is a navigation\n // request, and if so, whether the URL matches navigateFallbackWhitelist.\n var navigateFallback = '';\n if (!shouldRespond &&\n navigateFallback &&\n (event.request.mode === 'navigate') &&\n isPathWhitelisted([], event.request.url)) {\n url = new URL(navigateFallback, self.location).toString();\n shouldRespond = urlsToCacheKeys.has(url);\n }\n\n // If shouldRespond was set to true at any point, then call\n // event.respondWith(), using the appropriate cache key.\n if (shouldRespond) {\n event.respondWith(\n caches.open(cacheName).then(function(cache) {\n return cache.match(urlsToCacheKeys.get(url)).then(function(response) {\n if (response) {\n return response;\n }\n throw Error('The cached response that was expected is missing.');\n });\n }).catch(function(e) {\n // Fall back to just fetch()ing the request if some unexpected error\n // prevented the cached response from being valid.\n console.warn('Couldn\\'t serve response for \"%s\" from cache: %O', event.request.url, e);\n return fetch(event.request);\n })\n );\n }\n }\n});\n\n\n\n\n\n\n\n"]} \ No newline at end of file +{"version":3,"sources":["service-worker.js"],"names":["setOfCachedUrls","cache","keys","then","requests","map","request","url","urls","Set","precacheConfig","cacheName","self","registration","scope","ignoreUrlParametersMatching","addDirectoryIndex","originalUrl","index","URL","pathname","slice","toString","cleanResponse","originalResponse","redirected","Promise","resolve","body","blob","Response","headers","status","statusText","createCacheKey","paramName","paramValue","dontCacheBustUrlsMatching","match","search","encodeURIComponent","isPathWhitelisted","whitelist","absoluteUrlString","length","path","some","whitelistedPathRegex","stripIgnoredUrlParameters","hash","split","kv","filter","every","ignoredRegex","test","join","hashParamName","urlsToCacheKeys","Map","item","relativeUrl","absoluteUrl","location","cacheKey","addEventListener","event","waitUntil","caches","open","cachedUrls","all","Array","from","values","has","Request","credentials","fetch","response","ok","Error","responseToCache","put","skipWaiting","setOfExpectedUrls","existingRequests","existingRequest","delete","clients","claim","method","shouldRespond","respondWith","get","catch","e","console","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C,IAAImB,EAAoB,IAAI5E,IAAIiD,gBAAgBgB,UAEhDR,EAAMC,UACJC,OAAOC,KAAK1D,WAAWR,KAAK,SAASF,GACnC,OAAOA,EAAMC,OAAOC,KAAK,SAASmF,GAChC,OAAO5D,QAAQ6C,IACbe,EAAiBjF,IAAI,SAASkF,GAC5B,IAAKF,EAAkBV,IAAIY,EAAgBhF,KACzC,OAAON,EAAMuF,OAAOD,UAK3BpF,KAAK,WAEN,OAAOS,KAAK6E,QAAQC,aAO1B9E,KAAKqD,iBAAiB,QAAS,SAASC,GACtC,GAA6B,QAAzBA,EAAM5D,QAAQqF,OAAkB,CAIlC,IAAIC,EAIArF,EAAMyC,0BAA0BkB,EAAM5D,QAAQC,IAAKQ,8BACvD6E,EAAgBlC,gBAAgBiB,IAAIpE,MAMlCA,EAAMS,kBAAkBT,EAFL,cAGnBqF,EAAgBlC,gBAAgBiB,IAAIpE,IAgBlCqF,GACF1B,EAAM2B,YACJzB,OAAOC,KAAK1D,WAAWR,KAAK,SAASF,GACnC,OAAOA,EAAMqC,MAAMoB,gBAAgBoC,IAAIvF,IAAMJ,KAAK,SAAS4E,GACzD,GAAIA,EACF,OAAOA,EAET,MAAME,MAAM,yDAEbc,MAAM,SAASC,GAIhB,OADAC,QAAQC,KAAK,mDAAoDhC,EAAM5D,QAAQC,IAAKyF,GAC7ElB,MAAMZ,EAAM5D","file":"service-worker.js","sourcesContent":["/**\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n*/\n\n// DO NOT EDIT THIS GENERATED OUTPUT DIRECTLY!\n// This file should be overwritten as part of your build process.\n// If you need to extend the behavior of the generated service worker, the best approach is to write\n// additional code and include it using the importScripts option:\n// https://github.com/GoogleChrome/sw-precache#importscripts-arraystring\n//\n// Alternatively, it's possible to make changes to the underlying template file and then use that as the\n// new base for generating output, via the templateFilePath option:\n// https://github.com/GoogleChrome/sw-precache#templatefilepath-string\n//\n// If you go that route, make sure that whenever you update your sw-precache dependency, you reconcile any\n// changes made to this original template file with your modified copy.\n\n// This generated service worker JavaScript will precache your site's resources.\n// The code needs to be saved in a .js file at the top-level of your site, and registered\n// from your pages in order to be used. See\n// https://github.com/googlechrome/sw-precache/blob/master/demo/app/js/service-worker-registration.js\n// for an example of how you can register this script and handle various service worker events.\n\n/* eslint-env worker, serviceworker */\n/* eslint-disable indent, no-unused-vars, no-multiple-empty-lines, max-nested-callbacks, space-before-function-paren, quotes, comma-spacing */\n'use strict';\n\nvar precacheConfig = [[\"/dist/css/style.css\",\"ba4d66c91d1ed66848154a34ab4948cf\"],[\"/dist/img/back.svg\",\"898ada2a32ec64bd5b6959c22e8f231d\"],[\"/dist/img/monitor.svg\",\"348592da5567b5a3c46acfb5dcd341bc\"],[\"/dist/img/next.svg\",\"045593410b9f51390e750b9e1e7fff15\"],[\"/dist/img/reload.svg\",\"a0ab1b765280e4d22e6fb747042f6503\"],[\"/dist/img/shuffle.svg\",\"3a5e3c1bf04eb3493d8a2ffa547aa58f\"],[\"/dist/img/social-banner.png\",\"7c1a8058bb3d00c2b40283c735748cfc\"],[\"/dist/js/bundle.min.js\",\"e534dee6ffdd27dae5b8137ef1f2acc5\"],[\"/dist/js/loadJS.js\",\"72c55936069f60560a386e46f462c73a\"],[\"/dist/js/sw-registration.js\",\"677217d8e642c1ccff69fc01c96b4431\"],[\"/index.html\",\"c7522a5d3255caca0f12c5282ef0644d\"]];\nvar cacheName = 'sw-precache-v3--' + (self.registration ? self.registration.scope : '');\n\n\nvar ignoreUrlParametersMatching = [/^utm_/];\n\n\n\nvar addDirectoryIndex = function (originalUrl, index) {\n var url = new URL(originalUrl);\n if (url.pathname.slice(-1) === '/') {\n url.pathname += index;\n }\n return url.toString();\n };\n\nvar cleanResponse = function (originalResponse) {\n // If this is not a redirected response, then we don't have to do anything.\n if (!originalResponse.redirected) {\n return Promise.resolve(originalResponse);\n }\n\n // Firefox 50 and below doesn't support the Response.body stream, so we may\n // need to read the entire body to memory as a Blob.\n var bodyPromise = 'body' in originalResponse ?\n Promise.resolve(originalResponse.body) :\n originalResponse.blob();\n\n return bodyPromise.then(function(body) {\n // new Response() is happy when passed either a stream or a Blob.\n return new Response(body, {\n headers: originalResponse.headers,\n status: originalResponse.status,\n statusText: originalResponse.statusText\n });\n });\n };\n\nvar createCacheKey = function (originalUrl, paramName, paramValue,\n dontCacheBustUrlsMatching) {\n // Create a new URL object to avoid modifying originalUrl.\n var url = new URL(originalUrl);\n\n // If dontCacheBustUrlsMatching is not set, or if we don't have a match,\n // then add in the extra cache-busting URL parameter.\n if (!dontCacheBustUrlsMatching ||\n !(url.pathname.match(dontCacheBustUrlsMatching))) {\n url.search += (url.search ? '&' : '') +\n encodeURIComponent(paramName) + '=' + encodeURIComponent(paramValue);\n }\n\n return url.toString();\n };\n\nvar isPathWhitelisted = function (whitelist, absoluteUrlString) {\n // If the whitelist is empty, then consider all URLs to be whitelisted.\n if (whitelist.length === 0) {\n return true;\n }\n\n // Otherwise compare each path regex to the path of the URL passed in.\n var path = (new URL(absoluteUrlString)).pathname;\n return whitelist.some(function(whitelistedPathRegex) {\n return path.match(whitelistedPathRegex);\n });\n };\n\nvar stripIgnoredUrlParameters = function (originalUrl,\n ignoreUrlParametersMatching) {\n var url = new URL(originalUrl);\n // Remove the hash; see https://github.com/GoogleChrome/sw-precache/issues/290\n url.hash = '';\n\n url.search = url.search.slice(1) // Exclude initial '?'\n .split('&') // Split into an array of 'key=value' strings\n .map(function(kv) {\n return kv.split('='); // Split each 'key=value' string into a [key, value] array\n })\n .filter(function(kv) {\n return ignoreUrlParametersMatching.every(function(ignoredRegex) {\n return !ignoredRegex.test(kv[0]); // Return true iff the key doesn't match any of the regexes.\n });\n })\n .map(function(kv) {\n return kv.join('='); // Join each [key, value] array into a 'key=value' string\n })\n .join('&'); // Join the array of 'key=value' strings into a string with '&' in between each\n\n return url.toString();\n };\n\n\nvar hashParamName = '_sw-precache';\nvar urlsToCacheKeys = new Map(\n precacheConfig.map(function(item) {\n var relativeUrl = item[0];\n var hash = item[1];\n var absoluteUrl = new URL(relativeUrl, self.location);\n var cacheKey = createCacheKey(absoluteUrl, hashParamName, hash, false);\n return [absoluteUrl.toString(), cacheKey];\n })\n);\n\nfunction setOfCachedUrls(cache) {\n return cache.keys().then(function(requests) {\n return requests.map(function(request) {\n return request.url;\n });\n }).then(function(urls) {\n return new Set(urls);\n });\n}\n\nself.addEventListener('install', function(event) {\n event.waitUntil(\n caches.open(cacheName).then(function(cache) {\n return setOfCachedUrls(cache).then(function(cachedUrls) {\n return Promise.all(\n Array.from(urlsToCacheKeys.values()).map(function(cacheKey) {\n // If we don't have a key matching url in the cache already, add it.\n if (!cachedUrls.has(cacheKey)) {\n var request = new Request(cacheKey, {credentials: 'same-origin'});\n return fetch(request).then(function(response) {\n // Bail out of installation unless we get back a 200 OK for\n // every request.\n if (!response.ok) {\n throw new Error('Request for ' + cacheKey + ' returned a ' +\n 'response with status ' + response.status);\n }\n\n return cleanResponse(response).then(function(responseToCache) {\n return cache.put(cacheKey, responseToCache);\n });\n });\n }\n })\n );\n });\n }).then(function() {\n \n // Force the SW to transition from installing -> active state\n return self.skipWaiting();\n \n })\n );\n});\n\nself.addEventListener('activate', function(event) {\n var setOfExpectedUrls = new Set(urlsToCacheKeys.values());\n\n event.waitUntil(\n caches.open(cacheName).then(function(cache) {\n return cache.keys().then(function(existingRequests) {\n return Promise.all(\n existingRequests.map(function(existingRequest) {\n if (!setOfExpectedUrls.has(existingRequest.url)) {\n return cache.delete(existingRequest);\n }\n })\n );\n });\n }).then(function() {\n \n return self.clients.claim();\n \n })\n );\n});\n\n\nself.addEventListener('fetch', function(event) {\n if (event.request.method === 'GET') {\n // Should we call event.respondWith() inside this fetch event handler?\n // This needs to be determined synchronously, which will give other fetch\n // handlers a chance to handle the request if need be.\n var shouldRespond;\n\n // First, remove all the ignored parameters and hash fragment, and see if we\n // have that URL in our cache. If so, great! shouldRespond will be true.\n var url = stripIgnoredUrlParameters(event.request.url, ignoreUrlParametersMatching);\n shouldRespond = urlsToCacheKeys.has(url);\n\n // If shouldRespond is false, check again, this time with 'index.html'\n // (or whatever the directoryIndex option is set to) at the end.\n var directoryIndex = 'index.html';\n if (!shouldRespond && directoryIndex) {\n url = addDirectoryIndex(url, directoryIndex);\n shouldRespond = urlsToCacheKeys.has(url);\n }\n\n // If shouldRespond is still false, check to see if this is a navigation\n // request, and if so, whether the URL matches navigateFallbackWhitelist.\n var navigateFallback = '';\n if (!shouldRespond &&\n navigateFallback &&\n (event.request.mode === 'navigate') &&\n isPathWhitelisted([], event.request.url)) {\n url = new URL(navigateFallback, self.location).toString();\n shouldRespond = urlsToCacheKeys.has(url);\n }\n\n // If shouldRespond was set to true at any point, then call\n // event.respondWith(), using the appropriate cache key.\n if (shouldRespond) {\n event.respondWith(\n caches.open(cacheName).then(function(cache) {\n return cache.match(urlsToCacheKeys.get(url)).then(function(response) {\n if (response) {\n return response;\n }\n throw Error('The cached response that was expected is missing.');\n });\n }).catch(function(e) {\n // Fall back to just fetch()ing the request if some unexpected error\n // prevented the cached response from being valid.\n console.warn('Couldn\\'t serve response for \"%s\" from cache: %O', event.request.url, e);\n return fetch(event.request);\n })\n );\n }\n }\n});\n\n\n\n\n\n\n\n"]} \ No newline at end of file diff --git a/src/js/index.js b/src/js/index.js index 88af32b..32da6bb 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -1,7 +1,6 @@ (function (document, window) { // DEPENDENCIES // ============================================================ - const localforage = require('localforage'); const probs = require('pjs-problems'); const dedent = require('dedent'); const assert = require('chai').assert; @@ -49,28 +48,6 @@ currentIndex: 0 }; - // Pull config from localforage - localforage - .getItem('js_practice_config') - .then(val => { - if (val) { - config = val; - } - loadApp(config); - }) - .catch(err => { - console.log('localforage err:', err); - loadApp(config); - }); - - function updateLocalstore(config) { - return localforage - .setItem('js_practice_config', config) - .then(val => val) - .catch(err => { - console.log('Settings update error:', err); - }); - } // HELPERS // ============================================================ @@ -109,6 +86,37 @@ const previousProblemButtonEl = document.getElementById('prev-problem'); const nextProblemButtonEl = document.getElementById('next-problem'); + // LOCALSTORE + // -------------------------------------------------------------------------------- + + // Pull config from localstorage + if (window.localStorage) { + const localConfig = localStorage.getItem('js_practice_config'); + if (localConfig) { + try { + config = JSON.parse(localConfig); + loadApp(config); + } catch (err) { + console.log('LOCAL_CONFIG PARSE ERR:', err); + } + } else { + console.log('LOCAL_CONFIG: No local config'); + loadApp(config); + } + } + + function updateLocalstore(config) { + return new Promise((resolve, reject) => { + if (window.localStorage) { + localStorage.setItem('js_practice_config', JSON.stringify(config)); + console.log('Saved config: ', config); + resolve(); + } else { + reject(); + } + }); + } + // Get indexes function getRandomIndex(problemsArr) { const ind = Math.floor(Math.random() * problemsArr.length); diff --git a/src/service-worker.js b/src/service-worker.js index b3f5aec..6d29258 100644 --- a/src/service-worker.js +++ b/src/service-worker.js @@ -37,7 +37,7 @@ /* eslint-disable indent, no-unused-vars, no-multiple-empty-lines, max-nested-callbacks, space-before-function-paren, quotes, comma-spacing */ 'use strict'; -var precacheConfig = [["/dist/css/style.css","ba4d66c91d1ed66848154a34ab4948cf"],["/dist/img/back.svg","898ada2a32ec64bd5b6959c22e8f231d"],["/dist/img/monitor.svg","348592da5567b5a3c46acfb5dcd341bc"],["/dist/img/next.svg","045593410b9f51390e750b9e1e7fff15"],["/dist/img/reload.svg","a0ab1b765280e4d22e6fb747042f6503"],["/dist/img/shuffle.svg","3a5e3c1bf04eb3493d8a2ffa547aa58f"],["/dist/img/social-banner.png","7c1a8058bb3d00c2b40283c735748cfc"],["/dist/js/bundle.min.js","d6329d2b9a6a07313555b757df5081d3"],["/dist/js/loadJS.js","72c55936069f60560a386e46f462c73a"],["/dist/js/sw-registration.js","677217d8e642c1ccff69fc01c96b4431"],["/index.html","c7522a5d3255caca0f12c5282ef0644d"]]; +var precacheConfig = [["/dist/css/style.css","ba4d66c91d1ed66848154a34ab4948cf"],["/dist/img/back.svg","898ada2a32ec64bd5b6959c22e8f231d"],["/dist/img/monitor.svg","348592da5567b5a3c46acfb5dcd341bc"],["/dist/img/next.svg","045593410b9f51390e750b9e1e7fff15"],["/dist/img/reload.svg","a0ab1b765280e4d22e6fb747042f6503"],["/dist/img/shuffle.svg","3a5e3c1bf04eb3493d8a2ffa547aa58f"],["/dist/img/social-banner.png","7c1a8058bb3d00c2b40283c735748cfc"],["/dist/js/bundle.min.js","e534dee6ffdd27dae5b8137ef1f2acc5"],["/dist/js/loadJS.js","72c55936069f60560a386e46f462c73a"],["/dist/js/sw-registration.js","677217d8e642c1ccff69fc01c96b4431"],["/index.html","c7522a5d3255caca0f12c5282ef0644d"]]; var cacheName = 'sw-precache-v3--' + (self.registration ? self.registration.scope : ''); From b425ab53e6d32cffa5613af802e323baa1a04eb6 Mon Sep 17 00:00:00 2001 From: Jakob Anderson Date: Sat, 3 Jun 2017 11:00:12 -0600 Subject: [PATCH 3/4] removed prepack experiment --- gulpfile.js | 11 +++++------ package.json | 1 - shrinkwrap.yaml | 6 ------ 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 644d0fc..da06226 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -20,8 +20,6 @@ const livereload = require('gulp-livereload'); const htmlmin = require('gulp-htmlmin'); const swPrecache = require('sw-precache'); const image = require('gulp-image'); -const pump = require('pump'); - // CONFIG // ============================================================ @@ -36,7 +34,8 @@ const opts = { } }; -const uglifyConf = {}; +const prepackConfig = {}; +const uglifyConfig = {}; const htmlminConfig = { collapseWhitespace: true, @@ -76,7 +75,7 @@ function compile(watch) { .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(uglify()) + .pipe(uglify(uglifyConfig)) .pipe(sourcemaps.write('./')) .pipe(gulp.dest('./public/dist/js')); } @@ -126,7 +125,7 @@ gulp.task('js', () => { .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(uglify(uglifyConf)) + .pipe(uglify(uglifyConfig)) .pipe(sourcemaps.write('./')) .pipe(gulp.dest('./public/dist/js')); }); @@ -199,7 +198,7 @@ gulp.task('optimize-service-worker', ['generate-service-worker'], () => { .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(uglify(uglifyConf)) + .pipe(uglify(uglifyConfig)) .pipe(sourcemaps.write('./')) .pipe(gulp.dest('./public')); }); diff --git a/package.json b/package.json index f9541ec..5083a24 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,6 @@ "husky": "^0.13.3", "lint-staged": "^3.4.0", "localforage": "^1.5.0", - "pump": "^1.0.2", "rollup-stream": "^1.19.0", "sw-precache": "^5.1.1", "uglify-es": "^3.0.15", diff --git a/shrinkwrap.yaml b/shrinkwrap.yaml index a68bfbe..2b2d351 100644 --- a/shrinkwrap.yaml +++ b/shrinkwrap.yaml @@ -28,7 +28,6 @@ dependencies: lint-staged@^3.4.0: 3.6.0 localforage@^1.5.0: 1.5.0 pjs-problems@^1.0.3: 1.0.3 - pump@^1.0.2: 1.0.2 rollup-stream@^1.19.0: 1.19.0 sw-precache@^5.1.1: 5.1.1 uglify-es@^3.0.15: 3.0.15 @@ -3755,11 +3754,6 @@ packages: parse-asn1: 5.1.0 randombytes: 2.0.4 resolution: 39f699f3a46560dd5ebacbca693caf7c65c18cc6 - /pump/1.0.2: - dependencies: - end-of-stream: 1.4.0 - once: 1.4.0 - resolution: 3b3ee6512f94f0e575538c17995f9f16990a5d51 /punycode/1.3.2: 9653a036fb7c1ee42342f2325cceefea3926c48d /punycode/1.4.1: c0d5a63b2718800ad8e1eb0fa5269c84dd41845e /q/1.5.0: dd01bac9d06d30e6f219aecb8253ee9ebdc308f1 From dff56a3bde42d98e703fd62f8200248c9d41c7aa Mon Sep 17 00:00:00 2001 From: Jakob Anderson Date: Sat, 3 Jun 2017 11:13:17 -0600 Subject: [PATCH 4/4] using state obj for currentproblem now --- public/dist/js/bundle.min.js | 2 +- public/dist/js/bundle.min.js.map | 2 +- public/service-worker.js | 2 +- public/service-worker.js.map | 2 +- src/js/index.js | 10 +++++++--- src/service-worker.js | 2 +- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/public/dist/js/bundle.min.js b/public/dist/js/bundle.min.js index 55c9f44..d2d7b4d 100644 --- a/public/dist/js/bundle.min.js +++ b/public/dist/js/bundle.min.js @@ -1,2 +1,2 @@ -!function e(t,n,o){function r(i,a){if(!n[i]){if(!t[i]){var c="function"==typeof require&&require;if(!a&&c)return c(i,!0);if(s)return s(i,!0);var u=new Error("Cannot find module '"+i+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[i]={exports:{}};t[i][0].call(l.exports,function(e){var n=t[i][1][e];return r(n||e)},l,l.exports,e,t,n,o)}return n[i].exports}for(var s="function"==typeof require&&require,i=0;ie,"expected #{this} to have a length above #{exp} but got #{act}","expected #{this} to not have a length above #{exp}",e,o)}else this.assert(n>e,"expected #{this} to be above "+e,"expected #{this} to be at most "+e)}function u(e,t){t&&N(this,"message",t);var n=N(this,"object");if(N(this,"doLength")){new S(n,t).to.have.property("length");var o=n.length;this.assert(o>=e,"expected #{this} to have a length at least #{exp} but got #{act}","expected #{this} to have a length below #{exp}",e,o)}else this.assert(n>=e,"expected #{this} to be at least "+e,"expected #{this} to be below "+e)}function l(e,t){t&&N(this,"message",t);var n=N(this,"object");if(N(this,"doLength")){new S(n,t).to.have.property("length");var o=n.length;this.assert(o1)throw new Error(s);break;case"object":if(arguments.length>1)throw new Error(s);e=Object.keys(e);break;default:e=Array.prototype.slice.call(arguments)}if(!e.length)throw new Error("keys required");var i=Object.keys(o),a=e,c=e.length,u=N(this,"any"),l=N(this,"all");if(u||l||(l=!0),u&&(r=a.filter(function(e){return~i.indexOf(e)}).length>0),l&&(r=e.every(function(e){return~i.indexOf(e)}),N(this,"negate")||N(this,"contains")||(r=r&&e.length==i.length)),c>1){var p=(e=e.map(function(e){return t.inspect(e)})).pop();l&&(n=e.join(", ")+", and "+p),u&&(n=e.join(", ")+", or "+p)}else n=t.inspect(e[0]);n=(c>1?"keys ":"key ")+n,n=(N(this,"contains")?"contain ":"have ")+n,this.assert(r,"expected #{this} to "+n,"expected #{this} to not "+n,a.slice(0).sort(),i.sort(),!0)}function v(e,n,o){o&&N(this,"message",o);var r=N(this,"object");new S(r,o).is.a("function");var s=!1,i=null,a=null,c=null;0===arguments.length?(n=null,e=null):e&&(e instanceof RegExp||"string"==typeof e)?(n=e,e=null):e&&e instanceof Error?(i=e,e=null,n=null):"function"==typeof e?(!(a=e.prototype.name)||"Error"===a&&e!==Error)&&(a=e.name||(new e).name):e=null;try{r()}catch(o){if(i)return this.assert(o===i,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}",i instanceof Error?i.toString():i,o instanceof Error?o.toString():o),N(this,"object",o),this;if(e&&(this.assert(o instanceof e,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp} but #{act} was thrown",a,o instanceof Error?o.toString():o),!n))return N(this,"object",o),this;var u="error"===t.type(o)&&"message"in o?o.message:""+o;if(null!=u&&n&&n instanceof RegExp)return this.assert(n.exec(u),"expected #{this} to throw error matching #{exp} but got #{act}","expected #{this} to throw error not matching #{exp}",n,u),N(this,"object",o),this;if(null!=u&&n&&"string"==typeof n)return this.assert(~u.indexOf(n),"expected #{this} to throw error including #{exp} but got #{act}","expected #{this} to throw error not including #{act}",n,u),N(this,"object",o),this;s=!0,c=o}var l="",p=null!==a?a:i?"#{exp}":"an error";s&&(l=" but #{act} was thrown"),this.assert(!0===s,"expected #{this} to throw "+p+l,"expected #{this} to not throw "+p+l,i instanceof Error?i.toString():i,c instanceof Error?c.toString():c),N(this,"object",c)}function w(e,n){n&&N(this,"message",n);var o=N(this,"object"),r=N(this,"itself"),s="function"!==t.type(o)||r?o[e]:o.prototype[e];this.assert("function"==typeof s,"expected #{this} to respond to "+t.inspect(e),"expected #{this} to not respond to "+t.inspect(e))}function x(e,n){n&&N(this,"message",n);var o=e(N(this,"object"));this.assert(o,"expected #{this} to satisfy "+t.objDisplay(e),"expected #{this} to not satisfy"+t.objDisplay(e),!this.negate,o)}function j(e,n,o){o&&N(this,"message",o);var r=N(this,"object");if(new S(r,o).is.a("number"),"number"!==t.type(e)||"number"!==t.type(n))throw new Error("the arguments to closeTo or approximately must be numbers");this.assert(Math.abs(r-e)<=n,"expected #{this} to be close to "+e+" +/- "+n,"expected #{this} not to be close to "+e+" +/- "+n)}function E(e,t,n){return e.every(function(e){return n?t.some(function(t){return n(e,t)}):-1!==t.indexOf(e)})}function O(e,t){t&&N(this,"message",t);var n=N(this,"object");new S(e).to.be.an("array"),this.assert(e.indexOf(n)>-1,"expected #{this} to be one of #{exp}","expected #{this} to not be one of #{exp}",e,n)}function A(e,t,n){n&&N(this,"message",n);var o=N(this,"object");new S(e,n).to.have.property(t),new S(o).is.a("function");var r=e[t];o(),this.assert(r!==e[t],"expected ."+t+" to change","expected ."+t+" to not change")}function P(e,t,n){n&&N(this,"message",n);var o=N(this,"object");new S(e,n).to.have.property(t),new S(o).is.a("function");var r=e[t];o(),this.assert(e[t]-r>0,"expected ."+t+" to increase","expected ."+t+" to not increase")}function M(e,t,n){n&&N(this,"message",n);var o=N(this,"object");new S(e,n).to.have.property(t),new S(o).is.a("function");var r=e[t];o(),this.assert(e[t]-r<0,"expected ."+t+" to decrease","expected ."+t+" to not decrease")}var S=e.Assertion,N=(Object.prototype.toString,t.flag);["to","be","been","is","and","has","have","with","that","which","at","of","same"].forEach(function(e){S.addProperty(e,function(){return this})}),S.addProperty("not",function(){N(this,"negate",!0)}),S.addProperty("deep",function(){N(this,"deep",!0)}),S.addProperty("any",function(){N(this,"any",!0),N(this,"all",!1)}),S.addProperty("all",function(){N(this,"all",!0),N(this,"any",!1)}),S.addChainableMethod("an",n),S.addChainableMethod("a",n),S.addChainableMethod("include",r,o),S.addChainableMethod("contain",r,o),S.addChainableMethod("contains",r,o),S.addChainableMethod("includes",r,o),S.addProperty("ok",function(){this.assert(N(this,"object"),"expected #{this} to be truthy","expected #{this} to be falsy")}),S.addProperty("true",function(){this.assert(!0===N(this,"object"),"expected #{this} to be true","expected #{this} to be false",!this.negate)}),S.addProperty("false",function(){this.assert(!1===N(this,"object"),"expected #{this} to be false","expected #{this} to be true",!!this.negate)}),S.addProperty("null",function(){this.assert(null===N(this,"object"),"expected #{this} to be null","expected #{this} not to be null")}),S.addProperty("undefined",function(){this.assert(void 0===N(this,"object"),"expected #{this} to be undefined","expected #{this} not to be undefined")}),S.addProperty("NaN",function(){this.assert(isNaN(N(this,"object")),"expected #{this} to be NaN","expected #{this} not to be NaN")}),S.addProperty("exist",function(){this.assert(null!=N(this,"object"),"expected #{this} to exist","expected #{this} to not exist")}),S.addProperty("empty",function(){var e=N(this,"object"),t=e;Array.isArray(e)||"string"==typeof object?t=e.length:"object"==typeof e&&(t=Object.keys(e).length),this.assert(!t,"expected #{this} to be empty","expected #{this} not to be empty")}),S.addProperty("arguments",s),S.addProperty("Arguments",s),S.addMethod("equal",i),S.addMethod("equals",i),S.addMethod("eq",i),S.addMethod("eql",a),S.addMethod("eqls",a),S.addMethod("above",c),S.addMethod("gt",c),S.addMethod("greaterThan",c),S.addMethod("least",u),S.addMethod("gte",u),S.addMethod("below",l),S.addMethod("lt",l),S.addMethod("lessThan",l),S.addMethod("most",p),S.addMethod("lte",p),S.addMethod("within",function(e,t,n){n&&N(this,"message",n);var o=N(this,"object"),r=e+".."+t;if(N(this,"doLength")){new S(o,n).to.have.property("length");var s=o.length;this.assert(s>=e&&s<=t,"expected #{this} to have a length within "+r,"expected #{this} to not have a length within "+r)}else this.assert(o>=e&&o<=t,"expected #{this} to be within "+r,"expected #{this} to not be within "+r)}),S.addMethod("instanceof",h),S.addMethod("instanceOf",h),S.addMethod("property",function(e,n,o){o&&N(this,"message",o);var r=!!N(this,"deep"),s=r?"deep property ":"property ",i=N(this,"negate"),a=N(this,"object"),c=r?t.getPathInfo(e,a):null,u=r?c.exists:t.hasProperty(e,a),l=r?c.value:a[e];if(i&&arguments.length>1){if(void 0===l)throw o=null!=o?o+": ":"",new Error(o+t.inspect(a)+" has no "+s+t.inspect(e))}else this.assert(u,"expected #{this} to have a "+s+t.inspect(e),"expected #{this} to not have "+s+t.inspect(e));arguments.length>1&&this.assert(n===l,"expected #{this} to have a "+s+t.inspect(e)+" of #{exp}, but got #{act}","expected #{this} to not have a "+s+t.inspect(e)+" of #{act}",n,l),N(this,"object",l)}),S.addMethod("ownProperty",f),S.addMethod("haveOwnProperty",f),S.addMethod("ownPropertyDescriptor",d),S.addMethod("haveOwnPropertyDescriptor",d),S.addChainableMethod("length",b,g),S.addMethod("lengthOf",b),S.addMethod("match",m),S.addMethod("matches",m),S.addMethod("string",function(e,n){n&&N(this,"message",n);var o=N(this,"object");new S(o,n).is.a("string"),this.assert(~o.indexOf(e),"expected #{this} to contain "+t.inspect(e),"expected #{this} to not contain "+t.inspect(e))}),S.addMethod("keys",y),S.addMethod("key",y),S.addMethod("throw",v),S.addMethod("throws",v),S.addMethod("Throw",v),S.addMethod("respondTo",w),S.addMethod("respondsTo",w),S.addProperty("itself",function(){N(this,"itself",!0)}),S.addMethod("satisfy",x),S.addMethod("satisfies",x),S.addMethod("closeTo",j),S.addMethod("approximately",j),S.addMethod("members",function(e,n){n&&N(this,"message",n);var o=N(this,"object");new S(o).to.be.an("array"),new S(e).to.be.an("array");var r=N(this,"deep")?t.eql:void 0;if(N(this,"contains"))return this.assert(E(e,o,r),"expected #{this} to be a superset of #{act}","expected #{this} to not be a superset of #{act}",o,e);this.assert(E(o,e,r)&&E(e,o,r),"expected #{this} to have the same members as #{act}","expected #{this} to not have the same members as #{act}",o,e)}),S.addMethod("oneOf",O),S.addChainableMethod("change",A),S.addChainableMethod("changes",A),S.addChainableMethod("increase",P),S.addChainableMethod("increases",P),S.addChainableMethod("decrease",M),S.addChainableMethod("decreases",M),S.addProperty("extensible",function(){var e,t=N(this,"object");try{e=Object.isExtensible(t)}catch(t){if(!(t instanceof TypeError))throw t;e=!1}this.assert(e,"expected #{this} to be extensible","expected #{this} to not be extensible")}),S.addProperty("sealed",function(){var e,t=N(this,"object");try{e=Object.isSealed(t)}catch(t){if(!(t instanceof TypeError))throw t;e=!0}this.assert(e,"expected #{this} to be sealed","expected #{this} to not be sealed")}),S.addProperty("frozen",function(){var e,t=N(this,"object");try{e=Object.isFrozen(t)}catch(t){if(!(t instanceof TypeError))throw t;e=!0}this.assert(e,"expected #{this} to be frozen","expected #{this} to not be frozen")})}},{}],7:[function(e,t,n){t.exports=function(e,t){var n=e.Assertion,o=t.flag,r=e.assert=function(t,o){new n(null,null,e.assert).assert(t,o,"[ negation message unavailable ]")};r.fail=function(t,n,o,s){throw o=o||"assert.fail()",new e.AssertionError(o,{actual:t,expected:n,operator:s},r.fail)},r.isOk=function(e,t){new n(e,t).is.ok},r.isNotOk=function(e,t){new n(e,t).is.not.ok},r.equal=function(e,t,s){var i=new n(e,s,r.equal);i.assert(t==o(i,"object"),"expected #{this} to equal #{exp}","expected #{this} to not equal #{act}",t,e)},r.notEqual=function(e,t,s){var i=new n(e,s,r.notEqual);i.assert(t!=o(i,"object"),"expected #{this} to not equal #{exp}","expected #{this} to equal #{act}",t,e)},r.strictEqual=function(e,t,o){new n(e,o).to.equal(t)},r.notStrictEqual=function(e,t,o){new n(e,o).to.not.equal(t)},r.deepEqual=function(e,t,o){new n(e,o).to.eql(t)},r.notDeepEqual=function(e,t,o){new n(e,o).to.not.eql(t)},r.isAbove=function(e,t,o){new n(e,o).to.be.above(t)},r.isAtLeast=function(e,t,o){new n(e,o).to.be.least(t)},r.isBelow=function(e,t,o){new n(e,o).to.be.below(t)},r.isAtMost=function(e,t,o){new n(e,o).to.be.most(t)},r.isTrue=function(e,t){new n(e,t).is.true},r.isNotTrue=function(e,t){new n(e,t).to.not.equal(!0)},r.isFalse=function(e,t){new n(e,t).is.false},r.isNotFalse=function(e,t){new n(e,t).to.not.equal(!1)},r.isNull=function(e,t){new n(e,t).to.equal(null)},r.isNotNull=function(e,t){new n(e,t).to.not.equal(null)},r.isNaN=function(e,t){new n(e,t).to.be.NaN},r.isNotNaN=function(e,t){new n(e,t).not.to.be.NaN},r.isUndefined=function(e,t){new n(e,t).to.equal(void 0)},r.isDefined=function(e,t){new n(e,t).to.not.equal(void 0)},r.isFunction=function(e,t){new n(e,t).to.be.a("function")},r.isNotFunction=function(e,t){new n(e,t).to.not.be.a("function")},r.isObject=function(e,t){new n(e,t).to.be.a("object")},r.isNotObject=function(e,t){new n(e,t).to.not.be.a("object")},r.isArray=function(e,t){new n(e,t).to.be.an("array")},r.isNotArray=function(e,t){new n(e,t).to.not.be.an("array")},r.isString=function(e,t){new n(e,t).to.be.a("string")},r.isNotString=function(e,t){new n(e,t).to.not.be.a("string")},r.isNumber=function(e,t){new n(e,t).to.be.a("number")},r.isNotNumber=function(e,t){new n(e,t).to.not.be.a("number")},r.isBoolean=function(e,t){new n(e,t).to.be.a("boolean")},r.isNotBoolean=function(e,t){new n(e,t).to.not.be.a("boolean")},r.typeOf=function(e,t,o){new n(e,o).to.be.a(t)},r.notTypeOf=function(e,t,o){new n(e,o).to.not.be.a(t)},r.instanceOf=function(e,t,o){new n(e,o).to.be.instanceOf(t)},r.notInstanceOf=function(e,t,o){new n(e,o).to.not.be.instanceOf(t)},r.include=function(e,t,o){new n(e,o,r.include).include(t)},r.notInclude=function(e,t,o){new n(e,o,r.notInclude).not.include(t)},r.match=function(e,t,o){new n(e,o).to.match(t)},r.notMatch=function(e,t,o){new n(e,o).to.not.match(t)},r.property=function(e,t,o){new n(e,o).to.have.property(t)},r.notProperty=function(e,t,o){new n(e,o).to.not.have.property(t)},r.deepProperty=function(e,t,o){new n(e,o).to.have.deep.property(t)},r.notDeepProperty=function(e,t,o){new n(e,o).to.not.have.deep.property(t)},r.propertyVal=function(e,t,o,r){new n(e,r).to.have.property(t,o)},r.propertyNotVal=function(e,t,o,r){new n(e,r).to.not.have.property(t,o)},r.deepPropertyVal=function(e,t,o,r){new n(e,r).to.have.deep.property(t,o)},r.deepPropertyNotVal=function(e,t,o,r){new n(e,r).to.not.have.deep.property(t,o)},r.lengthOf=function(e,t,o){new n(e,o).to.have.length(t)},r.throws=function(e,t,r,s){("string"==typeof t||t instanceof RegExp)&&(r=t,t=null);var i=new n(e,s).to.throw(t,r);return o(i,"object")},r.doesNotThrow=function(e,t,o){"string"==typeof t&&(o=t,t=null),new n(e,o).to.not.Throw(t)},r.operator=function(e,r,s,i){var a;switch(r){case"==":a=e==s;break;case"===":a=e===s;break;case">":a=e>s;break;case">=":a=e>=s;break;case"<":a=e1&&n===t.length-1?"or ":"")+o+" "+e}).join(", ");if(!t.some(function(t){return s(e)===t}))throw new o("object tested must be "+n+", but "+s(e)+" given")}},{"./flag":14,"assertion-error":1,"type-detect":39}],14:[function(e,t,n){t.exports=function(e,t,n){var o=e.__flags||(e.__flags=Object.create(null));if(3!==arguments.length)return o[t];o[t]=n}},{}],15:[function(e,t,n){t.exports=function(e,t){return t.length>4?t[4]:e._obj}},{}],16:[function(e,t,n){t.exports=function(e){var t=[];for(var n in e)t.push(n);return t}},{}],17:[function(e,t,n){var o=e("./flag"),r=e("./getActual"),s=(e("./inspect"),e("./objDisplay"));t.exports=function(e,t){var n=o(e,"negate"),i=o(e,"object"),a=t[3],c=r(e,t),u=n?t[2]:t[1],l=o(e,"message");return"function"==typeof u&&(u=u()),u=u||"",u=u.replace(/#\{this\}/g,function(){return s(i)}).replace(/#\{act\}/g,function(){return s(c)}).replace(/#\{exp\}/g,function(){return s(a)}),l?l+": "+u:u}},{"./flag":14,"./getActual":15,"./inspect":24,"./objDisplay":25}],18:[function(e,t,n){t.exports=function(e){if(e.name)return e.name;var t=/^\s?function ([^(]*)\(/.exec(e);return t&&t[1]?t[1]:""}},{}],19:[function(e,t,n){function o(e){return e.replace(/([^\\])\[/g,"$1.[").match(/(\\\.|[^.]+?)+/g).map(function(e){var t=/^\[(\d+)\]$/.exec(e);return t?{i:parseFloat(t[1])}:{p:e.replace(/\\([.\[\]])/g,"$1")}})}function r(e,t,n){for(var o,r=t,s=0,i=n=void 0===n?e.length:n;s1?r(n,t,n.length-1):t,name:i.p||i.i,value:r(n,t)};return a.exists=s(a.name,a.parent),a}},{"./hasProperty":22}],20:[function(e,t,n){var o=e("./getPathInfo");t.exports=function(e,t){return o(e,t).value}},{"./getPathInfo":19}],21:[function(e,t,n){t.exports=function(e){function t(e){-1===n.indexOf(e)&&n.push(e)}for(var n=Object.getOwnPropertyNames(e),o=Object.getPrototypeOf(e);null!==o;)Object.getOwnPropertyNames(o).forEach(t),o=Object.getPrototypeOf(o);return n}},{}],22:[function(e,t,n){var o=e("type-detect"),r={number:Number,string:String};t.exports=function(e,t){var n=o(t);return"null"!==n&&"undefined"!==n&&(r[n]&&"object"!=typeof t&&(t=new r[n](t)),e in t)}},{"type-detect":39}],23:[function(e,t,n){(n=t.exports={}).test=e("./test"),n.type=e("type-detect"),n.expectTypes=e("./expectTypes"),n.getMessage=e("./getMessage"),n.getActual=e("./getActual"),n.inspect=e("./inspect"),n.objDisplay=e("./objDisplay"),n.flag=e("./flag"),n.transferFlags=e("./transferFlags"),n.eql=e("deep-eql"),n.getPathValue=e("./getPathValue"),n.getPathInfo=e("./getPathInfo"),n.hasProperty=e("./hasProperty"),n.getName=e("./getName"),n.addProperty=e("./addProperty"),n.addMethod=e("./addMethod"),n.overwriteProperty=e("./overwriteProperty"),n.overwriteMethod=e("./overwriteMethod"),n.addChainableMethod=e("./addChainableMethod"),n.overwriteChainableMethod=e("./overwriteChainableMethod")},{"./addChainableMethod":10,"./addMethod":11,"./addProperty":12,"./expectTypes":13,"./flag":14,"./getActual":15,"./getMessage":17,"./getName":18,"./getPathInfo":19,"./getPathValue":20,"./hasProperty":22,"./inspect":24,"./objDisplay":25,"./overwriteChainableMethod":26,"./overwriteMethod":27,"./overwriteProperty":28,"./test":29,"./transferFlags":30,"deep-eql":32,"type-detect":39}],24:[function(e,t,n){function o(e,t,n,o){return r({showHidden:t,seen:[],stylize:function(e){return e}},e,void 0===n?2:n)}function r(e,t,o){if(t&&"function"==typeof t.inspect&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var d=t.inspect(o);return"string"!=typeof d&&(d=r(e,d,o)),d}var v=s(e,t);if(v)return v;if(y(t)){if("outerHTML"in t)return t.outerHTML;try{if(document.xmlVersion)return(new XMLSerializer).serializeToString(t);var w=document.createElementNS("http://www.w3.org/1999/xhtml","_");return w.appendChild(t.cloneNode(!1)),html=w.innerHTML.replace("><",">"+t.innerHTML+"<"),w.innerHTML="",html}catch(e){}}var x=m(t),j=e.showHidden?b(t):x;if(0===j.length||f(t)&&(1===j.length&&"stack"===j[0]||2===j.length&&"description"===j[0]&&"stack"===j[1])){if("function"==typeof t){var E=(M=g(t))?": "+M:"";return e.stylize("[Function"+E+"]","special")}if(p(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(h(t))return e.stylize(Date.prototype.toUTCString.call(t),"date");if(f(t))return i(t)}var O="",A=!1,P=["{","}"];if(l(t)&&(A=!0,P=["[","]"]),"function"==typeof t){var M=g(t);O=" [Function"+(E=M?": "+M:"")+"]"}if(p(t)&&(O=" "+RegExp.prototype.toString.call(t)),h(t)&&(O=" "+Date.prototype.toUTCString.call(t)),f(t))return i(t);if(0===j.length&&(!A||0==t.length))return P[0]+O+P[1];if(o<0)return p(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var S;return S=A?a(e,t,o,x,j):j.map(function(n){return c(e,t,o,x,n,A)}),e.seen.pop(),u(S,O,P)}function s(e,t){switch(typeof t){case"undefined":return e.stylize("undefined","undefined");case"string":var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string");case"number":return 0===t&&1/t==-1/0?e.stylize("-0","number"):e.stylize(""+t,"number");case"boolean":return e.stylize(""+t,"boolean")}if(null===t)return e.stylize("null","null")}function i(e){return"["+Error.prototype.toString.call(e)+"]"}function a(e,t,n,o,r){for(var s=[],i=0,a=t.length;i-1&&(c=i?c.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+c.split("\n").map(function(e){return" "+e}).join("\n")):c=e.stylize("[Circular]","special")),void 0===a){if(i&&s.match(/^\d+$/))return c;(a=JSON.stringify(""+s)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+c}function u(e,t,n){var o=0;return e.reduce(function(e,t){return o++,t.indexOf("\n")>=0&&o++,e+t.length+1},0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function l(e){return Array.isArray(e)||"object"==typeof e&&"[object Array]"===d(e)}function p(e){return"object"==typeof e&&"[object RegExp]"===d(e)}function h(e){return"object"==typeof e&&"[object Date]"===d(e)}function f(e){return"object"==typeof e&&"[object Error]"===d(e)}function d(e){return Object.prototype.toString.call(e)}var g=e("./getName"),b=e("./getProperties"),m=e("./getEnumerableProperties");t.exports=o;var y=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName}},{"./getEnumerableProperties":16,"./getName":18,"./getProperties":21}],25:[function(e,t,n){var o=e("./inspect"),r=e("../config");t.exports=function(e){var t=o(e),n=Object.prototype.toString.call(e);if(r.truncateThreshold&&t.length>=r.truncateThreshold){if("[object Function]"===n)return e.name&&""!==e.name?"[Function: "+e.name+"]":"[Function]";if("[object Array]"===n)return"[ Array("+e.length+") ]";if("[object Object]"===n){var s=Object.keys(e);return"{ Object ("+(s.length>2?s.splice(0,2).join(", ")+", ...":s.join(", "))+") }"}return t}return t}},{"../config":5,"./inspect":24}],26:[function(e,t,n){t.exports=function(e,t,n,o){var r=e.__methods[t],s=r.chainingBehavior;r.chainingBehavior=function(){var e=o(s).call(this);return void 0===e?this:e};var i=r.method;r.method=function(){var e=n(i).apply(this,arguments);return void 0===e?this:e}}},{}],27:[function(e,t,n){t.exports=function(e,t,n){var o=e[t],r=function(){return this};o&&"function"==typeof o&&(r=o),e[t]=function(){var e=n(r).apply(this,arguments);return void 0===e?this:e}}},{}],28:[function(e,t,n){t.exports=function(e,t,n){var o=Object.getOwnPropertyDescriptor(e,t),r=function(){};o&&"function"==typeof o.get&&(r=o.get),Object.defineProperty(e,t,{get:function(){var e=n(r).call(this);return void 0===e?this:e},configurable:!0})}},{}],29:[function(e,t,n){var o=e("./flag");t.exports=function(e,t){var n=o(e,"negate"),r=t[0];return n?!r:r}},{"./flag":14}],30:[function(e,t,n){t.exports=function(e,t,n){var o=e.__flags||(e.__flags=Object.create(null));t.__flags||(t.__flags=Object.create(null)),n=3!==arguments.length||n;for(var r in o)(n||"object"!==r&&"ssfi"!==r&&"message"!=r)&&(t.__flags[r]=o[r])}},{}],31:[function(e,t,n){"use strict";function o(e){var t=void 0;t="string"==typeof e?[e]:e.raw;for(var n="",o=0;o=0;r--)if(a=s[r],!o(e[a],t[a],n))return!1;return!0}var d,g=e("type-detect");try{d=e("buffer").Buffer}catch(e){(d={}).isBuffer=function(){return!1}}t.exports=o},{buffer:void 0,"type-detect":37}],34:[function(e,t,n){const o=e("./problems/initial"),r=e("./problems/arrays");t.exports={initial:o,arrays:r}},{"./problems/arrays":35,"./problems/initial":36}],35:[function(e,t,n){t.exports=[{name:"Access Array by index (first)",time:10,prompt:"Return the first value of the Array",given:`const fruits = ['apple', 'banana'];\r`,answer:`const fruits = ['apple', 'banana'];\n return fruits[0];`,tests:[{name:"Correct output",test:"assert.deepEqual(output, 'apple') === undefined"},{name:"Returns a String",test:"assert.isString(output) === undefined"}]},{name:"Access Array by index (last)",time:10,prompt:"Return the last value of the Array",given:`const fruits = ['apple', 'banana', 'orange'];\r`,answer:`const fruits = ['apple', 'banana', 'orange'];\n return fruits[fruits.length - 1];`,tests:[{name:"Correct output",test:`assert.deepEqual(output, 'orange') === undefined;`},{name:"Returns a String",test:`assert.isString(output) === undefined;`}]},{name:"Access Array by index (second)",time:10,prompt:"Return the second value of the Array",given:`const fruits = ['apple', 'banana'];\r`,answer:`const fruits = ['apple', 'banana'];\n return fruits[1];`,tests:[{name:"Correct output",test:`assert.deepEqual(output, 'banana') === undefined;`},{name:"Returns a String",test:`assert.isString(output) === undefined;`}]},{name:"Array.forEach()",time:20,prompt:"Loop over the array, add an 'x' to the end of each name, push each fruit into a new array, then return the new array.",given:`const fruits = ['apple', 'banana'];\r`,answer:`const fruits = ['apple', 'banana'];\n const newFruits = [];\n fruits.forEach(function(item) {\n newFruits.push(item+'x');\n });\n return newFruits;`,tests:[{name:"Correct output",test:`assert.deepEqual(output, ['applex', 'bananax']) === undefined;`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 2 items",test:`assert.lengthOf(output, 2) === undefined;`}]},{name:"Array.push()",time:10,prompt:`Add 'orange' to the end of the 'fruits' array and return 'fruits'.`,given:`const fruits = ['apple', 'banana'];\r`,answer:`const fruits = ['apple', 'banana'];\n fruits.push('orange');\n return fruits;`,tests:[{name:"Correct output",test:`(assert.deepEqual(output, ['apple', 'banana', 'orange']) === undefined);`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 3 items",test:`assert.lengthOf(output, 3) === undefined;`}]},{name:"Array.shift()",time:10,prompt:`Remove 'apple' from the front of the 'fruits' array and return 'fruits'.`,given:`const fruits = ['apple', 'banana', 'orange'];\r`,answer:`const fruits = ['apple', 'banana', 'orange'];\n fruits.shift();\n return fruits;`,tests:[{name:"Output must be correct",test:`assert.deepEqual(output, ['banana', 'orange']) === undefined;`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 2 items",test:`assert.lengthOf(output, 2) === undefined;`}]},{name:"Array.unshift()",time:10,prompt:`Add 'strawberry' to the front of the 'fruits' array and return 'fruits'.`,given:`const fruits = ['apple', 'banana', 'orange'];\r`,answer:`const fruits = ['apple', 'banana', 'orange'];\n fruits.unshift('strawberry');\n return fruits;`,tests:[{name:"Output must be correct",test:`(assert.deepEqual(output, [\n 'strawberry',\n 'apple',\n 'banana',\n 'orange'\n ]) === undefined)`},{name:"Must return an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 4 items",test:`assert.lengthOf(output, 4) === undefined;`}]},{name:"Array.indexOf()",time:10,prompt:`Return the index of 'banana' in the Array.`,given:`const fruits = ['strawberry', 'banana', 'mango'];\r`,answer:`const fruits = ['strawberry', 'banana', 'mango'];\n const ind = fruits.indexOf('banana');\n return ind;`,tests:[{name:"Correct output",test:`assert.deepEqual(output, 1) === undefined;`},{name:"Returns a Number",test:`assert.isNumber(output) === undefined;`}]},{name:"Array.concat()",time:10,prompt:`Merge the two arrays using Array's 'concat()' method. Return the resulting array.`,given:`const fruits = ['strawberry', 'banana'];\rconst otherFruits = ['pear','peach'];\r`,answer:`const fruits = ['strawberry', 'banana'];\n const otherFruits = ['pear','peach'];\n const allTheFruits = fruits.concat(otherFruits);\n return allTheFruits;\r`,tests:[{name:"Correct output",test:`(assert.deepEqual(output, [\n 'strawberry',\n 'banana',\n 'pear',\n 'peach'\n ]) === undefined\n );`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 4 items",test:`assert.lengthOf(output, 4) === undefined;`}]},{name:"Array.join()",time:10,prompt:`Mix the two flavors with a '-' using Array's 'join' method. Return the resulting hybrid flavor.`,given:`const fruits = ['strawberry', 'banana'];\r`,answer:`const fruits = ['strawberry', 'banana'];\n const hybrid = fruits.join('-');\n return hybrid;\r`,tests:[{name:"Correct output",test:`assert.deepEqual(output, 'strawberry-banana') === undefined;`},{name:"Returns a String",test:`assert.isString(output) === undefined;`}]},{name:"Array.slice()",time:20,prompt:`Return just the citrus fruits from the 'fruits' array using 'Array.slice()'`,given:`const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\r`,answer:`const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\n const citrus = fruits.slice(1, 3);\n return citrus;`,tests:[{name:"Correct output",test:`assert.deepEqual(output, ['orange', 'lemon']) === undefined;`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 2 items",test:`assert.lengthOf(output, 2) === undefined;`}]},{name:"Array.reverse()",time:10,prompt:`Reverse the order of the 'fruit' array using 'Array.reverse()'`,given:`const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\r`,answer:`const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\n const stiurf = fruits.reverse();\n return stiurf;`,tests:[{name:"Correct output",test:`(assert.deepEqual(output, [\n 'banana',\n 'lemon',\n 'orange',\n 'strawberry'\n ]) === undefined);`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 4 items",test:`assert.lengthOf(output, 4) === undefined;`},{name:`First item is 'banana'`,test:`assert.deepEqual(output[0], 'banana') === undefined;`}]},{name:"Array.sort()",time:10,prompt:`Return the 'fruits' Array after sorting them using 'Array.sort()'.`,given:`const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\r`,answer:`const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\n const orderlyFruit = fruits.sort();\n return orderlyFruit;`,tests:[{name:"Correct output",test:`(assert.deepEqual(output, [\n 'banana',\n 'lemon',\n 'orange',\n 'strawberry'\n ]) === undefined);`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 4 items",test:`assert.lengthOf(output, 4) === undefined;`},{name:`First item is 'banana'`,test:`assert.deepEqual(output[0], 'banana') === undefined;`}]},{name:"Array.lastIndexOf()",time:10,prompt:`Return the index of the last 'peach' instance in the 'fruit' array using 'Array.lastIndexOf()'`,given:`const fruits = ['peach', 'orange', 'lemon', 'peach'];\r`,answer:`const fruits = ['peach', 'orange', 'lemon', 'peach'];\n const wheresTheLastPeach = fruits.lastIndexOf('peach');\n return wheresTheLastPeach;`,tests:[{name:"Correct output",test:`assert.deepEqual(output, 3) === undefined;`},{name:"Returns a Number",test:`assert.isNumber(output) === undefined;`}]},{name:"Array.filter()",time:10,prompt:`Return an array of the numbers greater than 5 in 'numbers' using 'Array.filter()'`,given:`const numbers = [1, 1, 2, 3, 5, 8, 13, 21];\r`,answer:`const numbers = [1, 1, 2, 3, 5, 8, 13, 21];\n const overFive = numbers.filter(num => num > 5);\n return overFive;`,tests:[{name:"Correct output",test:`assert.deepEqual(output, [8, 13, 21]) === undefined;`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 3 items",test:`assert.lengthOf(output, 3) === undefined;`},{name:`First item is 8`,test:`assert.deepEqual(output[0], 8) === undefined;`}]},{name:"Array.map()",time:10,prompt:`Return an array of 'numbers' array's square roots, using 'Array.map()' and 'Math.sqrt()'`,given:`const numbers = [25, 121, 169];\r`,answer:`const numbers = [25, 121, 169];\n const roots = numbers.map(num => Math.sqrt(num));\n return roots;`,tests:[{name:"Correct output",test:`assert.deepEqual(output, [5, 11, 13]) === undefined;`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 3 items",test:`assert.lengthOf(output, 3) === undefined;`},{name:`First item is 5`,test:`assert.deepEqual(output[0], 5) === undefined;`},{name:`Last item is 13`,test:`assert.deepEqual(output[output.length - 1], 13) === undefined;`}]},{name:"Array.every()",time:10,prompt:`Return object that returns whether each array contains all even numbers using Array.every().`,given:`const evenNumbers = [2, 4, 6, 8];\n const someOddNumbers = [2, 5, 6, 8];\n function isEven(element) {\n \n }\n return {\n evenNumbers: evenNumbers.,\n someOddNumbers: someOddNumbers.\n };`,answer:`const evenNumbers = [2, 4, 6, 8];\n const someOddNumbers = [2, 5, 6, 8];\n function isEven(element) {\n return element % 2 === 0\n }\n return {\n evenNumbers: evenNumbers.every(isEven),\n someOddNumbers: someOddNumbers.every(isEven)\n };`,tests:[{name:"Correct output",test:`assert.deepEqual(output, {\n evenNumbers: true,\n someOddNumbers: false\n }) === undefined;`},{name:"Returns an Object",test:`assert.isObject(output) === undefined;`},{name:"Object has 2 items",test:`assert.lengthOf(Object.keys(output), 2) === undefined;`},{name:`First value is true`,test:`assert.isTrue(output.evenNumbers) === undefined;`},{name:`Second value is false`,test:`assert.isFalse(output.someOddNumbers) === undefined;`}]},{name:"Array.some()",time:10,prompt:`Return 'Object' that returns whether each array contains some odd numbers using 'Array.some()'.`,given:`const evenNumbers = [2, 4, 6, 8];\n const someOddNumbers = [2, 4, 7, 8];\n function isOdd(element) {\n \n }\n return {\n evenNumbers: evenNumbers.,\n someOddNumbers: someOddNumbers.\n };`,answer:`const evenNumbers = [1, 3, 5, 7];\n const someOddNumbers = [1, 3, 6, 7];\n function isOdd(element) {\n return element % 2 !== 0;\n }\n return {\n evenNumbers: evenNumbers.some(isOdd),\n someOddNumbers: someOddNumbers.some(isOdd)\n };`,tests:[{name:"Correct output",test:`assert.deepEqual(output, {\n evenNumbers: false,\n someOddNumbers: true\n }) === undefined;`},{name:"Returns an Object",test:`assert.isObject(output) === undefined;`},{name:"Object has 2 items",test:`assert.lengthOf(Object.keys(output), 2) === undefined;`},{name:`First value is false`,test:`assert.isFalse(output.evenNumbers) === undefined;`},{name:`Second value is true`,test:`assert.isTrue(output.someOddNumbers) === undefined;`}]}]},{}],36:[function(e,t,n){t.exports=[{name:"Create Array",time:10,prompt:"Create and return an array that contains 'apple' and 'banana'",given:`const fruits = [];\rreturn fruits;`,answer:`const fruits = ['apple', 'banana'];\n return fruits;`,tests:[{name:"Correct output",test:`assert.deepEqual(output, ['apple', 'banana']) === undefined;`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 2 items",test:`assert.lengthOf(output, 2) === undefined;`}]},{name:"Array.pop()",time:10,prompt:`Remove 'orange' from the end of the 'fruits' array and return 'fruits'.`,given:`const fruits = ['apple', 'banana', 'orange'];\r`,answer:`const fruits = ['apple', 'banana', 'orange'];\n fruits.pop();\n return fruits;`,tests:[{name:"Correct output",test:`assert.deepEqual(output, ['apple', 'banana']) === undefined;`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 2 items",test:`assert.lengthOf(output, 2) === undefined;`}]}]},{}],37:[function(e,t,n){t.exports=e("./lib/type")},{"./lib/type":38}],38:[function(e,t,n){function o(e){var t=Object.prototype.toString.call(e);return s[t]?s[t]:null===e?"null":void 0===e?"undefined":e===Object(e)?"object":typeof e}function r(){this.tests={}}var s={"[object Array]":"array","[object RegExp]":"regexp","[object Function]":"function","[object Arguments]":"arguments","[object Date]":"date"};(t.exports=o).Library=r,r.prototype.of=o,r.prototype.define=function(e,t){return 1===arguments.length?this.tests[e]:(this.tests[e]=t,this)},r.prototype.test=function(e,t){if(t===o(e))return!0;var n=this.tests[t];if(n&&"regexp"===o(n))return n.test(e);if(n&&"function"===o(n))return n(e);throw new ReferenceError('Type test "'+t+'" not defined or invalid.')}},{}],39:[function(e,t,n){arguments[4][37][0].apply(n,arguments)},{"./lib/type":40,dup:37}],40:[function(e,t,n){function o(e){var t=Object.prototype.toString.call(e).match(s)[1].toLowerCase();return"function"==typeof Promise&&e instanceof Promise?"promise":null===e?"null":void 0===e?"undefined":t}function r(){if(!(this instanceof r))return new r;this.tests={}}var s=/^\[object (.*)\]$/;(t.exports=o).Library=r,r.prototype.of=o,r.prototype.define=function(e,t){return 1===arguments.length?this.tests[e]:(this.tests[e]=t,this)},r.prototype.test=function(e,t){if(t===o(e))return!0;var n=this.tests[t];if(n&&"regexp"===o(n))return n.test(e);if(n&&"function"===o(n))return n(e);throw new ReferenceError('Type test "'+t+'" not defined or invalid.')}},{}],41:[function(require,module,exports){"use strict";function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t=e.length-1||t<0?0:t+1}function getCurrentProblem(e){return e[config.currentIndex]}function previousProblem(){console.log("previousProblem!"),previousProblemButtonEl.classList.add("active"),config.currentIndex=config.shuffle?getRandomIndex(problems):getPreviousIndex(problems),updateLocalstore(config).then(function(){window.location.reload()})}function nextProblem(){console.log("nextProblem!"),nextProblemButtonEl.classList.add("active"),config.currentIndex=config.shuffle?getRandomIndex(problems):getNextIndex(problems),updateLocalstore(config).then(function(){window.location.reload()})}function toggleShuffle(){console.log("toggle shuffle!"),config.shuffle=!config.shuffle,shuffleProblemsButtonEl.classList.toggle("active"),previousProblemButtonEl.parentNode.classList.toggle("hidden"),updateLocalstore(config)}function loadProblem(e){currentProblem=e,problemEl.innerText=e.prompt,e.given&&(codeEl.value=e.given),testSuite(null,!0)}function updateTests(e,t){!0===t&&buildTests(currentProblem.tests),updateTestStatus(e)}function buildTests(e){if(e){var t=e.map(function(e){return'
\n
[✘]
\n
'+e.name+"
\n
"}).join("");testSuiteEl.innerHTML=t}}function updateTestStatus(e){if(!e)throw new Error("No testStatuses provided.");var t=!0;e.forEach(function(e){!0!==e&&(t=!1)}),[].slice.call(testSuiteEl.querySelectorAll(".test-state")).forEach(function(t,n){!0===e[n]?(t.innerHTML="[✓]",t.classList.remove("fail"),t.classList.add("pass")):(t.innerHTML="[✘]",t.classList.remove("pass"),t.classList.add("fail"))}),!0===t?(testTotalEl.innerText="PASS",testTotalEl.classList.remove("fail"),testTotalEl.classList.add("pass")):(testTotalEl.innerText="FAIL",testTotalEl.classList.remove("pass"),testTotalEl.classList.add("fail"))}function printAssertError(e){var t="";null!==e&&(t='\n
\n Expected: '+JSON.stringify(e.expected)+"\n Actual: "+JSON.stringify(e.actual)+"\n
"),assertConsoleEl.innerHTML=t}function printEvalOutput(e,t){var n="";e&&void 0!==e.message?n='\n
\n Syntax Error: '+JSON.stringify(e.message)+"\n
":t&&(n='\n
\n Output: '+JSON.stringify(t)+"\n
"),evalConsoleEl.innerHTML=n}function testSuite(e){testTotalEl.classList.toggle("working");var t=runTests(getOutput(codeEl.value));testTotalEl.classList.toggle("working"),updateTests(t,e)}function getOutput(code){var evald=!1;try{evald=eval("(function(){"+code+"})()"),printEvalOutput(null,evald)}catch(e){printEvalOutput(e)}return evald}function runTests(output){var tested=!1;return tested=currentProblem.tests.map(function(test){var testOutcome=!1;try{output&&(testOutcome=eval(test.test)),printAssertError(null)}catch(e){printAssertError(e)}return testOutcome})}function loadApp(e){function t(t){!1===e.shuffle&&13===t.keyCode&&t.shiftKey&&(t.metaKey||t.ctrlKey)?previousProblem():13!==t.keyCode||t.shiftKey||!t.metaKey&&!t.ctrlKey||nextProblem()}console.log("loading app!"),!0===e.shuffle&&(shuffleProblemsButtonEl.classList.add("active"),previousProblemButtonEl.parentNode.classList.add("hidden"));var n=debounce(function(e){-1===ignoreKeyCodes.indexOf(e.keyCode)&&testSuite()},200);codeEl.addEventListener("keydown",n),document.addEventListener("keydown",t),shuffleProblemsButtonEl.addEventListener("click",toggleShuffle),previousProblemButtonEl.addEventListener("click",previousProblem),nextProblemButtonEl.addEventListener("click",nextProblem),loadProblem(getCurrentProblem(problems)),testSuite(!0)}var probs=require("pjs-problems"),dedent=require("dedent"),assert=require("chai").assert,problems=[];Object.keys(probs).forEach(function(e){var t;(t=problems).push.apply(t,_toConsumableArray(probs[e]))}),problems=dedentStrings(problems);var currentProblem=void 0,ignoreKeyCodes=[9,37,39,38,40],config={shuffle:!0,timer:!1,currentIndex:0},problemEl=document.getElementById("problem"),codeEl=document.getElementById("code"),testSuiteEl=document.getElementById("test-suite"),testTotalEl=document.getElementById("test-total"),evalConsoleEl=document.getElementById("eval-output"),assertConsoleEl=document.getElementById("assert-output"),shuffleProblemsButtonEl=document.getElementById("shuffle-problems"),previousProblemButtonEl=document.getElementById("prev-problem"),nextProblemButtonEl=document.getElementById("next-problem");if(window.localStorage){var localConfig=localStorage.getItem("js_practice_config");if(localConfig)try{config=JSON.parse(localConfig),loadApp(config)}catch(e){console.log("LOCAL_CONFIG PARSE ERR:",e)}else console.log("LOCAL_CONFIG: No local config"),loadApp(config)}}(document,window)},{chai:2,dedent:31,"pjs-problems":34}]},{},[41]); +!function e(t,n,o){function r(i,a){if(!n[i]){if(!t[i]){var c="function"==typeof require&&require;if(!a&&c)return c(i,!0);if(s)return s(i,!0);var u=new Error("Cannot find module '"+i+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[i]={exports:{}};t[i][0].call(l.exports,function(e){var n=t[i][1][e];return r(n||e)},l,l.exports,e,t,n,o)}return n[i].exports}for(var s="function"==typeof require&&require,i=0;ie,"expected #{this} to have a length above #{exp} but got #{act}","expected #{this} to not have a length above #{exp}",e,o)}else this.assert(n>e,"expected #{this} to be above "+e,"expected #{this} to be at most "+e)}function u(e,t){t&&N(this,"message",t);var n=N(this,"object");if(N(this,"doLength")){new S(n,t).to.have.property("length");var o=n.length;this.assert(o>=e,"expected #{this} to have a length at least #{exp} but got #{act}","expected #{this} to have a length below #{exp}",e,o)}else this.assert(n>=e,"expected #{this} to be at least "+e,"expected #{this} to be below "+e)}function l(e,t){t&&N(this,"message",t);var n=N(this,"object");if(N(this,"doLength")){new S(n,t).to.have.property("length");var o=n.length;this.assert(o1)throw new Error(s);break;case"object":if(arguments.length>1)throw new Error(s);e=Object.keys(e);break;default:e=Array.prototype.slice.call(arguments)}if(!e.length)throw new Error("keys required");var i=Object.keys(o),a=e,c=e.length,u=N(this,"any"),l=N(this,"all");if(u||l||(l=!0),u&&(r=a.filter(function(e){return~i.indexOf(e)}).length>0),l&&(r=e.every(function(e){return~i.indexOf(e)}),N(this,"negate")||N(this,"contains")||(r=r&&e.length==i.length)),c>1){var p=(e=e.map(function(e){return t.inspect(e)})).pop();l&&(n=e.join(", ")+", and "+p),u&&(n=e.join(", ")+", or "+p)}else n=t.inspect(e[0]);n=(c>1?"keys ":"key ")+n,n=(N(this,"contains")?"contain ":"have ")+n,this.assert(r,"expected #{this} to "+n,"expected #{this} to not "+n,a.slice(0).sort(),i.sort(),!0)}function v(e,n,o){o&&N(this,"message",o);var r=N(this,"object");new S(r,o).is.a("function");var s=!1,i=null,a=null,c=null;0===arguments.length?(n=null,e=null):e&&(e instanceof RegExp||"string"==typeof e)?(n=e,e=null):e&&e instanceof Error?(i=e,e=null,n=null):"function"==typeof e?(!(a=e.prototype.name)||"Error"===a&&e!==Error)&&(a=e.name||(new e).name):e=null;try{r()}catch(o){if(i)return this.assert(o===i,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}",i instanceof Error?i.toString():i,o instanceof Error?o.toString():o),N(this,"object",o),this;if(e&&(this.assert(o instanceof e,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp} but #{act} was thrown",a,o instanceof Error?o.toString():o),!n))return N(this,"object",o),this;var u="error"===t.type(o)&&"message"in o?o.message:""+o;if(null!=u&&n&&n instanceof RegExp)return this.assert(n.exec(u),"expected #{this} to throw error matching #{exp} but got #{act}","expected #{this} to throw error not matching #{exp}",n,u),N(this,"object",o),this;if(null!=u&&n&&"string"==typeof n)return this.assert(~u.indexOf(n),"expected #{this} to throw error including #{exp} but got #{act}","expected #{this} to throw error not including #{act}",n,u),N(this,"object",o),this;s=!0,c=o}var l="",p=null!==a?a:i?"#{exp}":"an error";s&&(l=" but #{act} was thrown"),this.assert(!0===s,"expected #{this} to throw "+p+l,"expected #{this} to not throw "+p+l,i instanceof Error?i.toString():i,c instanceof Error?c.toString():c),N(this,"object",c)}function w(e,n){n&&N(this,"message",n);var o=N(this,"object"),r=N(this,"itself"),s="function"!==t.type(o)||r?o[e]:o.prototype[e];this.assert("function"==typeof s,"expected #{this} to respond to "+t.inspect(e),"expected #{this} to not respond to "+t.inspect(e))}function x(e,n){n&&N(this,"message",n);var o=e(N(this,"object"));this.assert(o,"expected #{this} to satisfy "+t.objDisplay(e),"expected #{this} to not satisfy"+t.objDisplay(e),!this.negate,o)}function j(e,n,o){o&&N(this,"message",o);var r=N(this,"object");if(new S(r,o).is.a("number"),"number"!==t.type(e)||"number"!==t.type(n))throw new Error("the arguments to closeTo or approximately must be numbers");this.assert(Math.abs(r-e)<=n,"expected #{this} to be close to "+e+" +/- "+n,"expected #{this} not to be close to "+e+" +/- "+n)}function E(e,t,n){return e.every(function(e){return n?t.some(function(t){return n(e,t)}):-1!==t.indexOf(e)})}function O(e,t){t&&N(this,"message",t);var n=N(this,"object");new S(e).to.be.an("array"),this.assert(e.indexOf(n)>-1,"expected #{this} to be one of #{exp}","expected #{this} to not be one of #{exp}",e,n)}function A(e,t,n){n&&N(this,"message",n);var o=N(this,"object");new S(e,n).to.have.property(t),new S(o).is.a("function");var r=e[t];o(),this.assert(r!==e[t],"expected ."+t+" to change","expected ."+t+" to not change")}function P(e,t,n){n&&N(this,"message",n);var o=N(this,"object");new S(e,n).to.have.property(t),new S(o).is.a("function");var r=e[t];o(),this.assert(e[t]-r>0,"expected ."+t+" to increase","expected ."+t+" to not increase")}function M(e,t,n){n&&N(this,"message",n);var o=N(this,"object");new S(e,n).to.have.property(t),new S(o).is.a("function");var r=e[t];o(),this.assert(e[t]-r<0,"expected ."+t+" to decrease","expected ."+t+" to not decrease")}var S=e.Assertion,N=(Object.prototype.toString,t.flag);["to","be","been","is","and","has","have","with","that","which","at","of","same"].forEach(function(e){S.addProperty(e,function(){return this})}),S.addProperty("not",function(){N(this,"negate",!0)}),S.addProperty("deep",function(){N(this,"deep",!0)}),S.addProperty("any",function(){N(this,"any",!0),N(this,"all",!1)}),S.addProperty("all",function(){N(this,"all",!0),N(this,"any",!1)}),S.addChainableMethod("an",n),S.addChainableMethod("a",n),S.addChainableMethod("include",r,o),S.addChainableMethod("contain",r,o),S.addChainableMethod("contains",r,o),S.addChainableMethod("includes",r,o),S.addProperty("ok",function(){this.assert(N(this,"object"),"expected #{this} to be truthy","expected #{this} to be falsy")}),S.addProperty("true",function(){this.assert(!0===N(this,"object"),"expected #{this} to be true","expected #{this} to be false",!this.negate)}),S.addProperty("false",function(){this.assert(!1===N(this,"object"),"expected #{this} to be false","expected #{this} to be true",!!this.negate)}),S.addProperty("null",function(){this.assert(null===N(this,"object"),"expected #{this} to be null","expected #{this} not to be null")}),S.addProperty("undefined",function(){this.assert(void 0===N(this,"object"),"expected #{this} to be undefined","expected #{this} not to be undefined")}),S.addProperty("NaN",function(){this.assert(isNaN(N(this,"object")),"expected #{this} to be NaN","expected #{this} not to be NaN")}),S.addProperty("exist",function(){this.assert(null!=N(this,"object"),"expected #{this} to exist","expected #{this} to not exist")}),S.addProperty("empty",function(){var e=N(this,"object"),t=e;Array.isArray(e)||"string"==typeof object?t=e.length:"object"==typeof e&&(t=Object.keys(e).length),this.assert(!t,"expected #{this} to be empty","expected #{this} not to be empty")}),S.addProperty("arguments",s),S.addProperty("Arguments",s),S.addMethod("equal",i),S.addMethod("equals",i),S.addMethod("eq",i),S.addMethod("eql",a),S.addMethod("eqls",a),S.addMethod("above",c),S.addMethod("gt",c),S.addMethod("greaterThan",c),S.addMethod("least",u),S.addMethod("gte",u),S.addMethod("below",l),S.addMethod("lt",l),S.addMethod("lessThan",l),S.addMethod("most",p),S.addMethod("lte",p),S.addMethod("within",function(e,t,n){n&&N(this,"message",n);var o=N(this,"object"),r=e+".."+t;if(N(this,"doLength")){new S(o,n).to.have.property("length");var s=o.length;this.assert(s>=e&&s<=t,"expected #{this} to have a length within "+r,"expected #{this} to not have a length within "+r)}else this.assert(o>=e&&o<=t,"expected #{this} to be within "+r,"expected #{this} to not be within "+r)}),S.addMethod("instanceof",h),S.addMethod("instanceOf",h),S.addMethod("property",function(e,n,o){o&&N(this,"message",o);var r=!!N(this,"deep"),s=r?"deep property ":"property ",i=N(this,"negate"),a=N(this,"object"),c=r?t.getPathInfo(e,a):null,u=r?c.exists:t.hasProperty(e,a),l=r?c.value:a[e];if(i&&arguments.length>1){if(void 0===l)throw o=null!=o?o+": ":"",new Error(o+t.inspect(a)+" has no "+s+t.inspect(e))}else this.assert(u,"expected #{this} to have a "+s+t.inspect(e),"expected #{this} to not have "+s+t.inspect(e));arguments.length>1&&this.assert(n===l,"expected #{this} to have a "+s+t.inspect(e)+" of #{exp}, but got #{act}","expected #{this} to not have a "+s+t.inspect(e)+" of #{act}",n,l),N(this,"object",l)}),S.addMethod("ownProperty",f),S.addMethod("haveOwnProperty",f),S.addMethod("ownPropertyDescriptor",d),S.addMethod("haveOwnPropertyDescriptor",d),S.addChainableMethod("length",b,g),S.addMethod("lengthOf",b),S.addMethod("match",m),S.addMethod("matches",m),S.addMethod("string",function(e,n){n&&N(this,"message",n);var o=N(this,"object");new S(o,n).is.a("string"),this.assert(~o.indexOf(e),"expected #{this} to contain "+t.inspect(e),"expected #{this} to not contain "+t.inspect(e))}),S.addMethod("keys",y),S.addMethod("key",y),S.addMethod("throw",v),S.addMethod("throws",v),S.addMethod("Throw",v),S.addMethod("respondTo",w),S.addMethod("respondsTo",w),S.addProperty("itself",function(){N(this,"itself",!0)}),S.addMethod("satisfy",x),S.addMethod("satisfies",x),S.addMethod("closeTo",j),S.addMethod("approximately",j),S.addMethod("members",function(e,n){n&&N(this,"message",n);var o=N(this,"object");new S(o).to.be.an("array"),new S(e).to.be.an("array");var r=N(this,"deep")?t.eql:void 0;if(N(this,"contains"))return this.assert(E(e,o,r),"expected #{this} to be a superset of #{act}","expected #{this} to not be a superset of #{act}",o,e);this.assert(E(o,e,r)&&E(e,o,r),"expected #{this} to have the same members as #{act}","expected #{this} to not have the same members as #{act}",o,e)}),S.addMethod("oneOf",O),S.addChainableMethod("change",A),S.addChainableMethod("changes",A),S.addChainableMethod("increase",P),S.addChainableMethod("increases",P),S.addChainableMethod("decrease",M),S.addChainableMethod("decreases",M),S.addProperty("extensible",function(){var e,t=N(this,"object");try{e=Object.isExtensible(t)}catch(t){if(!(t instanceof TypeError))throw t;e=!1}this.assert(e,"expected #{this} to be extensible","expected #{this} to not be extensible")}),S.addProperty("sealed",function(){var e,t=N(this,"object");try{e=Object.isSealed(t)}catch(t){if(!(t instanceof TypeError))throw t;e=!0}this.assert(e,"expected #{this} to be sealed","expected #{this} to not be sealed")}),S.addProperty("frozen",function(){var e,t=N(this,"object");try{e=Object.isFrozen(t)}catch(t){if(!(t instanceof TypeError))throw t;e=!0}this.assert(e,"expected #{this} to be frozen","expected #{this} to not be frozen")})}},{}],7:[function(e,t,n){t.exports=function(e,t){var n=e.Assertion,o=t.flag,r=e.assert=function(t,o){new n(null,null,e.assert).assert(t,o,"[ negation message unavailable ]")};r.fail=function(t,n,o,s){throw o=o||"assert.fail()",new e.AssertionError(o,{actual:t,expected:n,operator:s},r.fail)},r.isOk=function(e,t){new n(e,t).is.ok},r.isNotOk=function(e,t){new n(e,t).is.not.ok},r.equal=function(e,t,s){var i=new n(e,s,r.equal);i.assert(t==o(i,"object"),"expected #{this} to equal #{exp}","expected #{this} to not equal #{act}",t,e)},r.notEqual=function(e,t,s){var i=new n(e,s,r.notEqual);i.assert(t!=o(i,"object"),"expected #{this} to not equal #{exp}","expected #{this} to equal #{act}",t,e)},r.strictEqual=function(e,t,o){new n(e,o).to.equal(t)},r.notStrictEqual=function(e,t,o){new n(e,o).to.not.equal(t)},r.deepEqual=function(e,t,o){new n(e,o).to.eql(t)},r.notDeepEqual=function(e,t,o){new n(e,o).to.not.eql(t)},r.isAbove=function(e,t,o){new n(e,o).to.be.above(t)},r.isAtLeast=function(e,t,o){new n(e,o).to.be.least(t)},r.isBelow=function(e,t,o){new n(e,o).to.be.below(t)},r.isAtMost=function(e,t,o){new n(e,o).to.be.most(t)},r.isTrue=function(e,t){new n(e,t).is.true},r.isNotTrue=function(e,t){new n(e,t).to.not.equal(!0)},r.isFalse=function(e,t){new n(e,t).is.false},r.isNotFalse=function(e,t){new n(e,t).to.not.equal(!1)},r.isNull=function(e,t){new n(e,t).to.equal(null)},r.isNotNull=function(e,t){new n(e,t).to.not.equal(null)},r.isNaN=function(e,t){new n(e,t).to.be.NaN},r.isNotNaN=function(e,t){new n(e,t).not.to.be.NaN},r.isUndefined=function(e,t){new n(e,t).to.equal(void 0)},r.isDefined=function(e,t){new n(e,t).to.not.equal(void 0)},r.isFunction=function(e,t){new n(e,t).to.be.a("function")},r.isNotFunction=function(e,t){new n(e,t).to.not.be.a("function")},r.isObject=function(e,t){new n(e,t).to.be.a("object")},r.isNotObject=function(e,t){new n(e,t).to.not.be.a("object")},r.isArray=function(e,t){new n(e,t).to.be.an("array")},r.isNotArray=function(e,t){new n(e,t).to.not.be.an("array")},r.isString=function(e,t){new n(e,t).to.be.a("string")},r.isNotString=function(e,t){new n(e,t).to.not.be.a("string")},r.isNumber=function(e,t){new n(e,t).to.be.a("number")},r.isNotNumber=function(e,t){new n(e,t).to.not.be.a("number")},r.isBoolean=function(e,t){new n(e,t).to.be.a("boolean")},r.isNotBoolean=function(e,t){new n(e,t).to.not.be.a("boolean")},r.typeOf=function(e,t,o){new n(e,o).to.be.a(t)},r.notTypeOf=function(e,t,o){new n(e,o).to.not.be.a(t)},r.instanceOf=function(e,t,o){new n(e,o).to.be.instanceOf(t)},r.notInstanceOf=function(e,t,o){new n(e,o).to.not.be.instanceOf(t)},r.include=function(e,t,o){new n(e,o,r.include).include(t)},r.notInclude=function(e,t,o){new n(e,o,r.notInclude).not.include(t)},r.match=function(e,t,o){new n(e,o).to.match(t)},r.notMatch=function(e,t,o){new n(e,o).to.not.match(t)},r.property=function(e,t,o){new n(e,o).to.have.property(t)},r.notProperty=function(e,t,o){new n(e,o).to.not.have.property(t)},r.deepProperty=function(e,t,o){new n(e,o).to.have.deep.property(t)},r.notDeepProperty=function(e,t,o){new n(e,o).to.not.have.deep.property(t)},r.propertyVal=function(e,t,o,r){new n(e,r).to.have.property(t,o)},r.propertyNotVal=function(e,t,o,r){new n(e,r).to.not.have.property(t,o)},r.deepPropertyVal=function(e,t,o,r){new n(e,r).to.have.deep.property(t,o)},r.deepPropertyNotVal=function(e,t,o,r){new n(e,r).to.not.have.deep.property(t,o)},r.lengthOf=function(e,t,o){new n(e,o).to.have.length(t)},r.throws=function(e,t,r,s){("string"==typeof t||t instanceof RegExp)&&(r=t,t=null);var i=new n(e,s).to.throw(t,r);return o(i,"object")},r.doesNotThrow=function(e,t,o){"string"==typeof t&&(o=t,t=null),new n(e,o).to.not.Throw(t)},r.operator=function(e,r,s,i){var a;switch(r){case"==":a=e==s;break;case"===":a=e===s;break;case">":a=e>s;break;case">=":a=e>=s;break;case"<":a=e1&&n===t.length-1?"or ":"")+o+" "+e}).join(", ");if(!t.some(function(t){return s(e)===t}))throw new o("object tested must be "+n+", but "+s(e)+" given")}},{"./flag":14,"assertion-error":1,"type-detect":39}],14:[function(e,t,n){t.exports=function(e,t,n){var o=e.__flags||(e.__flags=Object.create(null));if(3!==arguments.length)return o[t];o[t]=n}},{}],15:[function(e,t,n){t.exports=function(e,t){return t.length>4?t[4]:e._obj}},{}],16:[function(e,t,n){t.exports=function(e){var t=[];for(var n in e)t.push(n);return t}},{}],17:[function(e,t,n){var o=e("./flag"),r=e("./getActual"),s=(e("./inspect"),e("./objDisplay"));t.exports=function(e,t){var n=o(e,"negate"),i=o(e,"object"),a=t[3],c=r(e,t),u=n?t[2]:t[1],l=o(e,"message");return"function"==typeof u&&(u=u()),u=u||"",u=u.replace(/#\{this\}/g,function(){return s(i)}).replace(/#\{act\}/g,function(){return s(c)}).replace(/#\{exp\}/g,function(){return s(a)}),l?l+": "+u:u}},{"./flag":14,"./getActual":15,"./inspect":24,"./objDisplay":25}],18:[function(e,t,n){t.exports=function(e){if(e.name)return e.name;var t=/^\s?function ([^(]*)\(/.exec(e);return t&&t[1]?t[1]:""}},{}],19:[function(e,t,n){function o(e){return e.replace(/([^\\])\[/g,"$1.[").match(/(\\\.|[^.]+?)+/g).map(function(e){var t=/^\[(\d+)\]$/.exec(e);return t?{i:parseFloat(t[1])}:{p:e.replace(/\\([.\[\]])/g,"$1")}})}function r(e,t,n){for(var o,r=t,s=0,i=n=void 0===n?e.length:n;s1?r(n,t,n.length-1):t,name:i.p||i.i,value:r(n,t)};return a.exists=s(a.name,a.parent),a}},{"./hasProperty":22}],20:[function(e,t,n){var o=e("./getPathInfo");t.exports=function(e,t){return o(e,t).value}},{"./getPathInfo":19}],21:[function(e,t,n){t.exports=function(e){function t(e){-1===n.indexOf(e)&&n.push(e)}for(var n=Object.getOwnPropertyNames(e),o=Object.getPrototypeOf(e);null!==o;)Object.getOwnPropertyNames(o).forEach(t),o=Object.getPrototypeOf(o);return n}},{}],22:[function(e,t,n){var o=e("type-detect"),r={number:Number,string:String};t.exports=function(e,t){var n=o(t);return"null"!==n&&"undefined"!==n&&(r[n]&&"object"!=typeof t&&(t=new r[n](t)),e in t)}},{"type-detect":39}],23:[function(e,t,n){(n=t.exports={}).test=e("./test"),n.type=e("type-detect"),n.expectTypes=e("./expectTypes"),n.getMessage=e("./getMessage"),n.getActual=e("./getActual"),n.inspect=e("./inspect"),n.objDisplay=e("./objDisplay"),n.flag=e("./flag"),n.transferFlags=e("./transferFlags"),n.eql=e("deep-eql"),n.getPathValue=e("./getPathValue"),n.getPathInfo=e("./getPathInfo"),n.hasProperty=e("./hasProperty"),n.getName=e("./getName"),n.addProperty=e("./addProperty"),n.addMethod=e("./addMethod"),n.overwriteProperty=e("./overwriteProperty"),n.overwriteMethod=e("./overwriteMethod"),n.addChainableMethod=e("./addChainableMethod"),n.overwriteChainableMethod=e("./overwriteChainableMethod")},{"./addChainableMethod":10,"./addMethod":11,"./addProperty":12,"./expectTypes":13,"./flag":14,"./getActual":15,"./getMessage":17,"./getName":18,"./getPathInfo":19,"./getPathValue":20,"./hasProperty":22,"./inspect":24,"./objDisplay":25,"./overwriteChainableMethod":26,"./overwriteMethod":27,"./overwriteProperty":28,"./test":29,"./transferFlags":30,"deep-eql":32,"type-detect":39}],24:[function(e,t,n){function o(e,t,n,o){return r({showHidden:t,seen:[],stylize:function(e){return e}},e,void 0===n?2:n)}function r(e,t,o){if(t&&"function"==typeof t.inspect&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var d=t.inspect(o);return"string"!=typeof d&&(d=r(e,d,o)),d}var v=s(e,t);if(v)return v;if(y(t)){if("outerHTML"in t)return t.outerHTML;try{if(document.xmlVersion)return(new XMLSerializer).serializeToString(t);var w=document.createElementNS("http://www.w3.org/1999/xhtml","_");return w.appendChild(t.cloneNode(!1)),html=w.innerHTML.replace("><",">"+t.innerHTML+"<"),w.innerHTML="",html}catch(e){}}var x=m(t),j=e.showHidden?b(t):x;if(0===j.length||f(t)&&(1===j.length&&"stack"===j[0]||2===j.length&&"description"===j[0]&&"stack"===j[1])){if("function"==typeof t){var E=(M=g(t))?": "+M:"";return e.stylize("[Function"+E+"]","special")}if(p(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(h(t))return e.stylize(Date.prototype.toUTCString.call(t),"date");if(f(t))return i(t)}var O="",A=!1,P=["{","}"];if(l(t)&&(A=!0,P=["[","]"]),"function"==typeof t){var M=g(t);O=" [Function"+(E=M?": "+M:"")+"]"}if(p(t)&&(O=" "+RegExp.prototype.toString.call(t)),h(t)&&(O=" "+Date.prototype.toUTCString.call(t)),f(t))return i(t);if(0===j.length&&(!A||0==t.length))return P[0]+O+P[1];if(o<0)return p(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var S;return S=A?a(e,t,o,x,j):j.map(function(n){return c(e,t,o,x,n,A)}),e.seen.pop(),u(S,O,P)}function s(e,t){switch(typeof t){case"undefined":return e.stylize("undefined","undefined");case"string":var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string");case"number":return 0===t&&1/t==-1/0?e.stylize("-0","number"):e.stylize(""+t,"number");case"boolean":return e.stylize(""+t,"boolean")}if(null===t)return e.stylize("null","null")}function i(e){return"["+Error.prototype.toString.call(e)+"]"}function a(e,t,n,o,r){for(var s=[],i=0,a=t.length;i-1&&(c=i?c.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+c.split("\n").map(function(e){return" "+e}).join("\n")):c=e.stylize("[Circular]","special")),void 0===a){if(i&&s.match(/^\d+$/))return c;(a=JSON.stringify(""+s)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+c}function u(e,t,n){var o=0;return e.reduce(function(e,t){return o++,t.indexOf("\n")>=0&&o++,e+t.length+1},0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function l(e){return Array.isArray(e)||"object"==typeof e&&"[object Array]"===d(e)}function p(e){return"object"==typeof e&&"[object RegExp]"===d(e)}function h(e){return"object"==typeof e&&"[object Date]"===d(e)}function f(e){return"object"==typeof e&&"[object Error]"===d(e)}function d(e){return Object.prototype.toString.call(e)}var g=e("./getName"),b=e("./getProperties"),m=e("./getEnumerableProperties");t.exports=o;var y=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName}},{"./getEnumerableProperties":16,"./getName":18,"./getProperties":21}],25:[function(e,t,n){var o=e("./inspect"),r=e("../config");t.exports=function(e){var t=o(e),n=Object.prototype.toString.call(e);if(r.truncateThreshold&&t.length>=r.truncateThreshold){if("[object Function]"===n)return e.name&&""!==e.name?"[Function: "+e.name+"]":"[Function]";if("[object Array]"===n)return"[ Array("+e.length+") ]";if("[object Object]"===n){var s=Object.keys(e);return"{ Object ("+(s.length>2?s.splice(0,2).join(", ")+", ...":s.join(", "))+") }"}return t}return t}},{"../config":5,"./inspect":24}],26:[function(e,t,n){t.exports=function(e,t,n,o){var r=e.__methods[t],s=r.chainingBehavior;r.chainingBehavior=function(){var e=o(s).call(this);return void 0===e?this:e};var i=r.method;r.method=function(){var e=n(i).apply(this,arguments);return void 0===e?this:e}}},{}],27:[function(e,t,n){t.exports=function(e,t,n){var o=e[t],r=function(){return this};o&&"function"==typeof o&&(r=o),e[t]=function(){var e=n(r).apply(this,arguments);return void 0===e?this:e}}},{}],28:[function(e,t,n){t.exports=function(e,t,n){var o=Object.getOwnPropertyDescriptor(e,t),r=function(){};o&&"function"==typeof o.get&&(r=o.get),Object.defineProperty(e,t,{get:function(){var e=n(r).call(this);return void 0===e?this:e},configurable:!0})}},{}],29:[function(e,t,n){var o=e("./flag");t.exports=function(e,t){var n=o(e,"negate"),r=t[0];return n?!r:r}},{"./flag":14}],30:[function(e,t,n){t.exports=function(e,t,n){var o=e.__flags||(e.__flags=Object.create(null));t.__flags||(t.__flags=Object.create(null)),n=3!==arguments.length||n;for(var r in o)(n||"object"!==r&&"ssfi"!==r&&"message"!=r)&&(t.__flags[r]=o[r])}},{}],31:[function(e,t,n){"use strict";function o(e){var t=void 0;t="string"==typeof e?[e]:e.raw;for(var n="",o=0;o=0;r--)if(a=s[r],!o(e[a],t[a],n))return!1;return!0}var d,g=e("type-detect");try{d=e("buffer").Buffer}catch(e){(d={}).isBuffer=function(){return!1}}t.exports=o},{buffer:void 0,"type-detect":37}],34:[function(e,t,n){const o=e("./problems/initial"),r=e("./problems/arrays");t.exports={initial:o,arrays:r}},{"./problems/arrays":35,"./problems/initial":36}],35:[function(e,t,n){t.exports=[{name:"Access Array by index (first)",time:10,prompt:"Return the first value of the Array",given:`const fruits = ['apple', 'banana'];\r`,answer:`const fruits = ['apple', 'banana'];\n return fruits[0];`,tests:[{name:"Correct output",test:"assert.deepEqual(output, 'apple') === undefined"},{name:"Returns a String",test:"assert.isString(output) === undefined"}]},{name:"Access Array by index (last)",time:10,prompt:"Return the last value of the Array",given:`const fruits = ['apple', 'banana', 'orange'];\r`,answer:`const fruits = ['apple', 'banana', 'orange'];\n return fruits[fruits.length - 1];`,tests:[{name:"Correct output",test:`assert.deepEqual(output, 'orange') === undefined;`},{name:"Returns a String",test:`assert.isString(output) === undefined;`}]},{name:"Access Array by index (second)",time:10,prompt:"Return the second value of the Array",given:`const fruits = ['apple', 'banana'];\r`,answer:`const fruits = ['apple', 'banana'];\n return fruits[1];`,tests:[{name:"Correct output",test:`assert.deepEqual(output, 'banana') === undefined;`},{name:"Returns a String",test:`assert.isString(output) === undefined;`}]},{name:"Array.forEach()",time:20,prompt:"Loop over the array, add an 'x' to the end of each name, push each fruit into a new array, then return the new array.",given:`const fruits = ['apple', 'banana'];\r`,answer:`const fruits = ['apple', 'banana'];\n const newFruits = [];\n fruits.forEach(function(item) {\n newFruits.push(item+'x');\n });\n return newFruits;`,tests:[{name:"Correct output",test:`assert.deepEqual(output, ['applex', 'bananax']) === undefined;`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 2 items",test:`assert.lengthOf(output, 2) === undefined;`}]},{name:"Array.push()",time:10,prompt:`Add 'orange' to the end of the 'fruits' array and return 'fruits'.`,given:`const fruits = ['apple', 'banana'];\r`,answer:`const fruits = ['apple', 'banana'];\n fruits.push('orange');\n return fruits;`,tests:[{name:"Correct output",test:`(assert.deepEqual(output, ['apple', 'banana', 'orange']) === undefined);`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 3 items",test:`assert.lengthOf(output, 3) === undefined;`}]},{name:"Array.shift()",time:10,prompt:`Remove 'apple' from the front of the 'fruits' array and return 'fruits'.`,given:`const fruits = ['apple', 'banana', 'orange'];\r`,answer:`const fruits = ['apple', 'banana', 'orange'];\n fruits.shift();\n return fruits;`,tests:[{name:"Output must be correct",test:`assert.deepEqual(output, ['banana', 'orange']) === undefined;`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 2 items",test:`assert.lengthOf(output, 2) === undefined;`}]},{name:"Array.unshift()",time:10,prompt:`Add 'strawberry' to the front of the 'fruits' array and return 'fruits'.`,given:`const fruits = ['apple', 'banana', 'orange'];\r`,answer:`const fruits = ['apple', 'banana', 'orange'];\n fruits.unshift('strawberry');\n return fruits;`,tests:[{name:"Output must be correct",test:`(assert.deepEqual(output, [\n 'strawberry',\n 'apple',\n 'banana',\n 'orange'\n ]) === undefined)`},{name:"Must return an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 4 items",test:`assert.lengthOf(output, 4) === undefined;`}]},{name:"Array.indexOf()",time:10,prompt:`Return the index of 'banana' in the Array.`,given:`const fruits = ['strawberry', 'banana', 'mango'];\r`,answer:`const fruits = ['strawberry', 'banana', 'mango'];\n const ind = fruits.indexOf('banana');\n return ind;`,tests:[{name:"Correct output",test:`assert.deepEqual(output, 1) === undefined;`},{name:"Returns a Number",test:`assert.isNumber(output) === undefined;`}]},{name:"Array.concat()",time:10,prompt:`Merge the two arrays using Array's 'concat()' method. Return the resulting array.`,given:`const fruits = ['strawberry', 'banana'];\rconst otherFruits = ['pear','peach'];\r`,answer:`const fruits = ['strawberry', 'banana'];\n const otherFruits = ['pear','peach'];\n const allTheFruits = fruits.concat(otherFruits);\n return allTheFruits;\r`,tests:[{name:"Correct output",test:`(assert.deepEqual(output, [\n 'strawberry',\n 'banana',\n 'pear',\n 'peach'\n ]) === undefined\n );`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 4 items",test:`assert.lengthOf(output, 4) === undefined;`}]},{name:"Array.join()",time:10,prompt:`Mix the two flavors with a '-' using Array's 'join' method. Return the resulting hybrid flavor.`,given:`const fruits = ['strawberry', 'banana'];\r`,answer:`const fruits = ['strawberry', 'banana'];\n const hybrid = fruits.join('-');\n return hybrid;\r`,tests:[{name:"Correct output",test:`assert.deepEqual(output, 'strawberry-banana') === undefined;`},{name:"Returns a String",test:`assert.isString(output) === undefined;`}]},{name:"Array.slice()",time:20,prompt:`Return just the citrus fruits from the 'fruits' array using 'Array.slice()'`,given:`const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\r`,answer:`const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\n const citrus = fruits.slice(1, 3);\n return citrus;`,tests:[{name:"Correct output",test:`assert.deepEqual(output, ['orange', 'lemon']) === undefined;`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 2 items",test:`assert.lengthOf(output, 2) === undefined;`}]},{name:"Array.reverse()",time:10,prompt:`Reverse the order of the 'fruit' array using 'Array.reverse()'`,given:`const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\r`,answer:`const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\n const stiurf = fruits.reverse();\n return stiurf;`,tests:[{name:"Correct output",test:`(assert.deepEqual(output, [\n 'banana',\n 'lemon',\n 'orange',\n 'strawberry'\n ]) === undefined);`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 4 items",test:`assert.lengthOf(output, 4) === undefined;`},{name:`First item is 'banana'`,test:`assert.deepEqual(output[0], 'banana') === undefined;`}]},{name:"Array.sort()",time:10,prompt:`Return the 'fruits' Array after sorting them using 'Array.sort()'.`,given:`const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\r`,answer:`const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\n const orderlyFruit = fruits.sort();\n return orderlyFruit;`,tests:[{name:"Correct output",test:`(assert.deepEqual(output, [\n 'banana',\n 'lemon',\n 'orange',\n 'strawberry'\n ]) === undefined);`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 4 items",test:`assert.lengthOf(output, 4) === undefined;`},{name:`First item is 'banana'`,test:`assert.deepEqual(output[0], 'banana') === undefined;`}]},{name:"Array.lastIndexOf()",time:10,prompt:`Return the index of the last 'peach' instance in the 'fruit' array using 'Array.lastIndexOf()'`,given:`const fruits = ['peach', 'orange', 'lemon', 'peach'];\r`,answer:`const fruits = ['peach', 'orange', 'lemon', 'peach'];\n const wheresTheLastPeach = fruits.lastIndexOf('peach');\n return wheresTheLastPeach;`,tests:[{name:"Correct output",test:`assert.deepEqual(output, 3) === undefined;`},{name:"Returns a Number",test:`assert.isNumber(output) === undefined;`}]},{name:"Array.filter()",time:10,prompt:`Return an array of the numbers greater than 5 in 'numbers' using 'Array.filter()'`,given:`const numbers = [1, 1, 2, 3, 5, 8, 13, 21];\r`,answer:`const numbers = [1, 1, 2, 3, 5, 8, 13, 21];\n const overFive = numbers.filter(num => num > 5);\n return overFive;`,tests:[{name:"Correct output",test:`assert.deepEqual(output, [8, 13, 21]) === undefined;`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 3 items",test:`assert.lengthOf(output, 3) === undefined;`},{name:`First item is 8`,test:`assert.deepEqual(output[0], 8) === undefined;`}]},{name:"Array.map()",time:10,prompt:`Return an array of 'numbers' array's square roots, using 'Array.map()' and 'Math.sqrt()'`,given:`const numbers = [25, 121, 169];\r`,answer:`const numbers = [25, 121, 169];\n const roots = numbers.map(num => Math.sqrt(num));\n return roots;`,tests:[{name:"Correct output",test:`assert.deepEqual(output, [5, 11, 13]) === undefined;`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 3 items",test:`assert.lengthOf(output, 3) === undefined;`},{name:`First item is 5`,test:`assert.deepEqual(output[0], 5) === undefined;`},{name:`Last item is 13`,test:`assert.deepEqual(output[output.length - 1], 13) === undefined;`}]},{name:"Array.every()",time:10,prompt:`Return object that returns whether each array contains all even numbers using Array.every().`,given:`const evenNumbers = [2, 4, 6, 8];\n const someOddNumbers = [2, 5, 6, 8];\n function isEven(element) {\n \n }\n return {\n evenNumbers: evenNumbers.,\n someOddNumbers: someOddNumbers.\n };`,answer:`const evenNumbers = [2, 4, 6, 8];\n const someOddNumbers = [2, 5, 6, 8];\n function isEven(element) {\n return element % 2 === 0\n }\n return {\n evenNumbers: evenNumbers.every(isEven),\n someOddNumbers: someOddNumbers.every(isEven)\n };`,tests:[{name:"Correct output",test:`assert.deepEqual(output, {\n evenNumbers: true,\n someOddNumbers: false\n }) === undefined;`},{name:"Returns an Object",test:`assert.isObject(output) === undefined;`},{name:"Object has 2 items",test:`assert.lengthOf(Object.keys(output), 2) === undefined;`},{name:`First value is true`,test:`assert.isTrue(output.evenNumbers) === undefined;`},{name:`Second value is false`,test:`assert.isFalse(output.someOddNumbers) === undefined;`}]},{name:"Array.some()",time:10,prompt:`Return 'Object' that returns whether each array contains some odd numbers using 'Array.some()'.`,given:`const evenNumbers = [2, 4, 6, 8];\n const someOddNumbers = [2, 4, 7, 8];\n function isOdd(element) {\n \n }\n return {\n evenNumbers: evenNumbers.,\n someOddNumbers: someOddNumbers.\n };`,answer:`const evenNumbers = [1, 3, 5, 7];\n const someOddNumbers = [1, 3, 6, 7];\n function isOdd(element) {\n return element % 2 !== 0;\n }\n return {\n evenNumbers: evenNumbers.some(isOdd),\n someOddNumbers: someOddNumbers.some(isOdd)\n };`,tests:[{name:"Correct output",test:`assert.deepEqual(output, {\n evenNumbers: false,\n someOddNumbers: true\n }) === undefined;`},{name:"Returns an Object",test:`assert.isObject(output) === undefined;`},{name:"Object has 2 items",test:`assert.lengthOf(Object.keys(output), 2) === undefined;`},{name:`First value is false`,test:`assert.isFalse(output.evenNumbers) === undefined;`},{name:`Second value is true`,test:`assert.isTrue(output.someOddNumbers) === undefined;`}]}]},{}],36:[function(e,t,n){t.exports=[{name:"Create Array",time:10,prompt:"Create and return an array that contains 'apple' and 'banana'",given:`const fruits = [];\rreturn fruits;`,answer:`const fruits = ['apple', 'banana'];\n return fruits;`,tests:[{name:"Correct output",test:`assert.deepEqual(output, ['apple', 'banana']) === undefined;`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 2 items",test:`assert.lengthOf(output, 2) === undefined;`}]},{name:"Array.pop()",time:10,prompt:`Remove 'orange' from the end of the 'fruits' array and return 'fruits'.`,given:`const fruits = ['apple', 'banana', 'orange'];\r`,answer:`const fruits = ['apple', 'banana', 'orange'];\n fruits.pop();\n return fruits;`,tests:[{name:"Correct output",test:`assert.deepEqual(output, ['apple', 'banana']) === undefined;`},{name:"Returns an Array",test:`assert.isArray(output) === undefined;`},{name:"Array has 2 items",test:`assert.lengthOf(output, 2) === undefined;`}]}]},{}],37:[function(e,t,n){t.exports=e("./lib/type")},{"./lib/type":38}],38:[function(e,t,n){function o(e){var t=Object.prototype.toString.call(e);return s[t]?s[t]:null===e?"null":void 0===e?"undefined":e===Object(e)?"object":typeof e}function r(){this.tests={}}var s={"[object Array]":"array","[object RegExp]":"regexp","[object Function]":"function","[object Arguments]":"arguments","[object Date]":"date"};(t.exports=o).Library=r,r.prototype.of=o,r.prototype.define=function(e,t){return 1===arguments.length?this.tests[e]:(this.tests[e]=t,this)},r.prototype.test=function(e,t){if(t===o(e))return!0;var n=this.tests[t];if(n&&"regexp"===o(n))return n.test(e);if(n&&"function"===o(n))return n(e);throw new ReferenceError('Type test "'+t+'" not defined or invalid.')}},{}],39:[function(e,t,n){arguments[4][37][0].apply(n,arguments)},{"./lib/type":40,dup:37}],40:[function(e,t,n){function o(e){var t=Object.prototype.toString.call(e).match(s)[1].toLowerCase();return"function"==typeof Promise&&e instanceof Promise?"promise":null===e?"null":void 0===e?"undefined":t}function r(){if(!(this instanceof r))return new r;this.tests={}}var s=/^\[object (.*)\]$/;(t.exports=o).Library=r,r.prototype.of=o,r.prototype.define=function(e,t){return 1===arguments.length?this.tests[e]:(this.tests[e]=t,this)},r.prototype.test=function(e,t){if(t===o(e))return!0;var n=this.tests[t];if(n&&"regexp"===o(n))return n.test(e);if(n&&"function"===o(n))return n(e);throw new ReferenceError('Type test "'+t+'" not defined or invalid.')}},{}],41:[function(require,module,exports){"use strict";function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t=e.length-1||t<0?0:t+1}function getCurrentProblem(e){return e[config.currentIndex]}function previousProblem(){console.log("previousProblem!"),previousProblemButtonEl.classList.add("active"),config.currentIndex=config.shuffle?getRandomIndex(problems):getPreviousIndex(problems),updateLocalstore(config).then(function(){window.location.reload()})}function nextProblem(){console.log("nextProblem!"),nextProblemButtonEl.classList.add("active"),config.currentIndex=config.shuffle?getRandomIndex(problems):getNextIndex(problems),updateLocalstore(config).then(function(){window.location.reload()})}function toggleShuffle(){console.log("toggle shuffle!"),config.shuffle=!config.shuffle,shuffleProblemsButtonEl.classList.toggle("active"),previousProblemButtonEl.parentNode.classList.toggle("hidden"),updateLocalstore(config)}function loadProblem(e){state.currentProblem=e,problemEl.innerText=e.prompt,e.given&&(codeEl.value=e.given),testSuite(null,!0)}function updateTests(e,t){!0===t&&buildTests(state.currentProblem.tests),updateTestStatus(e)}function buildTests(e){if(e){var t=e.map(function(e){return'
\n
[✘]
\n
'+e.name+"
\n
"}).join("");testSuiteEl.innerHTML=t}}function updateTestStatus(e){if(!e)throw new Error("No testStatuses provided.");var t=!0;e.forEach(function(e){!0!==e&&(t=!1)}),[].slice.call(testSuiteEl.querySelectorAll(".test-state")).forEach(function(t,n){!0===e[n]?(t.innerHTML="[✓]",t.classList.remove("fail"),t.classList.add("pass")):(t.innerHTML="[✘]",t.classList.remove("pass"),t.classList.add("fail"))}),!0===t?(testTotalEl.innerText="PASS",testTotalEl.classList.remove("fail"),testTotalEl.classList.add("pass")):(testTotalEl.innerText="FAIL",testTotalEl.classList.remove("pass"),testTotalEl.classList.add("fail"))}function printAssertError(e){var t="";null!==e&&(t='\n
\n Expected: '+JSON.stringify(e.expected)+"\n Actual: "+JSON.stringify(e.actual)+"\n
"),assertConsoleEl.innerHTML=t}function printEvalOutput(e,t){var n="";e&&void 0!==e.message?n='\n
\n Syntax Error: '+JSON.stringify(e.message)+"\n
":t&&(n='\n
\n Output: '+JSON.stringify(t)+"\n
"),evalConsoleEl.innerHTML=n}function testSuite(e){testTotalEl.classList.toggle("working");var t=runTests(getOutput(codeEl.value));testTotalEl.classList.toggle("working"),updateTests(t,e)}function getOutput(code){var evald=!1;try{evald=eval("(function(){"+code+"})()"),printEvalOutput(null,evald)}catch(e){printEvalOutput(e)}return evald}function runTests(output){var tested=!1;return tested=state.currentProblem.tests.map(function(test){var testOutcome=!1;try{output&&(testOutcome=eval(test.test)),printAssertError(null)}catch(e){printAssertError(e)}return testOutcome})}function loadApp(e){function t(t){!1===e.shuffle&&13===t.keyCode&&t.shiftKey&&(t.metaKey||t.ctrlKey)?previousProblem():13!==t.keyCode||t.shiftKey||!t.metaKey&&!t.ctrlKey||nextProblem()}console.log("loading app!"),!0===e.shuffle&&(shuffleProblemsButtonEl.classList.add("active"),previousProblemButtonEl.parentNode.classList.add("hidden"));var n=debounce(function(e){-1===ignoreKeyCodes.indexOf(e.keyCode)&&testSuite()},200);codeEl.addEventListener("keydown",n),document.addEventListener("keydown",t),shuffleProblemsButtonEl.addEventListener("click",toggleShuffle),previousProblemButtonEl.addEventListener("click",previousProblem),nextProblemButtonEl.addEventListener("click",nextProblem),loadProblem(getCurrentProblem(problems)),testSuite(!0)}var probs=require("pjs-problems"),dedent=require("dedent"),assert=require("chai").assert,problems=[];Object.keys(probs).forEach(function(e){var t;(t=problems).push.apply(t,_toConsumableArray(probs[e]))}),problems=dedentStrings(problems);var currentProblem=void 0,ignoreKeyCodes=[9,37,39,38,40],config={shuffle:!0,timer:!1,currentIndex:0},state={currentProblem:getCurrentProblem(problems)},problemEl=document.getElementById("problem"),codeEl=document.getElementById("code"),testSuiteEl=document.getElementById("test-suite"),testTotalEl=document.getElementById("test-total"),evalConsoleEl=document.getElementById("eval-output"),assertConsoleEl=document.getElementById("assert-output"),shuffleProblemsButtonEl=document.getElementById("shuffle-problems"),previousProblemButtonEl=document.getElementById("prev-problem"),nextProblemButtonEl=document.getElementById("next-problem");if(window.localStorage){var localConfig=localStorage.getItem("js_practice_config");if(localConfig)try{config=JSON.parse(localConfig),loadApp(config)}catch(e){console.log("LOCAL_CONFIG PARSE ERR:",e)}else console.log("LOCAL_CONFIG: No local config"),loadApp(config)}}(document,window)},{chai:2,dedent:31,"pjs-problems":34}]},{},[41]); //# sourceMappingURL=bundle.min.js.map diff --git a/public/dist/js/bundle.min.js.map b/public/dist/js/bundle.min.js.map index 25a3d1c..c2e8edf 100644 --- a/public/dist/js/bundle.min.js.map +++ b/public/dist/js/bundle.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["node_modules/.registry.npmjs.org/browser-pack/6.0.2/node_modules/browser-pack/_prelude.js","node_modules/.registry.npmjs.org/assertion-error/1.0.2/node_modules/assertion-error/index.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/index.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/assertion.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/config.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/core/assertions.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/interface/assert.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/interface/expect.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/interface/should.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/addChainableMethod.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/addMethod.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/addProperty.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/expectTypes.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/flag.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/getActual.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/getEnumerableProperties.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/getMessage.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/getName.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/getPathInfo.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/getPathValue.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/getProperties.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/hasProperty.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/index.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/inspect.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/objDisplay.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/overwriteMethod.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/overwriteProperty.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/test.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/transferFlags.js","node_modules/.registry.npmjs.org/dedent/0.7.0/node_modules/dedent/dist/dedent.js","node_modules/.registry.npmjs.org/deep-eql/0.1.3/node_modules/deep-eql/index.js","node_modules/.registry.npmjs.org/deep-eql/0.1.3/node_modules/deep-eql/lib/eql.js","node_modules/.registry.npmjs.org/pjs-problems/1.0.3/node_modules/pjs-problems/index.js","node_modules/.registry.npmjs.org/pjs-problems/1.0.3/node_modules/pjs-problems/problems/arrays.js","node_modules/.registry.npmjs.org/pjs-problems/1.0.3/node_modules/pjs-problems/problems/initial.js","node_modules/.registry.npmjs.org/type-detect/0.1.1/node_modules/type-detect/index.js","node_modules/.registry.npmjs.org/type-detect/0.1.1/node_modules/type-detect/lib/type.js","node_modules/.registry.npmjs.org/type-detect/1.0.0/node_modules/type-detect/lib/type.js","src/js/index.js"],"names":["e","t","n","r","s","o","u","a","require","i","f","Error","code","l","exports","call","length","1","module","exclude","excludeProps","res","obj","Object","keys","forEach","key","excludes","indexOf","slice","arguments","args","AssertionError","message","_props","ssf","props","this","showDiff","callee","captureStackTrace","stack","prototype","create","name","constructor","toJSON","used","version","util","use","fn","push","config","assertion","core","expect","should","assert","_chai","Assertion","msg","flag","defineProperty","get","console","warn","includeStack","set","value","addProperty","addMethod","addChainableMethod","chainingBehavior","overwriteProperty","overwriteMethod","overwriteChainableMethod","expr","negateMsg","expected","_actual","ok","test","getMessage","actual","getActual","val","truncateThreshold","chai","_","an","type","toLowerCase","article","charAt","includeChainingBehavior","include","expectTypes","eql","k","property","subset","undefined","inspect","checkArguments","toString","assertEqual","_obj","assertEql","assertAbove","to","have","len","assertLeast","assertBelow","assertMost","assertInstanceOf","getName","assertOwnProperty","hasOwnProperty","assertOwnPropertyDescriptor","descriptor","actualDescriptor","getOwnPropertyDescriptor","assertLengthChain","assertLength","assertMatch","re","exec","assertKeys","str","mixedArgsMsg","Array","any","all","filter","every","last","map","pop","join","sort","assertThrows","errMsg","is","thrown","desiredError","thrownError","RegExp","err","actuallyGot","expectedThrown","respondTo","method","itself","context","satisfy","matcher","result","objDisplay","negate","closeTo","delta","Math","abs","isSubsetOf","superset","cmp","elem","some","elem2","oneOf","list","be","assertChanges","object","prop","initial","assertIncreases","assertDecreases","chain","isNaN","isArray","start","finish","range","isDeep","pathInfo","getPathInfo","hasProperty","exists","isExtensible","TypeError","isSealed","isFrozen","express","errmsg","fail","operator","isOk","isNotOk","not","equal","act","exp","notEqual","strictEqual","notStrictEqual","deepEqual","notDeepEqual","isAbove","abv","above","isAtLeast","atlst","least","isBelow","blw","below","isAtMost","atmst","most","isTrue","isNotTrue","isFalse","isNotFalse","isNull","isNotNull","NaN","isNotNaN","isUndefined","isDefined","isFunction","isNotFunction","isObject","isNotObject","isNotArray","isString","isNotString","isNumber","isNotNumber","isBoolean","isNotBoolean","typeOf","notTypeOf","instanceOf","notInstanceOf","inc","notInclude","match","notMatch","notProperty","deepProperty","deep","notDeepProperty","propertyVal","propertyNotVal","deepPropertyVal","deepPropertyNotVal","lengthOf","throws","errt","errs","assertErr","throw","doesNotThrow","Throw","val2","approximately","sameMembers","set1","set2","same","members","sameDeepMembers","includeMembers","includeDeepMembers","inList","changes","change","doesNotChange","increases","increase","doesNotIncrease","decreases","decrease","doesNotDecrease","ifError","extensible","isNotExtensible","sealed","isNotSealed","frozen","isNotFrozen","alias","as","loadShould","shouldGetter","String","Number","Boolean","valueOf","shouldSetter","enumerable","configurable","writable","val1","exist","Should","transferFlags","hasProtoSupport","excludeNames","Function","apply","ctx","chainableBehavior","__methods","__proto__","getOwnPropertyNames","asserterName","pd","getter","types","index","art","flags","__flags","flagMsg","replace","func","parsePath","path","mArr","parseFloat","p","_getPathValue","parsed","tmp","part","info","parent","proto","getPrototypeOf","literals","number","string","ot","getPathValue","showHidden","depth","colors","formatValue","seen","stylize","recurseTimes","ret","primitive","formatPrimitive","isDOMElement","outerHTML","document","xmlVersion","XMLSerializer","serializeToString","container","createElementNS","appendChild","cloneNode","html","innerHTML","visibleKeys","getEnumerableProperties","getProperties","isError","nameSuffix","isRegExp","isDate","Date","toUTCString","formatError","base","array","braces","output","formatArray","formatProperty","reduceToSingleString","simple","JSON","stringify","Infinity","__lookupGetter__","__lookupSetter__","split","line","substr","numLinesEst","reduce","prev","cur","ar","objectToString","d","HTMLElement","nodeType","nodeName","splice","_chainingBehavior","_method","_super","_get","includeAll","dedent","strings","raw","lines","mindent","m","indent","min","trim","b","sameValue","dateEqual","regexpEqual","Buffer","isBuffer","bufferEqual","argumentsEqual","typeEqual","objectEqual","getTime","iterableEqual","isValue","ka","kb","ex","arrays","time","prompt","given","answer","tests","getType","natives","Library","[object Array]","[object RegExp]","[object Function]","[object Arguments]","[object Date]","of","define","ReferenceError","objectTypeRegexp","Promise","window","dedentStrings","problems","prob","debounce","wait","immediate","timeout","later","callNow","clearTimeout","setTimeout","updateLocalstore","resolve","reject","localStorage","setItem","log","getRandomIndex","problemsArr","ind","floor","random","currentIndex","getPreviousIndex","getNextIndex","getCurrentProblem","previousProblem","previousProblemButtonEl","classList","add","shuffle","then","location","reload","nextProblem","nextProblemButtonEl","toggleShuffle","shuffleProblemsButtonEl","toggle","parentNode","loadProblem","problemObj","currentProblem","problemEl","innerText","codeEl","testSuite","updateTests","testStatus","init","buildTests","updateTestStatus","testsDom","testSuiteEl","testStatuses","allPassed","testPassed","querySelectorAll","testStatusEl","iter","remove","testTotalEl","printAssertError","errObj","inner","assertConsoleEl","printEvalOutput","evalConsoleEl","tested","runTests","getOutput","evald","eval","testOutcome","loadApp","problemNav","keyCode","shiftKey","metaKey","ctrlKey","debouncedInputValidation","ignoreKeyCodes","addEventListener","probs","subject","_problems","_toConsumableArray","timer","getElementById","localConfig","getItem","parse"],"mappings":"CAAA,SAAAA,EAAAC,EAAAC,EAAAC,GAAA,SAAAC,EAAAC,EAAAC,GAAA,IAAAJ,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,IAAAE,EAAA,mBAAAC,SAAAA,QAAA,IAAAF,GAAAC,EAAA,OAAAA,EAAAF,GAAA,GAAA,GAAAI,EAAA,OAAAA,EAAAJ,GAAA,GAAA,IAAAK,EAAA,IAAAC,MAAA,uBAAAN,EAAA,KAAA,MAAAK,EAAAE,KAAA,mBAAAF,EAAA,IAAAG,EAAAX,EAAAG,IAAAS,YAAAb,EAAAI,GAAA,GAAAU,KAAAF,EAAAC,QAAA,SAAAd,GAAA,IAAAE,EAAAD,EAAAI,GAAA,GAAAL,GAAA,OAAAI,EAAAF,GAAAF,IAAAa,EAAAA,EAAAC,QAAAd,EAAAC,EAAAC,EAAAC,GAAA,OAAAD,EAAAG,GAAAS,QAAA,IAAA,IAAAL,EAAA,mBAAAD,SAAAA,QAAAH,EAAA,EAAAA,EAAAF,EAAAa,OAAAX,IAAAD,EAAAD,EAAAE,IAAA,OAAAD,IAAAa,GAAA,SAAAT,EAAAU,EAAAJ,GCeA,SAAAK,IAGA,SAAAC,EAAAC,EAAAC,GACAC,OAAAC,KAAAF,GAAAG,QAAA,SAAAC,IACAC,EAAAC,QAAAF,KAAAL,EAAAK,GAAAJ,EAAAI,MAJA,IAAAC,KAAAE,MAAAd,KAAAe,WAQA,OAAA,WAKA,IAJA,IAAAC,KAAAF,MAAAd,KAAAe,WACArB,EAAA,EACAY,KAEAZ,EAAAsB,EAAAf,OAAAP,IACAW,EAAAC,EAAAU,EAAAtB,IAG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AAc,GA+BVqB,UAAY5I,SAASyL,eAAe,WACpC3C,OAAS9I,SAASyL,eAAe,QACjCnC,YAActJ,SAASyL,eAAe,cACtC3B,YAAc9J,SAASyL,eAAe,cACtCrB,cAAgBpK,SAASyL,eAAe,eACxCvB,gBAAkBlK,SAASyL,eAAe,iBAC1CnD,wBAA0BtI,SAASyL,eAAe,oBAClD7D,wBAA0B5H,SAASyL,eAAe,gBAClDrD,oBAAsBpI,SAASyL,eAAe,gBAMpD,GAAIzF,OAAOe,aAAc,CACvB,IAAM2E,YAAc3E,aAAa4E,QAAQ,sBACzC,GAAID,YACF,IACE7e,OAAS+U,KAAKgK,MAAMF,aACpBf,QAAQ9d,QACR,MAAOgG,GACPpF,QAAQwZ,IAAI,0BAA2BpU,QAGzCpF,QAAQwZ,IAAI,iCACZ0D,QAAQ9d,UA6RXmT,SAAUgG","file":"bundle.min.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o\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 || arguments.callee;\n if (ssf && 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","module.exports = require('./lib/chai');\n","/*!\n * chai\n * Copyright(c) 2011-2014 Jake Luer \n * MIT Licensed\n */\n\nvar used = []\n , exports = module.exports = {};\n\n/*!\n * Chai version\n */\n\nexports.version = '3.5.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(this, util);\n used.push(fn);\n }\n\n return this;\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","/*!\n * chai\n * http://chaijs.com\n * Copyright(c) 2011-2014 Jake Luer \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 * @api private\n */\n\n function Assertion (obj, msg, stack) {\n flag(this, 'ssfi', stack || arguments.callee);\n flag(this, 'object', obj);\n flag(this, 'message', msg);\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 (true !== showDiff) showDiff = false;\n if (true !== config.showDiff) showDiff = false;\n\n if (!ok) {\n var msg = util.getMessage(this, arguments)\n , 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","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","/*!\n * chai\n * http://chaijs.com\n * Copyright(c) 2011-2014 Jake Luer \n * MIT Licensed\n */\n\nmodule.exports = function (chai, _) {\n var Assertion = chai.Assertion\n , toString = Object.prototype.toString\n , flag = _.flag;\n\n /**\n * ### Language Chains\n *\n * The following are provided as chainable getters to\n * improve the readability of your assertions. They\n * do not provide testing capabilities unless they\n * have been overwritten by a plugin.\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 *\n * @name language chains\n * @namespace BDD\n * @api public\n */\n\n [ 'to', 'be', 'been'\n , 'is', 'and', 'has', 'have'\n , 'with', 'that', 'which', 'at'\n , 'of', 'same' ].forEach(function (chain) {\n Assertion.addProperty(chain, function () {\n return this;\n });\n });\n\n /**\n * ### .not\n *\n * Negates any of assertions following in the chain.\n *\n * expect(foo).to.not.equal('bar');\n * expect(goodFn).to.not.throw(Error);\n * expect({ foo: 'baz' }).to.have.property('foo')\n * .and.not.equal('bar');\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 * Sets the `deep` flag, later used by the `equal` and\n * `property` assertions.\n *\n * expect(foo).to.deep.equal({ bar: 'baz' });\n * expect({ foo: { bar: { baz: 'quux' } } })\n * .to.have.deep.property('foo.bar.baz', 'quux');\n *\n * `.deep.property` special characters can be escaped\n * by adding two slashes before the `.` or `[]`.\n *\n * var deepCss = { '.link': { '[target]': 42 }};\n * expect(deepCss).to.have.deep.property('\\\\.link.\\\\[target\\\\]', 42);\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 * ### .any\n *\n * Sets the `any` flag, (opposite of the `all` flag)\n * later used in the `keys` assertion.\n *\n * expect(foo).to.have.any.keys('bar', 'baz');\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 /**\n * ### .all\n *\n * Sets the `all` flag (opposite of the `any` flag)\n * later used by the `keys` assertion.\n *\n * expect(foo).to.have.all.keys('bar', 'baz');\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)\n *\n * The `a` and `an` assertions are aliases that can be\n * used either as language chains or to assert a value's\n * type.\n *\n * // typeof\n * expect('test').to.be.a('string');\n * expect({ foo: 'bar' }).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(new Promise).to.be.a('promise');\n * expect(new Float32Array()).to.be.a('float32array');\n * expect(Symbol()).to.be.a('symbol');\n *\n * // es6 overrides\n * expect({[Symbol.toStringTag]:()=>'foo'}).to.be.a('foo');\n *\n * // language chain\n * expect(foo).to.be.an.instanceof(Foo);\n *\n * @name a\n * @alias an\n * @param {String} type\n * @param {String} message _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)\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(value)\n *\n * The `include` and `contain` assertions can be used as either property\n * based language chains or as methods to assert the inclusion of an object\n * in an array or a substring in a string. When used as language chains,\n * they toggle the `contains` flag for the `keys` assertion.\n *\n * expect([1,2,3]).to.include(2);\n * expect('foobar').to.contain('foo');\n * expect({ foo: 'bar', hello: 'universe' }).to.include.keys('foo');\n *\n * @name include\n * @alias contain\n * @alias includes\n * @alias contains\n * @param {Object|String|Number} obj\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function includeChainingBehavior () {\n flag(this, 'contains', true);\n }\n\n function include (val, msg) {\n _.expectTypes(this, ['array', 'object', 'string']);\n\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n var expected = false;\n\n if (_.type(obj) === 'array' && _.type(val) === 'object') {\n for (var i in obj) {\n if (_.eql(obj[i], val)) {\n expected = true;\n break;\n }\n }\n } else if (_.type(val) === 'object') {\n if (!flag(this, 'negate')) {\n for (var k in val) new Assertion(obj).property(k, val[k]);\n return;\n }\n var subset = {};\n for (var k in val) subset[k] = obj[k];\n expected = _.eql(subset, val);\n } else {\n expected = (obj != undefined) && ~obj.indexOf(val);\n }\n this.assert(\n expected\n , 'expected #{this} to include ' + _.inspect(val)\n , 'expected #{this} to not 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 truthy.\n *\n * expect('everything').to.be.ok;\n * expect(1).to.be.ok;\n * expect(false).to.not.be.ok;\n * expect(undefined).to.not.be.ok;\n * expect(null).to.not.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 `true`.\n *\n * expect(true).to.be.true;\n * expect(1).to.not.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 , this.negate ? false : true\n );\n });\n\n /**\n * ### .false\n *\n * Asserts that the target is `false`.\n *\n * expect(false).to.be.false;\n * expect(0).to.not.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 , this.negate ? true : false\n );\n });\n\n /**\n * ### .null\n *\n * Asserts that the target is `null`.\n *\n * expect(null).to.be.null;\n * expect(undefined).to.not.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 `undefined`.\n *\n * expect(undefined).to.be.undefined;\n * expect(null).to.not.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 * Asserts that the target is `NaN`.\n *\n * expect('foo').to.be.NaN;\n * expect(4).not.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 neither `null` nor `undefined`.\n *\n * var foo = 'hi'\n * , bar = null\n * , baz;\n *\n * expect(foo).to.exist;\n * expect(bar).to.not.exist;\n * expect(baz).to.not.exist;\n *\n * @name exist\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('exist', function () {\n this.assert(\n null != flag(this, 'object')\n , 'expected #{this} to exist'\n , 'expected #{this} to not exist'\n );\n });\n\n\n /**\n * ### .empty\n *\n * Asserts that the target's length is `0`. For arrays and strings, it checks\n * the `length` property. For objects, it gets the count of\n * enumerable keys.\n *\n * expect([]).to.be.empty;\n * expect('').to.be.empty;\n * expect({}).to.be.empty;\n *\n * @name empty\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('empty', function () {\n var obj = flag(this, 'object')\n , expected = obj;\n\n if (Array.isArray(obj) || 'string' === typeof object) {\n expected = obj.length;\n } else if (typeof obj === 'object') {\n expected = Object.keys(obj).length;\n }\n\n this.assert(\n !expected\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 * @name arguments\n * @alias Arguments\n * @namespace BDD\n * @api public\n */\n\n function checkArguments () {\n var obj = flag(this, 'object')\n , type = Object.prototype.toString.call(obj);\n this.assert(\n '[object 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(value)\n *\n * Asserts that the target is strictly equal (`===`) to `value`.\n * Alternately, if the `deep` flag is set, asserts that\n * the target is deeply equal to `value`.\n *\n * expect('hello').to.equal('hello');\n * expect(42).to.equal(42);\n * expect(1).to.not.equal(true);\n * expect({ foo: 'bar' }).to.not.equal({ foo: 'bar' });\n * expect({ foo: 'bar' }).to.deep.equal({ foo: 'bar' });\n *\n * @name equal\n * @alias equals\n * @alias eq\n * @alias deep.equal\n * @param {Mixed} value\n * @param {String} message _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 return this.eql(val);\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(value)\n *\n * Asserts that the target is deeply equal to `value`.\n *\n * expect({ foo: 'bar' }).to.eql({ foo: 'bar' });\n * expect([ 1, 2, 3 ]).to.eql([ 1, 2, 3 ]);\n *\n * @name eql\n * @alias eqls\n * @param {Mixed} value\n * @param {String} message _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(value)\n *\n * Asserts that the target is greater than `value`.\n *\n * expect(10).to.be.above(5);\n *\n * Can also be used in conjunction with `length` to\n * assert a minimum length. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.above(2);\n * expect([ 1, 2, 3 ]).to.have.length.above(2);\n *\n * @name above\n * @alias gt\n * @alias greaterThan\n * @param {Number} value\n * @param {String} message _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 if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len > n\n , 'expected #{this} to have a length above #{exp} but got #{act}'\n , 'expected #{this} to not have a length above #{exp}'\n , n\n , len\n );\n } else {\n this.assert(\n obj > n\n , 'expected #{this} to be above ' + n\n , 'expected #{this} to be at most ' + n\n );\n }\n }\n\n Assertion.addMethod('above', assertAbove);\n Assertion.addMethod('gt', assertAbove);\n Assertion.addMethod('greaterThan', assertAbove);\n\n /**\n * ### .least(value)\n *\n * Asserts that the target is greater than or equal to `value`.\n *\n * expect(10).to.be.at.least(10);\n *\n * Can also be used in conjunction with `length` to\n * assert a minimum length. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.of.at.least(2);\n * expect([ 1, 2, 3 ]).to.have.length.of.at.least(3);\n *\n * @name least\n * @alias gte\n * @param {Number} value\n * @param {String} message _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 if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len >= n\n , 'expected #{this} to have a length at least #{exp} but got #{act}'\n , 'expected #{this} to have a length below #{exp}'\n , n\n , len\n );\n } else {\n this.assert(\n obj >= n\n , 'expected #{this} to be at least ' + n\n , 'expected #{this} to be below ' + n\n );\n }\n }\n\n Assertion.addMethod('least', assertLeast);\n Assertion.addMethod('gte', assertLeast);\n\n /**\n * ### .below(value)\n *\n * Asserts that the target is less than `value`.\n *\n * expect(5).to.be.below(10);\n *\n * Can also be used in conjunction with `length` to\n * assert a maximum length. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.below(4);\n * expect([ 1, 2, 3 ]).to.have.length.below(4);\n *\n * @name below\n * @alias lt\n * @alias lessThan\n * @param {Number} value\n * @param {String} message _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 if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len < n\n , 'expected #{this} to have a length below #{exp} but got #{act}'\n , 'expected #{this} to not have a length below #{exp}'\n , n\n , len\n );\n } else {\n this.assert(\n obj < n\n , 'expected #{this} to be below ' + n\n , 'expected #{this} to be at least ' + n\n );\n }\n }\n\n Assertion.addMethod('below', assertBelow);\n Assertion.addMethod('lt', assertBelow);\n Assertion.addMethod('lessThan', assertBelow);\n\n /**\n * ### .most(value)\n *\n * Asserts that the target is less than or equal to `value`.\n *\n * expect(5).to.be.at.most(5);\n *\n * Can also be used in conjunction with `length` to\n * assert a maximum length. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.of.at.most(4);\n * expect([ 1, 2, 3 ]).to.have.length.of.at.most(3);\n *\n * @name most\n * @alias lte\n * @param {Number} value\n * @param {String} message _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 if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len <= n\n , 'expected #{this} to have a length at most #{exp} but got #{act}'\n , 'expected #{this} to have a length above #{exp}'\n , n\n , len\n );\n } else {\n this.assert(\n obj <= n\n , 'expected #{this} to be at most ' + n\n , 'expected #{this} to be above ' + n\n );\n }\n }\n\n Assertion.addMethod('most', assertMost);\n Assertion.addMethod('lte', assertMost);\n\n /**\n * ### .within(start, finish)\n *\n * Asserts that the target is within a range.\n *\n * expect(7).to.be.within(5,10);\n *\n * Can also be used in conjunction with `length` to\n * assert a length range. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.within(2,4);\n * expect([ 1, 2, 3 ]).to.have.length.within(2,4);\n *\n * @name within\n * @param {Number} start lowerbound inclusive\n * @param {Number} finish upperbound inclusive\n * @param {String} message _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 , range = start + '..' + finish;\n if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len >= start && len <= finish\n , 'expected #{this} to have a length within ' + range\n , 'expected #{this} to not have a length 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)\n *\n * Asserts that the target is an instance of `constructor`.\n *\n * var Tea = function (name) { this.name = name; }\n * , Chai = new Tea('chai');\n *\n * expect(Chai).to.be.an.instanceof(Tea);\n * expect([ 1, 2, 3 ]).to.be.instanceof(Array);\n *\n * @name instanceof\n * @param {Constructor} constructor\n * @param {String} message _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 var name = _.getName(constructor);\n this.assert(\n flag(this, 'object') instanceof constructor\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, [value])\n *\n * Asserts that the target has a property `name`, optionally asserting that\n * the value of that property is strictly equal to `value`.\n * If the `deep` flag is set, you can use dot- and bracket-notation for deep\n * references into objects and arrays.\n *\n * // simple referencing\n * var obj = { foo: 'bar' };\n * expect(obj).to.have.property('foo');\n * expect(obj).to.have.property('foo', 'bar');\n *\n * // deep referencing\n * var deepObj = {\n * green: { tea: 'matcha' }\n * , teas: [ 'chai', 'matcha', { tea: 'konacha' } ]\n * };\n *\n * expect(deepObj).to.have.deep.property('green.tea', 'matcha');\n * expect(deepObj).to.have.deep.property('teas[1]', 'matcha');\n * expect(deepObj).to.have.deep.property('teas[2].tea', 'konacha');\n *\n * You can also use an array as the starting point of a `deep.property`\n * assertion, or traverse nested arrays.\n *\n * var arr = [\n * [ 'chai', 'matcha', 'konacha' ]\n * , [ { tea: 'chai' }\n * , { tea: 'matcha' }\n * , { tea: 'konacha' } ]\n * ];\n *\n * expect(arr).to.have.deep.property('[0][1]', 'matcha');\n * expect(arr).to.have.deep.property('[1][2].tea', 'konacha');\n *\n * Furthermore, `property` changes the subject of the assertion\n * to be the value of that property from the original object. This\n * permits for further chainable assertions on that property.\n *\n * expect(obj).to.have.property('foo')\n * .that.is.a('string');\n * expect(deepObj).to.have.property('green')\n * .that.is.an('object')\n * .that.deep.equals({ tea: 'matcha' });\n * expect(deepObj).to.have.property('teas')\n * .that.is.an('array')\n * .with.deep.property('[2]')\n * .that.deep.equals({ tea: 'konacha' });\n *\n * Note that dots and bracket in `name` must be backslash-escaped when\n * the `deep` flag is set, while they must NOT be escaped when the `deep`\n * flag is not set.\n *\n * // simple referencing\n * var css = { '.link[target]': 42 };\n * expect(css).to.have.property('.link[target]', 42);\n *\n * // deep referencing\n * var deepCss = { '.link': { '[target]': 42 }};\n * expect(deepCss).to.have.deep.property('\\\\.link.\\\\[target\\\\]', 42);\n *\n * @name property\n * @alias deep.property\n * @param {String} name\n * @param {Mixed} value (optional)\n * @param {String} message _optional_\n * @returns value of property for chaining\n * @namespace BDD\n * @api public\n */\n\n Assertion.addMethod('property', function (name, val, msg) {\n if (msg) flag(this, 'message', msg);\n\n var isDeep = !!flag(this, 'deep')\n , descriptor = isDeep ? 'deep property ' : 'property '\n , negate = flag(this, 'negate')\n , obj = flag(this, 'object')\n , pathInfo = isDeep ? _.getPathInfo(name, obj) : null\n , hasProperty = isDeep\n ? pathInfo.exists\n : _.hasProperty(name, obj)\n , value = isDeep\n ? pathInfo.value\n : obj[name];\n\n if (negate && arguments.length > 1) {\n if (undefined === value) {\n msg = (msg != null) ? msg + ': ' : '';\n throw new Error(msg + _.inspect(obj) + ' has no ' + descriptor + _.inspect(name));\n }\n } else {\n this.assert(\n hasProperty\n , 'expected #{this} to have a ' + descriptor + _.inspect(name)\n , 'expected #{this} to not have ' + descriptor + _.inspect(name));\n }\n\n if (arguments.length > 1) {\n this.assert(\n val === value\n , 'expected #{this} to have a ' + descriptor + _.inspect(name) + ' of #{exp}, but got #{act}'\n , 'expected #{this} to not have a ' + descriptor + _.inspect(name) + ' of #{act}'\n , val\n , value\n );\n }\n\n flag(this, 'object', value);\n });\n\n\n /**\n * ### .ownProperty(name)\n *\n * Asserts that the target has an own property `name`.\n *\n * expect('test').to.have.ownProperty('length');\n *\n * @name ownProperty\n * @alias haveOwnProperty\n * @param {String} name\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertOwnProperty (name, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n this.assert(\n obj.hasOwnProperty(name)\n , 'expected #{this} to have own property ' + _.inspect(name)\n , 'expected #{this} to not have own property ' + _.inspect(name)\n );\n }\n\n Assertion.addMethod('ownProperty', assertOwnProperty);\n Assertion.addMethod('haveOwnProperty', assertOwnProperty);\n\n /**\n * ### .ownPropertyDescriptor(name[, descriptor[, message]])\n *\n * Asserts that the target has an own property descriptor `name`, that optionally matches `descriptor`.\n *\n * expect('test').to.have.ownPropertyDescriptor('length');\n * expect('test').to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 4 });\n * expect('test').not.to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 3 });\n * expect('test').ownPropertyDescriptor('length').to.have.property('enumerable', false);\n * expect('test').ownPropertyDescriptor('length').to.have.keys('value');\n *\n * @name ownPropertyDescriptor\n * @alias haveOwnPropertyDescriptor\n * @param {String} name\n * @param {Object} descriptor _optional_\n * @param {String} message _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 * ### .length\n *\n * Sets the `doLength` flag later used as a chain precursor to a value\n * comparison for the `length` property.\n *\n * expect('foo').to.have.length.above(2);\n * expect([ 1, 2, 3 ]).to.have.length.above(2);\n * expect('foo').to.have.length.below(4);\n * expect([ 1, 2, 3 ]).to.have.length.below(4);\n * expect('foo').to.have.length.within(2,4);\n * expect([ 1, 2, 3 ]).to.have.length.within(2,4);\n *\n * *Deprecation notice:* Using `length` as an assertion will be deprecated\n * in version 2.4.0 and removed in 3.0.0. Code using the old style of\n * asserting for `length` property value using `length(value)` should be\n * switched to use `lengthOf(value)` instead.\n *\n * @name length\n * @namespace BDD\n * @api public\n */\n\n /**\n * ### .lengthOf(value[, message])\n *\n * Asserts that the target's `length` property has\n * the expected value.\n *\n * expect([ 1, 2, 3]).to.have.lengthOf(3);\n * expect('foobar').to.have.lengthOf(6);\n *\n * @name lengthOf\n * @param {Number} length\n * @param {String} message _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 new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n\n this.assert(\n len == n\n , 'expected #{this} to have a length of #{exp} but got #{act}'\n , 'expected #{this} to not have a length of #{act}'\n , n\n , len\n );\n }\n\n Assertion.addChainableMethod('length', assertLength, assertLengthChain);\n Assertion.addMethod('lengthOf', assertLength);\n\n /**\n * ### .match(regexp)\n *\n * Asserts that the target matches a regular expression.\n *\n * expect('foobar').to.match(/^foo/);\n *\n * @name match\n * @alias matches\n * @param {RegExp} RegularExpression\n * @param {String} message _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(string)\n *\n * Asserts that the string target contains another string.\n *\n * expect('foobar').to.have.string('bar');\n *\n * @name string\n * @param {String} string\n * @param {String} message _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 new Assertion(obj, msg).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 /**\n * ### .keys(key1, [key2], [...])\n *\n * Asserts that the target contains any or all of the passed-in keys.\n * Use in combination with `any`, `all`, `contains`, or `have` will affect\n * what will pass.\n *\n * When used in conjunction with `any`, at least one key that is passed\n * in must exist in the target object. This is regardless whether or not\n * the `have` or `contain` qualifiers are used. Note, either `any` or `all`\n * should be used in the assertion. If neither are used, the assertion is\n * defaulted to `all`.\n *\n * When both `all` and `contain` are used, the target object must have at\n * least all of the passed-in keys but may have more keys not listed.\n *\n * When both `all` and `have` are used, the target object must both contain\n * all of the passed-in keys AND the number of keys in the target object must\n * match the number of keys passed in (in other words, a target object must\n * have all and only all of the passed-in keys).\n *\n * expect({ foo: 1, bar: 2 }).to.have.any.keys('foo', 'baz');\n * expect({ foo: 1, bar: 2 }).to.have.any.keys('foo');\n * expect({ foo: 1, bar: 2 }).to.contain.any.keys('bar', 'baz');\n * expect({ foo: 1, bar: 2 }).to.contain.any.keys(['foo']);\n * expect({ foo: 1, bar: 2 }).to.contain.any.keys({'foo': 6});\n * expect({ foo: 1, bar: 2 }).to.have.all.keys(['bar', 'foo']);\n * expect({ foo: 1, bar: 2 }).to.have.all.keys({'bar': 6, 'foo': 7});\n * expect({ foo: 1, bar: 2, baz: 3 }).to.contain.all.keys(['bar', 'foo']);\n * expect({ foo: 1, bar: 2, baz: 3 }).to.contain.all.keys({'bar': 6});\n *\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 , str\n , ok = true\n , mixedArgsMsg = 'keys must be given single argument of Array|Object|String, or multiple String arguments';\n\n switch (_.type(keys)) {\n case \"array\":\n if (arguments.length > 1) throw (new Error(mixedArgsMsg));\n break;\n case \"object\":\n if (arguments.length > 1) throw (new Error(mixedArgsMsg));\n keys = Object.keys(keys);\n break;\n default:\n keys = Array.prototype.slice.call(arguments);\n }\n\n if (!keys.length) throw new Error('keys required');\n\n var actual = Object.keys(obj)\n , expected = keys\n , len = keys.length\n , any = flag(this, 'any')\n , all = flag(this, 'all');\n\n if (!any && !all) {\n all = true;\n }\n\n // Has any\n if (any) {\n var intersection = expected.filter(function(key) {\n return ~actual.indexOf(key);\n });\n ok = intersection.length > 0;\n }\n\n // Has all\n if (all) {\n ok = keys.every(function(key){\n return ~actual.indexOf(key);\n });\n if (!flag(this, 'negate') && !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 ' + str\n , 'expected #{this} to not ' + str\n , expected.slice(0).sort()\n , actual.sort()\n , true\n );\n }\n\n Assertion.addMethod('keys', assertKeys);\n Assertion.addMethod('key', assertKeys);\n\n /**\n * ### .throw(constructor)\n *\n * Asserts that the function target will throw a specific error, or specific type of error\n * (as determined using `instanceof`), optionally with a RegExp or string inclusion test\n * for the error's message.\n *\n * var err = new ReferenceError('This is a bad function.');\n * var fn = function () { throw err; }\n * expect(fn).to.throw(ReferenceError);\n * expect(fn).to.throw(Error);\n * expect(fn).to.throw(/bad function/);\n * expect(fn).to.not.throw('good function');\n * expect(fn).to.throw(ReferenceError, /bad function/);\n * expect(fn).to.throw(err);\n *\n * Please note that when a throw expectation is negated, it will check each\n * parameter independently, starting with error constructor type. The appropriate way\n * to check for the existence of a type of error but for a message that does not match\n * is to use `and`.\n *\n * expect(fn).to.throw(ReferenceError)\n * .and.not.throw(/good function/);\n *\n * @name throw\n * @alias throws\n * @alias Throw\n * @param {ErrorConstructor} constructor\n * @param {String|RegExp} expected error message\n * @param {String} message _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 (constructor, errMsg, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n new Assertion(obj, msg).is.a('function');\n\n var thrown = false\n , desiredError = null\n , name = null\n , thrownError = null;\n\n if (arguments.length === 0) {\n errMsg = null;\n constructor = null;\n } else if (constructor && (constructor instanceof RegExp || 'string' === typeof constructor)) {\n errMsg = constructor;\n constructor = null;\n } else if (constructor && constructor instanceof Error) {\n desiredError = constructor;\n constructor = null;\n errMsg = null;\n } else if (typeof constructor === 'function') {\n name = constructor.prototype.name;\n if (!name || (name === 'Error' && constructor !== Error)) {\n name = constructor.name || (new constructor()).name;\n }\n } else {\n constructor = null;\n }\n\n try {\n obj();\n } catch (err) {\n // first, check desired error\n if (desiredError) {\n this.assert(\n err === desiredError\n , 'expected #{this} to throw #{exp} but #{act} was thrown'\n , 'expected #{this} to not throw #{exp}'\n , (desiredError instanceof Error ? desiredError.toString() : desiredError)\n , (err instanceof Error ? err.toString() : err)\n );\n\n flag(this, 'object', err);\n return this;\n }\n\n // next, check constructor\n if (constructor) {\n this.assert(\n err instanceof constructor\n , 'expected #{this} to throw #{exp} but #{act} was thrown'\n , 'expected #{this} to not throw #{exp} but #{act} was thrown'\n , name\n , (err instanceof Error ? err.toString() : err)\n );\n\n if (!errMsg) {\n flag(this, 'object', err);\n return this;\n }\n }\n\n // next, check message\n var message = 'error' === _.type(err) && \"message\" in err\n ? err.message\n : '' + err;\n\n if ((message != null) && errMsg && errMsg instanceof RegExp) {\n this.assert(\n errMsg.exec(message)\n , 'expected #{this} to throw error matching #{exp} but got #{act}'\n , 'expected #{this} to throw error not matching #{exp}'\n , errMsg\n , message\n );\n\n flag(this, 'object', err);\n return this;\n } else if ((message != null) && errMsg && 'string' === typeof errMsg) {\n this.assert(\n ~message.indexOf(errMsg)\n , 'expected #{this} to throw error including #{exp} but got #{act}'\n , 'expected #{this} to throw error not including #{act}'\n , errMsg\n , message\n );\n\n flag(this, 'object', err);\n return this;\n } else {\n thrown = true;\n thrownError = err;\n }\n }\n\n var actuallyGot = ''\n , expectedThrown = name !== null\n ? name\n : desiredError\n ? '#{exp}' //_.inspect(desiredError)\n : 'an error';\n\n if (thrown) {\n actuallyGot = ' but #{act} was thrown'\n }\n\n this.assert(\n thrown === true\n , 'expected #{this} to throw ' + expectedThrown + actuallyGot\n , 'expected #{this} to not throw ' + expectedThrown + actuallyGot\n , (desiredError instanceof Error ? desiredError.toString() : desiredError)\n , (thrownError instanceof Error ? thrownError.toString() : thrownError)\n );\n\n flag(this, 'object', thrownError);\n };\n\n Assertion.addMethod('throw', assertThrows);\n Assertion.addMethod('throws', assertThrows);\n Assertion.addMethod('Throw', assertThrows);\n\n /**\n * ### .respondTo(method)\n *\n * Asserts that the object or class target will respond to a method.\n *\n * Klass.prototype.bar = function(){};\n * expect(Klass).to.respondTo('bar');\n * expect(obj).to.respondTo('bar');\n *\n * To check if a constructor will respond to a static function,\n * set the `itself` flag.\n *\n * Klass.baz = function(){};\n * expect(Klass).itself.to.respondTo('baz');\n *\n * @name respondTo\n * @alias respondsTo\n * @param {String} method\n * @param {String} message _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' === _.type(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 * Sets the `itself` flag, later used by the `respondTo` assertion.\n *\n * function Foo() {}\n * Foo.bar = function() {}\n * Foo.prototype.baz = function() {}\n *\n * expect(Foo).itself.to.respondTo('bar');\n * expect(Foo).itself.not.to.respondTo('baz');\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(method)\n *\n * Asserts that the target passes a given truth test.\n *\n * expect(1).to.satisfy(function(num) { return num > 0; });\n *\n * @name satisfy\n * @alias satisfies\n * @param {Function} matcher\n * @param {String} message _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 , 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)\n *\n * Asserts that the target is equal `expected`, to within a +/- `delta` range.\n *\n * expect(1.5).to.be.closeTo(1, 0.5);\n *\n * @name closeTo\n * @alias approximately\n * @param {Number} expected\n * @param {Number} delta\n * @param {String} message _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\n new Assertion(obj, msg).is.a('number');\n if (_.type(expected) !== 'number' || _.type(delta) !== 'number') {\n throw new Error('the arguments to closeTo or approximately must be numbers');\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 function isSubsetOf(subset, superset, cmp) {\n return subset.every(function(elem) {\n if (!cmp) return superset.indexOf(elem) !== -1;\n\n return superset.some(function(elem2) {\n return cmp(elem, elem2);\n });\n })\n }\n\n /**\n * ### .members(set)\n *\n * Asserts that the target is a superset of `set`,\n * or that the target and `set` have the same strictly-equal (===) members.\n * Alternately, if the `deep` flag is set, set members are compared for deep\n * equality.\n *\n * expect([1, 2, 3]).to.include.members([3, 2]);\n * expect([1, 2, 3]).to.not.include.members([3, 2, 8]);\n *\n * expect([4, 2]).to.have.members([2, 4]);\n * expect([5, 2]).to.not.have.members([5, 2, 1]);\n *\n * expect([{ id: 1 }]).to.deep.include.members([{ id: 1 }]);\n *\n * @name members\n * @param {Array} set\n * @param {String} message _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\n new Assertion(obj).to.be.an('array');\n new Assertion(subset).to.be.an('array');\n\n var cmp = flag(this, 'deep') ? _.eql : undefined;\n\n if (flag(this, 'contains')) {\n return this.assert(\n isSubsetOf(subset, obj, cmp)\n , 'expected #{this} to be a superset of #{act}'\n , 'expected #{this} to not be a superset of #{act}'\n , obj\n , subset\n );\n }\n\n this.assert(\n isSubsetOf(obj, subset, cmp) && isSubsetOf(subset, obj, cmp)\n , 'expected #{this} to have the same members as #{act}'\n , 'expected #{this} to not have the same members as #{act}'\n , obj\n , subset\n );\n });\n\n /**\n * ### .oneOf(list)\n *\n * Assert that a value appears somewhere in the top level of array `list`.\n *\n * expect('a').to.be.oneOf(['a', 'b', 'c']);\n * expect(9).to.not.be.oneOf(['z']);\n * expect([3]).to.not.be.oneOf([1, 2, [3]]);\n *\n * var three = [3];\n * // for object-types, contents are not compared\n * expect(three).to.not.be.oneOf([1, 2, [3]]);\n * // comparing references works\n * expect(three).to.be.oneOf([1, 2, three]);\n *\n * @name oneOf\n * @param {Array<*>} list\n * @param {String} message _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 new Assertion(list).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 /**\n * ### .change(function)\n *\n * Asserts that a function changes an object property\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val += 3 };\n * var noChangeFn = function() { return 'foo' + 'bar'; }\n * expect(fn).to.change(obj, 'val');\n * expect(noChangeFn).to.not.change(obj, 'val')\n *\n * @name change\n * @alias changes\n * @alias Change\n * @param {String} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertChanges (object, prop, msg) {\n if (msg) flag(this, 'message', msg);\n var fn = flag(this, 'object');\n new Assertion(object, msg).to.have.property(prop);\n new Assertion(fn).is.a('function');\n\n var initial = object[prop];\n fn();\n\n this.assert(\n initial !== object[prop]\n , 'expected .' + prop + ' to change'\n , 'expected .' + prop + ' to not change'\n );\n }\n\n Assertion.addChainableMethod('change', assertChanges);\n Assertion.addChainableMethod('changes', assertChanges);\n\n /**\n * ### .increase(function)\n *\n * Asserts that a function increases an object property\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 15 };\n * expect(fn).to.increase(obj, 'val');\n *\n * @name increase\n * @alias increases\n * @alias Increase\n * @param {String} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertIncreases (object, prop, msg) {\n if (msg) flag(this, 'message', msg);\n var fn = flag(this, 'object');\n new Assertion(object, msg).to.have.property(prop);\n new Assertion(fn).is.a('function');\n\n var initial = object[prop];\n fn();\n\n this.assert(\n object[prop] - initial > 0\n , 'expected .' + prop + ' to increase'\n , 'expected .' + prop + ' to not increase'\n );\n }\n\n Assertion.addChainableMethod('increase', assertIncreases);\n Assertion.addChainableMethod('increases', assertIncreases);\n\n /**\n * ### .decrease(function)\n *\n * Asserts that a function decreases an object property\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 5 };\n * expect(fn).to.decrease(obj, 'val');\n *\n * @name decrease\n * @alias decreases\n * @alias Decrease\n * @param {String} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertDecreases (object, prop, msg) {\n if (msg) flag(this, 'message', msg);\n var fn = flag(this, 'object');\n new Assertion(object, msg).to.have.property(prop);\n new Assertion(fn).is.a('function');\n\n var initial = object[prop];\n fn();\n\n this.assert(\n object[prop] - initial < 0\n , 'expected .' + prop + ' to decrease'\n , 'expected .' + prop + ' to not decrease'\n );\n }\n\n Assertion.addChainableMethod('decrease', assertDecreases);\n Assertion.addChainableMethod('decreases', assertDecreases);\n\n /**\n * ### .extensible\n *\n * Asserts that the target is extensible (can have new properties added to\n * it).\n *\n * var nonExtensibleObject = Object.preventExtensions({});\n * var sealedObject = Object.seal({});\n * var frozenObject = Object.freeze({});\n *\n * expect({}).to.be.extensible;\n * expect(nonExtensibleObject).to.not.be.extensible;\n * expect(sealedObject).to.not.be.extensible;\n * expect(frozenObject).to.not.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 not an object (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 when a TypeError is thrown under ES5.\n\n var isExtensible;\n\n try {\n isExtensible = Object.isExtensible(obj);\n } catch (err) {\n if (err instanceof TypeError) isExtensible = false;\n else throw err;\n }\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 (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.freeze({});\n *\n * expect(sealedObject).to.be.sealed;\n * expect(frozenObject).to.be.sealed;\n * expect({}).to.not.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 not an object (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 when a TypeError is thrown under ES5.\n\n var isSealed;\n\n try {\n isSealed = Object.isSealed(obj);\n } catch (err) {\n if (err instanceof TypeError) isSealed = true;\n else throw err;\n }\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 (cannot have new properties added to it\n * and its existing properties cannot be modified).\n *\n * var frozenObject = Object.freeze({});\n *\n * expect(frozenObject).to.be.frozen;\n * expect({}).to.not.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 not an object (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 when a TypeError is thrown under ES5.\n\n var isFrozen;\n\n try {\n isFrozen = Object.isFrozen(obj);\n } catch (err) {\n if (err instanceof TypeError) isFrozen = true;\n else throw err;\n }\n\n this.assert(\n isFrozen\n , 'expected #{this} to be frozen'\n , 'expected #{this} to not be frozen'\n );\n });\n};\n","/*!\n * chai\n * Copyright(c) 2011-2014 Jake Luer \n * MIT Licensed\n */\n\n\nmodule.exports = function (chai, util) {\n\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);\n test.assert(\n express\n , errmsg\n , '[ negation message unavailable ]'\n );\n };\n\n /**\n * ### .fail(actual, expected, [message], [operator])\n *\n * Throw a failure. Node.js `assert` module-compatible.\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 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).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).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);\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 );\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);\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 );\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).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).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 * @namespace Assert\n * @api public\n */\n\n assert.deepEqual = function (act, exp, msg) {\n new Assertion(act, msg).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).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).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).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).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).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).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).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).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).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).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).to.not.equal(null);\n };\n\n /**\n * ### .isNaN\n * Asserts that value is NaN\n *\n * assert.isNaN('foo', 'foo 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).to.be.NaN;\n };\n\n /**\n * ### .isNotNaN\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).not.to.be.NaN;\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).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).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).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).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).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).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).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).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).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).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).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).to.not.be.a('number');\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).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).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).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).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).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).to.not.be.instanceOf(type);\n };\n\n /**\n * ### .include(haystack, needle, [message])\n *\n * Asserts that `haystack` includes `needle`. Works\n * for strings and arrays.\n *\n * assert.include('foobar', 'bar', 'foobar contains string \"bar\"');\n * assert.include([ 1, 2, 3 ], 3, 'array contains value');\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).include(inc);\n };\n\n /**\n * ### .notInclude(haystack, needle, [message])\n *\n * Asserts that `haystack` does not include `needle`. Works\n * for strings and arrays.\n *\n * assert.notInclude('foobar', 'baz', 'string not include substring');\n * assert.notInclude([ 1, 2, 3 ], 4, 'array not include contain value');\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).not.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).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).to.not.match(re);\n };\n\n /**\n * ### .property(object, property, [message])\n *\n * Asserts that `object` has a property named by `property`.\n *\n * assert.property({ tea: { green: 'matcha' }}, 'tea');\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).to.have.property(prop);\n };\n\n /**\n * ### .notProperty(object, property, [message])\n *\n * Asserts that `object` does _not_ have a property named 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).to.not.have.property(prop);\n };\n\n /**\n * ### .deepProperty(object, property, [message])\n *\n * Asserts that `object` has a property named by `property`, which can be a\n * string using dot- and bracket-notation for deep reference.\n *\n * assert.deepProperty({ tea: { green: 'matcha' }}, 'tea.green');\n *\n * @name deepProperty\n * @param {Object} object\n * @param {String} property\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.deepProperty = function (obj, prop, msg) {\n new Assertion(obj, msg).to.have.deep.property(prop);\n };\n\n /**\n * ### .notDeepProperty(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 deep reference.\n *\n * assert.notDeepProperty({ tea: { green: 'matcha' }}, 'tea.oolong');\n *\n * @name notDeepProperty\n * @param {Object} object\n * @param {String} property\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notDeepProperty = function (obj, prop, msg) {\n new Assertion(obj, msg).to.not.have.deep.property(prop);\n };\n\n /**\n * ### .propertyVal(object, property, value, [message])\n *\n * Asserts that `object` has a property named by `property` with value given\n * by `value`.\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).to.have.property(prop, val);\n };\n\n /**\n * ### .propertyNotVal(object, property, value, [message])\n *\n * Asserts that `object` has a property named by `property`, but with a value\n * different from that given by `value`.\n *\n * assert.propertyNotVal({ tea: 'is good' }, 'tea', 'is bad');\n *\n * @name propertyNotVal\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.propertyNotVal = function (obj, prop, val, msg) {\n new Assertion(obj, msg).to.not.have.property(prop, val);\n };\n\n /**\n * ### .deepPropertyVal(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 deep\n * reference.\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).to.have.deep.property(prop, val);\n };\n\n /**\n * ### .deepPropertyNotVal(object, property, value, [message])\n *\n * Asserts that `object` has a property named by `property`, but with a value\n * different from that given by `value`. `property` can use dot- and\n * bracket-notation for deep reference.\n *\n * assert.deepPropertyNotVal({ tea: { green: 'matcha' }}, 'tea.green', 'konacha');\n *\n * @name deepPropertyNotVal\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.deepPropertyNotVal = function (obj, prop, val, msg) {\n new Assertion(obj, msg).to.not.have.deep.property(prop, val);\n };\n\n /**\n * ### .lengthOf(object, length, [message])\n *\n * Asserts that `object` has a `length` property 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 *\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).to.have.length(len);\n };\n\n /**\n * ### .throws(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 * assert.throws(fn, 'function throws a reference error');\n * assert.throws(fn, /function throws a reference error/);\n * assert.throws(fn, ReferenceError);\n * assert.throws(fn, ReferenceError, 'function throws a reference error');\n * assert.throws(fn, ReferenceError, /function throws a reference error/);\n *\n * @name throws\n * @alias 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 Assert\n * @api public\n */\n\n assert.throws = function (fn, errt, errs, msg) {\n if ('string' === typeof errt || errt instanceof RegExp) {\n errs = errt;\n errt = null;\n }\n\n var assertErr = new Assertion(fn, msg).to.throw(errt, errs);\n return flag(assertErr, 'object');\n };\n\n /**\n * ### .doesNotThrow(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 * assert.doesNotThrow(fn, Error, 'function does not throw');\n *\n * @name doesNotThrow\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 Assert\n * @api public\n */\n\n assert.doesNotThrow = function (fn, type, msg) {\n if ('string' === typeof type) {\n msg = type;\n type = null;\n }\n\n new Assertion(fn, msg).to.not.Throw(type);\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 throw new Error('Invalid operator \"' + operator + '\"');\n }\n var test = new Assertion(ok, msg);\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).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).to.be.approximately(exp, delta);\n };\n\n /**\n * ### .sameMembers(set1, set2, [message])\n *\n * Asserts that `set1` and `set2` have the same members.\n * Order is not taken into account.\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).to.have.same.members(set2);\n }\n\n /**\n * ### .sameDeepMembers(set1, set2, [message])\n *\n * Asserts that `set1` and `set2` have the same members - using a deep equality checking.\n * Order is not taken into account.\n *\n * assert.sameDeepMembers([ {b: 3}, {a: 2}, {c: 5} ], [ {c: 5}, {b: 3}, {a: 2} ], '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).to.have.same.deep.members(set2);\n }\n\n /**\n * ### .includeMembers(superset, subset, [message])\n *\n * Asserts that `subset` is included in `superset`.\n * Order is not taken into account.\n *\n * assert.includeMembers([ 1, 2, 3 ], [ 2, 1 ], '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).to.include.members(subset);\n }\n\n /**\n * ### .includeDeepMembers(superset, subset, [message])\n *\n * Asserts that `subset` is included in `superset` - using deep equality checking.\n * Order is not taken into account.\n * 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).to.include.deep.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).to.be.oneOf(list);\n }\n\n /**\n * ### .changes(function, object, property)\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\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.changes = function (fn, obj, prop) {\n new Assertion(fn).to.change(obj, prop);\n }\n\n /**\n * ### .doesNotChange(function, object, property)\n *\n * Asserts that a function does not changes 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\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotChange = function (fn, obj, prop) {\n new Assertion(fn).to.not.change(obj, prop);\n }\n\n /**\n * ### .increases(function, object, property)\n *\n * Asserts that a function increases an 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\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.increases = function (fn, obj, prop) {\n new Assertion(fn).to.increase(obj, prop);\n }\n\n /**\n * ### .doesNotIncrease(function, object, property)\n *\n * Asserts that a function does not increase 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\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotIncrease = function (fn, obj, prop) {\n new Assertion(fn).to.not.increase(obj, prop);\n }\n\n /**\n * ### .decreases(function, object, property)\n *\n * Asserts that a function decreases an 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\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.decreases = function (fn, obj, prop) {\n new Assertion(fn).to.decrease(obj, prop);\n }\n\n /**\n * ### .doesNotDecrease(function, object, property)\n *\n * Asserts that a function does not decreases an 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\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotDecrease = function (fn, obj, prop) {\n new Assertion(fn).to.not.decrease(obj, prop);\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).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.freese({});\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).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).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).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).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).to.not.be.frozen;\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};\n","/*!\n * chai\n * Copyright(c) 2011-2014 Jake Luer \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(actual, expected, [message], [operator])\n *\n * Throw a failure.\n *\n * @name fail\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @param {String} operator\n * @namespace Expect\n * @api public\n */\n\n chai.expect.fail = function (actual, expected, message, operator) {\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 \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 || this instanceof Number || this instanceof Boolean ) {\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(actual, expected, [message], [operator])\n *\n * Throw a failure.\n *\n * @name fail\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @param {String} operator\n * @namespace Should\n * @api public\n */\n\n should.fail = function (actual, expected, message, operator) {\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 - addChainingMethod utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Module dependencies\n */\n\nvar transferFlags = require('./transferFlags');\nvar flag = require('./flag');\nvar config = require('../config');\n\n/*!\n * Module variables\n */\n\n// Check whether `__proto__` is supported\nvar hasProtoSupport = '__proto__' in Object;\n\n// Without `__proto__` support, this module will need to add properties to a function.\n// However, some Function.prototype methods cannot be overwritten,\n// and there seems no easy cross-platform way to detect them (@see chaijs/chai/issues/69).\nvar excludeNames = /^(?:length|name|arguments|caller)$/;\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 (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 () {\n chainableBehavior.chainingBehavior.call(this);\n\n var assert = function assert() {\n var old_ssfi = flag(this, 'ssfi');\n if (old_ssfi && config.includeStack === false)\n flag(this, 'ssfi', assert);\n var result = chainableBehavior.method.apply(this, arguments);\n return result === undefined ? this : result;\n };\n\n // Use `__proto__` if available\n if (hasProtoSupport) {\n // Inherit all properties from the object by replacing the `Function` prototype\n var prototype = assert.__proto__ = Object.create(this);\n // Restore the `call` and `apply` methods from `Function`\n prototype.call = call;\n prototype.apply = apply;\n }\n // Otherwise, redefine all properties (slow!)\n else {\n var asserterNames = Object.getOwnPropertyNames(ctx);\n asserterNames.forEach(function (asserterName) {\n if (!excludeNames.test(asserterName)) {\n var pd = Object.getOwnPropertyDescriptor(ctx, asserterName);\n Object.defineProperty(assert, asserterName, pd);\n }\n });\n }\n\n transferFlags(this, assert);\n return assert;\n }\n , configurable: true\n });\n};\n","/*!\n * Chai - addMethod utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\nvar config = require('../config');\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 */\nvar flag = require('./flag');\n\nmodule.exports = function (ctx, name, method) {\n ctx[name] = function () {\n var old_ssfi = flag(this, 'ssfi');\n if (old_ssfi && config.includeStack === false)\n flag(this, 'ssfi', ctx[name]);\n var result = method.apply(this, arguments);\n return result === undefined ? this : result;\n };\n};\n","/*!\n * Chai - addProperty utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\nvar config = require('../config');\nvar flag = require('./flag');\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 (ctx, name, getter) {\n Object.defineProperty(ctx, name,\n { get: function addProperty() {\n var old_ssfi = flag(this, 'ssfi');\n if (old_ssfi && config.includeStack === false)\n flag(this, 'ssfi', addProperty);\n\n var result = getter.call(this);\n return result === undefined ? this : result;\n }\n , configurable: true\n });\n};\n","/*!\n * Chai - expectTypes utility\n * Copyright(c) 2012-2014 Jake Luer \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 (obj, types) {\n var obj = flag(obj, 'object');\n types = types.map(function (t) { return t.toLowerCase(); });\n types.sort();\n\n // Transforms ['lorem', 'ipsum'] into 'a lirum, 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 if (!types.some(function (expected) { return type(obj) === expected; })) {\n throw new AssertionError(\n 'object tested must be ' + str + ', but ' + type(obj) + ' given'\n );\n }\n};\n","/*!\n * Chai - flag utility\n * Copyright(c) 2012-2014 Jake Luer \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 (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 - getActual utility\n * Copyright(c) 2012-2014 Jake Luer \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 (obj, args) {\n return args.length > 4 ? args[4] : obj._obj;\n};\n","/*!\n * Chai - getEnumerableProperties utility\n * Copyright(c) 2012-2014 Jake Luer \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","/*!\n * Chai - message composition utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Module dependancies\n */\n\nvar flag = require('./flag')\n , getActual = require('./getActual')\n , inspect = require('./inspect')\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 (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 - getName utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * # getName(func)\n *\n * Gets the name of a function, in a cross-browser way.\n *\n * @param {Function} a function (usually a constructor)\n * @namespace Utils\n * @name getName\n */\n\nmodule.exports = function (func) {\n if (func.name) return func.name;\n\n var match = /^\\s?function ([^(]*)\\(/.exec(func);\n return match && match[1] ? match[1] : \"\";\n};\n","/*!\n * Chai - getPathInfo utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\nvar hasProperty = require('./hasProperty');\n\n/**\n * ### .getPathInfo(path, object)\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 {String} path\n * @param {Object} object\n * @returns {Object} info\n * @namespace Utils\n * @name getPathInfo\n * @api public\n */\n\nmodule.exports = function getPathInfo(path, obj) {\n var parsed = parsePath(path),\n last = parsed[parsed.length - 1];\n\n var info = {\n parent: parsed.length > 1 ? _getPathValue(parsed, obj, parsed.length - 1) : obj,\n name: last.p || last.i,\n value: _getPathValue(parsed, obj)\n };\n info.exists = hasProperty(info.name, info.parent);\n\n return info;\n};\n\n\n/*!\n * ## parsePath(path)\n *\n * Helper function used to parse string object\n * paths. Use in conjunction with `_getPathValue`.\n *\n * var parsed = parsePath('myobject.property.subprop');\n *\n * ### Paths:\n *\n * * Can be as near 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 , parts = str.match(/(\\\\\\.|[^.]+?)+/g);\n return parts.map(function (value) {\n var re = /^\\[(\\d+)\\]$/\n , mArr = re.exec(value);\n if (mArr) return { i: parseFloat(mArr[1]) };\n else return { p: value.replace(/\\\\([.\\[\\]])/g, '$1') };\n });\n}\n\n\n/*!\n * ## _getPathValue(parsed, obj)\n *\n * Helper companion function for `.parsePath` that returns\n * the value located at the parsed address.\n *\n * var value = getPathValue(parsed, obj);\n *\n * @param {Object} parsed definition from `parsePath`.\n * @param {Object} object to search against\n * @param {Number} object to search against\n * @returns {Object|Undefined} value\n * @api private\n */\n\nfunction _getPathValue (parsed, obj, index) {\n var tmp = obj\n , res;\n\n index = (index === undefined ? parsed.length : index);\n\n for (var i = 0, l = index; i < l; i++) {\n var part = parsed[i];\n if (tmp) {\n if ('undefined' !== typeof part.p)\n tmp = tmp[part.p];\n else if ('undefined' !== typeof part.i)\n tmp = tmp[part.i];\n if (i == (l - 1)) res = tmp;\n } else {\n res = undefined;\n }\n }\n return res;\n}\n","/*!\n * Chai - getPathValue utility\n * Copyright(c) 2012-2014 Jake Luer \n * @see https://github.com/logicalparadox/filtr\n * MIT Licensed\n */\n\nvar getPathInfo = require('./getPathInfo');\n\n/**\n * ### .getPathValue(path, object)\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('prop1.str', obj); // Hello\n * getPathValue('prop1.att[2]', obj); // b\n * getPathValue('prop2.arr[0].nested', obj); // Universe\n *\n * @param {String} path\n * @param {Object} object\n * @returns {Object} value or `undefined`\n * @namespace Utils\n * @name getPathValue\n * @api public\n */\nmodule.exports = function(path, obj) {\n var info = getPathInfo(path, obj);\n return info.value;\n};\n","/*!\n * Chai - getProperties utility\n * Copyright(c) 2012-2014 Jake Luer \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 - hasProperty utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\nvar type = require('type-detect');\n\n/**\n * ### .hasProperty(object, name)\n *\n * This allows checking whether an object has\n * named property or numeric array index.\n *\n * Basically does the same thing as the `in`\n * operator but works properly with natives\n * and null/undefined values.\n *\n * var obj = {\n * arr: ['a', 'b', 'c']\n * , str: 'Hello'\n * }\n *\n * The following would be the results.\n *\n * hasProperty('str', obj); // true\n * hasProperty('constructor', obj); // true\n * hasProperty('bar', obj); // false\n *\n * hasProperty('length', obj.str); // true\n * hasProperty(1, obj.str); // true\n * hasProperty(5, obj.str); // false\n *\n * hasProperty('length', obj.arr); // true\n * hasProperty(2, obj.arr); // true\n * hasProperty(3, obj.arr); // false\n *\n * @param {Objuect} object\n * @param {String|Number} name\n * @returns {Boolean} whether it exists\n * @namespace Utils\n * @name getPathInfo\n * @api public\n */\n\nvar literals = {\n 'number': Number\n , 'string': String\n};\n\nmodule.exports = function hasProperty(name, obj) {\n var ot = type(obj);\n\n // Bad Object, obviously no props at all\n if(ot === 'null' || ot === 'undefined')\n return false;\n\n // The `in` operator does not work with certain literals\n // box these before the check\n if(literals[ot] && typeof obj !== 'object')\n obj = new literals[ot](obj);\n\n return name in obj;\n};\n","/*!\n * chai\n * Copyright(c) 2011 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Main exports\n */\n\nvar exports = module.exports = {};\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 value\n */\n\nexports.getPathValue = require('./getPathValue');\n\n/*!\n * Deep path info\n */\n\nexports.getPathInfo = require('./getPathInfo');\n\n/*!\n * Check if a property exists\n */\n\nexports.hasProperty = require('./hasProperty');\n\n/*!\n * Function name\n */\n\nexports.getName = require('./getName');\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","// This is (almost) directly from Node.js utils\n// https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/util.js\n\nvar getName = require('./getName');\nvar getProperties = require('./getProperties');\nvar getEnumerableProperties = require('./getEnumerableProperties');\n\nmodule.exports = inspect;\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 {Boolean} showHidden Flag that shows hidden (not enumerable)\n * properties of objects.\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 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);\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 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 // Some type of object without properties can be shortcutted.\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 var name = getName(value);\n var 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 = '', 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 (typeof value === 'function') {\n var name = getName(value);\n var 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 {\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 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 // For some reason typeof null is \"object\", so special case here.\n if (value === null) {\n return ctx.stylize('null', 'null');\n }\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 (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 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;\n if (value.__lookupGetter__) {\n if (value.__lookupGetter__(key)) {\n if (value.__lookupSetter__(key)) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (value.__lookupSetter__(key)) {\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\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.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 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 \n * MIT Licensed\n */\n\n/*!\n * Module dependancies\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 (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 - overwriteChainableMethod utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * ### overwriteChainableMethod (ctx, name, method, chainingBehavior)\n *\n * Overwites 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, 'length',\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.length(3);\n * expect(myFoo).to.have.length.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 (ctx, name, method, chainingBehavior) {\n var chainableBehavior = ctx.__methods[name];\n\n var _chainingBehavior = chainableBehavior.chainingBehavior;\n chainableBehavior.chainingBehavior = function () {\n var result = chainingBehavior(_chainingBehavior).call(this);\n return result === undefined ? this : result;\n };\n\n var _method = chainableBehavior.method;\n chainableBehavior.method = function () {\n var result = method(_method).apply(this, arguments);\n return result === undefined ? this : result;\n };\n};\n","/*!\n * Chai - overwriteMethod utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * ### overwriteMethod (ctx, name, fn)\n *\n * Overwites 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 (ctx, name, method) {\n var _method = ctx[name]\n , _super = function () { return this; };\n\n if (_method && 'function' === typeof _method)\n _super = _method;\n\n ctx[name] = function () {\n var result = method(_super).apply(this, arguments);\n return result === undefined ? this : result;\n }\n};\n","/*!\n * Chai - overwriteProperty utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * ### overwriteProperty (ctx, name, fn)\n *\n * Overwites 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 (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 () {\n var result = getter(_super).call(this);\n return result === undefined ? this : result;\n }\n , configurable: true\n });\n};\n","/*!\n * Chai - test utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Module dependancies\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 (obj, args) {\n var negate = flag(obj, 'negate')\n , expr = args[0];\n return negate ? !expr : expr;\n};\n","/*!\n * Chai - transferFlags utility\n * Copyright(c) 2012-2014 Jake Luer \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`, and `message`)\n * will not be transferred.\n *\n *\n * var newAssertion = new Assertion();\n * utils.transferFlags(assertion, newAssertion);\n *\n * var anotherAsseriton = 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 (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 != 'message')) {\n object.__flags[flag] = flags[flag];\n }\n }\n};\n","\"use strict\";\n\nfunction dedent(strings) {\n\n var raw = void 0;\n if (typeof strings === \"string\") {\n // dedent can be used as a plain function\n raw = [strings];\n } else {\n raw = strings.raw;\n }\n\n // first, perform interpolation\n var result = \"\";\n for (var i = 0; i < raw.length; i++) {\n result += raw[i].\n // join lines when there is a suppressed newline\n replace(/\\\\\\n[ \\t]*/g, \"\").\n\n // handle escaped backticks\n replace(/\\\\`/g, \"`\");\n\n if (i < (arguments.length <= 1 ? 0 : arguments.length - 1)) {\n result += arguments.length <= i + 1 ? undefined : arguments[i + 1];\n }\n }\n\n // now strip indentation\n var lines = result.split(\"\\n\");\n var mindent = null;\n lines.forEach(function (l) {\n var m = l.match(/^(\\s+)\\S+/);\n if (m) {\n var indent = m[1].length;\n if (!mindent) {\n // this is the first indented line\n mindent = indent;\n } else {\n mindent = Math.min(mindent, indent);\n }\n }\n });\n\n if (mindent !== null) {\n result = lines.map(function (l) {\n return l[0] === \" \" ? l.slice(mindent) : l;\n }).join(\"\\n\");\n }\n\n // dedent eats leading and trailing whitespace too\n result = result.trim();\n\n // handle escaped newlines at the end to ensure they don't get stripped too\n return result.replace(/\\\\n/g, \"\\n\");\n}\n\nif (typeof module !== \"undefined\") {\n module.exports = dedent;\n}\n","module.exports = require('./lib/eql');\n","/*!\n * deep-eql\n * Copyright(c) 2013 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Module dependencies\n */\n\nvar type = require('type-detect');\n\n/*!\n * Buffer.isBuffer browser shim\n */\n\nvar Buffer;\ntry { Buffer = require('buffer').Buffer; }\ncatch(ex) {\n Buffer = {};\n Buffer.isBuffer = function() { return false; }\n}\n\n/*!\n * Primary Export\n */\n\nmodule.exports = deepEqual;\n\n/**\n * Assert super-strict (egal) equality between\n * two objects of any type.\n *\n * @param {Mixed} a\n * @param {Mixed} b\n * @param {Array} memoised (optional)\n * @return {Boolean} equal match\n */\n\nfunction deepEqual(a, b, m) {\n if (sameValue(a, b)) {\n return true;\n } else if ('date' === type(a)) {\n return dateEqual(a, b);\n } else if ('regexp' === type(a)) {\n return regexpEqual(a, b);\n } else if (Buffer.isBuffer(a)) {\n return bufferEqual(a, b);\n } else if ('arguments' === type(a)) {\n return argumentsEqual(a, b, m);\n } else if (!typeEqual(a, b)) {\n return false;\n } else if (('object' !== type(a) && 'object' !== type(b))\n && ('array' !== type(a) && 'array' !== type(b))) {\n return sameValue(a, b);\n } else {\n return objectEqual(a, b, m);\n }\n}\n\n/*!\n * Strict (egal) equality test. Ensures that NaN always\n * equals NaN and `-0` does not equal `+0`.\n *\n * @param {Mixed} a\n * @param {Mixed} b\n * @return {Boolean} equal match\n */\n\nfunction sameValue(a, b) {\n if (a === b) return a !== 0 || 1 / a === 1 / b;\n return a !== a && b !== b;\n}\n\n/*!\n * Compare the types of two given objects and\n * return if they are equal. Note that an Array\n * has a type of `array` (not `object`) and arguments\n * have a type of `arguments` (not `array`/`object`).\n *\n * @param {Mixed} a\n * @param {Mixed} b\n * @return {Boolean} result\n */\n\nfunction typeEqual(a, b) {\n return type(a) === type(b);\n}\n\n/*!\n * Compare two Date objects by asserting that\n * the time values are equal using `saveValue`.\n *\n * @param {Date} a\n * @param {Date} b\n * @return {Boolean} result\n */\n\nfunction dateEqual(a, b) {\n if ('date' !== type(b)) return false;\n return sameValue(a.getTime(), b.getTime());\n}\n\n/*!\n * Compare two regular expressions by converting them\n * to string and checking for `sameValue`.\n *\n * @param {RegExp} a\n * @param {RegExp} b\n * @return {Boolean} result\n */\n\nfunction regexpEqual(a, b) {\n if ('regexp' !== type(b)) return false;\n return sameValue(a.toString(), b.toString());\n}\n\n/*!\n * Assert deep equality of two `arguments` objects.\n * Unfortunately, these must be sliced to arrays\n * prior to test to ensure no bad behavior.\n *\n * @param {Arguments} a\n * @param {Arguments} b\n * @param {Array} memoize (optional)\n * @return {Boolean} result\n */\n\nfunction argumentsEqual(a, b, m) {\n if ('arguments' !== type(b)) return false;\n a = [].slice.call(a);\n b = [].slice.call(b);\n return deepEqual(a, b, m);\n}\n\n/*!\n * Get enumerable properties of a given object.\n *\n * @param {Object} a\n * @return {Array} property names\n */\n\nfunction enumerable(a) {\n var res = [];\n for (var key in a) res.push(key);\n return res;\n}\n\n/*!\n * Simple equality for flat iterable objects\n * such as Arrays or Node.js buffers.\n *\n * @param {Iterable} a\n * @param {Iterable} b\n * @return {Boolean} result\n */\n\nfunction iterableEqual(a, b) {\n if (a.length !== b.length) return false;\n\n var i = 0;\n var match = true;\n\n for (; i < a.length; i++) {\n if (a[i] !== b[i]) {\n match = false;\n break;\n }\n }\n\n return match;\n}\n\n/*!\n * Extension to `iterableEqual` specifically\n * for Node.js Buffers.\n *\n * @param {Buffer} a\n * @param {Mixed} b\n * @return {Boolean} result\n */\n\nfunction bufferEqual(a, b) {\n if (!Buffer.isBuffer(b)) return false;\n return iterableEqual(a, b);\n}\n\n/*!\n * Block for `objectEqual` ensuring non-existing\n * values don't get in.\n *\n * @param {Mixed} object\n * @return {Boolean} result\n */\n\nfunction isValue(a) {\n return a !== null && a !== undefined;\n}\n\n/*!\n * Recursively check the equality of two objects.\n * Once basic sameness has been established it will\n * defer to `deepEqual` for each enumerable key\n * in the object.\n *\n * @param {Mixed} a\n * @param {Mixed} b\n * @return {Boolean} result\n */\n\nfunction objectEqual(a, b, m) {\n if (!isValue(a) || !isValue(b)) {\n return false;\n }\n\n if (a.prototype !== b.prototype) {\n return false;\n }\n\n var i;\n if (m) {\n for (i = 0; i < m.length; i++) {\n if ((m[i][0] === a && m[i][1] === b)\n || (m[i][0] === b && m[i][1] === a)) {\n return true;\n }\n }\n } else {\n m = [];\n }\n\n try {\n var ka = enumerable(a);\n var kb = enumerable(b);\n } catch (ex) {\n return false;\n }\n\n ka.sort();\n kb.sort();\n\n if (!iterableEqual(ka, kb)) {\n return false;\n }\n\n m.push([ a, b ]);\n\n var key;\n for (i = ka.length - 1; i >= 0; i--) {\n key = ka[i];\n if (!deepEqual(a[key], b[key], m)) {\n return false;\n }\n }\n\n return true;\n}\n","const initial = require('./problems/initial');\nconst arrays = require('./problems/arrays');\n\nmodule.exports = {\n initial: initial,\n arrays: arrays\n};\n","module.exports = [\n {\n name: 'Access Array by index (first)',\n time: 10,\n prompt: 'Return the first value of the Array',\n given: `const fruits = ['apple', 'banana'];\\r`,\n answer: `const fruits = ['apple', 'banana'];\n return fruits[0];`,\n tests: [\n {\n name: 'Correct output',\n test: 'assert.deepEqual(output, \\'apple\\') === undefined'\n },\n {\n name: 'Returns a String',\n test: 'assert.isString(output) === undefined'\n }\n ]\n },\n {\n name: 'Access Array by index (last)',\n time: 10,\n prompt: 'Return the last value of the Array',\n given: `const fruits = ['apple', 'banana', 'orange'];\\r`,\n answer: `const fruits = ['apple', 'banana', 'orange'];\n return fruits[fruits.length - 1];`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, 'orange') === undefined;`\n },\n {\n name: 'Returns a String',\n test: `assert.isString(output) === undefined;`\n }\n ]\n },\n {\n name: 'Access Array by index (second)',\n time: 10,\n prompt: 'Return the second value of the Array',\n given: `const fruits = ['apple', 'banana'];\\r`,\n answer: `const fruits = ['apple', 'banana'];\n return fruits[1];`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, 'banana') === undefined;`\n },\n {\n name: 'Returns a String',\n test: `assert.isString(output) === undefined;`\n }\n ]\n },\n {\n name: 'Array.forEach()',\n time: 20,\n prompt: 'Loop over the array, add an \\'x\\' to the end of each name, push each fruit into a new array, then return the new array.',\n given: `const fruits = ['apple', 'banana'];\\r`,\n answer: `const fruits = ['apple', 'banana'];\n const newFruits = [];\n fruits.forEach(function(item) {\n newFruits.push(item+'x');\n });\n return newFruits;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, ['applex', 'bananax']) === undefined;`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 2 items',\n test: `assert.lengthOf(output, 2) === undefined;`\n }\n ]\n },\n {\n name: 'Array.push()',\n time: 10,\n prompt: `Add 'orange' to the end of the 'fruits' array and return 'fruits'.`,\n given: `const fruits = ['apple', 'banana'];\\r`,\n answer: `const fruits = ['apple', 'banana'];\n fruits.push('orange');\n return fruits;`,\n tests: [\n {\n name: 'Correct output',\n test: `(assert.deepEqual(output, ['apple', 'banana', 'orange']) === undefined);`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 3 items',\n test: `assert.lengthOf(output, 3) === undefined;`\n }\n ]\n },\n {\n name: 'Array.shift()',\n time: 10,\n prompt: `Remove 'apple' from the front of the 'fruits' array and return 'fruits'.`,\n given: `const fruits = ['apple', 'banana', 'orange'];\\r`,\n answer: `const fruits = ['apple', 'banana', 'orange'];\n fruits.shift();\n return fruits;`,\n tests: [\n {\n name: 'Output must be correct',\n test: `assert.deepEqual(output, ['banana', 'orange']) === undefined;`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 2 items',\n test: `assert.lengthOf(output, 2) === undefined;`\n }\n ]\n },\n {\n name: 'Array.unshift()',\n time: 10,\n prompt: `Add 'strawberry' to the front of the 'fruits' array and return 'fruits'.`,\n given: `const fruits = ['apple', 'banana', 'orange'];\\r`,\n answer: `const fruits = ['apple', 'banana', 'orange'];\n fruits.unshift('strawberry');\n return fruits;`,\n tests: [\n {\n name: 'Output must be correct',\n test: `(assert.deepEqual(output, [\n 'strawberry',\n 'apple',\n 'banana',\n 'orange'\n ]) === undefined)`\n },\n {\n name: 'Must return an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 4 items',\n test: `assert.lengthOf(output, 4) === undefined;`\n }\n ]\n },\n {\n name: 'Array.indexOf()',\n time: 10,\n prompt: `Return the index of 'banana' in the Array.`,\n given: `const fruits = ['strawberry', 'banana', 'mango'];\\r`,\n answer: `const fruits = ['strawberry', 'banana', 'mango'];\n const ind = fruits.indexOf('banana');\n return ind;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, 1) === undefined;`\n },\n {\n name: 'Returns a Number',\n test: `assert.isNumber(output) === undefined;`\n }\n ]\n },\n {\n name: 'Array.concat()',\n time: 10,\n prompt: `Merge the two arrays using Array's 'concat()' method. Return the resulting array.`,\n given: `const fruits = ['strawberry', 'banana'];\\rconst otherFruits = ['pear','peach'];\\r`,\n answer: `const fruits = ['strawberry', 'banana'];\n const otherFruits = ['pear','peach'];\n const allTheFruits = fruits.concat(otherFruits);\n return allTheFruits;\\r`,\n tests: [\n {\n name: 'Correct output',\n test: `(assert.deepEqual(output, [\n 'strawberry',\n 'banana',\n 'pear',\n 'peach'\n ]) === undefined\n );`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 4 items',\n test: `assert.lengthOf(output, 4) === undefined;`\n }\n ]\n },\n {\n name: 'Array.join()',\n time: 10,\n prompt: `Mix the two flavors with a '-' using Array's 'join' method. Return the resulting hybrid flavor.`,\n given: `const fruits = ['strawberry', 'banana'];\\r`,\n answer: `const fruits = ['strawberry', 'banana'];\n const hybrid = fruits.join('-');\n return hybrid;\\r`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, 'strawberry-banana') === undefined;`\n },\n {\n name: 'Returns a String',\n test: `assert.isString(output) === undefined;`\n }\n ]\n },\n {\n name: 'Array.slice()',\n time: 20,\n prompt: `Return just the citrus fruits from the 'fruits' array using 'Array.slice()'`,\n given: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\\r`,\n answer: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\n const citrus = fruits.slice(1, 3);\n return citrus;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, ['orange', 'lemon']) === undefined;`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 2 items',\n test: `assert.lengthOf(output, 2) === undefined;`\n }\n ]\n },\n {\n name: 'Array.reverse()',\n time: 10,\n prompt: `Reverse the order of the 'fruit' array using 'Array.reverse()'`,\n given: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\\r`,\n answer: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\n const stiurf = fruits.reverse();\n return stiurf;`,\n tests: [\n {\n name: 'Correct output',\n test: `(assert.deepEqual(output, [\n 'banana',\n 'lemon',\n 'orange',\n 'strawberry'\n ]) === undefined);`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 4 items',\n test: `assert.lengthOf(output, 4) === undefined;`\n },\n {\n name: `First item is 'banana'`,\n test: `assert.deepEqual(output[0], 'banana') === undefined;`\n }\n ]\n },\n {\n name: 'Array.sort()',\n time: 10,\n prompt: `Return the 'fruits' Array after sorting them using 'Array.sort()'.`,\n given: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\\r`,\n answer: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\n const orderlyFruit = fruits.sort();\n return orderlyFruit;`,\n tests: [\n {\n name: 'Correct output',\n test: `(assert.deepEqual(output, [\n 'banana',\n 'lemon',\n 'orange',\n 'strawberry'\n ]) === undefined);`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 4 items',\n test: `assert.lengthOf(output, 4) === undefined;`\n },\n {\n name: `First item is 'banana'`,\n test: `assert.deepEqual(output[0], 'banana') === undefined;`\n }\n ]\n },\n {\n name: 'Array.lastIndexOf()',\n time: 10,\n prompt: `Return the index of the last 'peach' instance in the 'fruit' array using 'Array.lastIndexOf()'`,\n given: `const fruits = ['peach', 'orange', 'lemon', 'peach'];\\r`,\n answer: `const fruits = ['peach', 'orange', 'lemon', 'peach'];\n const wheresTheLastPeach = fruits.lastIndexOf('peach');\n return wheresTheLastPeach;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, 3) === undefined;`\n },\n {\n name: 'Returns a Number',\n test: `assert.isNumber(output) === undefined;`\n }\n ]\n },\n {\n name: 'Array.filter()',\n time: 10,\n prompt: `Return an array of the numbers greater than 5 in 'numbers' using 'Array.filter()'`,\n given: `const numbers = [1, 1, 2, 3, 5, 8, 13, 21];\\r`,\n answer: `const numbers = [1, 1, 2, 3, 5, 8, 13, 21];\n const overFive = numbers.filter(num => num > 5);\n return overFive;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, [8, 13, 21]) === undefined;`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 3 items',\n test: `assert.lengthOf(output, 3) === undefined;`\n },\n {\n name: `First item is 8`,\n test: `assert.deepEqual(output[0], 8) === undefined;`\n }\n ]\n },\n {\n name: 'Array.map()',\n time: 10,\n prompt: `Return an array of 'numbers' array's square roots, using 'Array.map()' and 'Math.sqrt()'`,\n given: `const numbers = [25, 121, 169];\\r`,\n answer: `const numbers = [25, 121, 169];\n const roots = numbers.map(num => Math.sqrt(num));\n return roots;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, [5, 11, 13]) === undefined;`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 3 items',\n test: `assert.lengthOf(output, 3) === undefined;`\n },\n {\n name: `First item is 5`,\n test: `assert.deepEqual(output[0], 5) === undefined;`\n },\n {\n name: `Last item is 13`,\n test: `assert.deepEqual(output[output.length - 1], 13) === undefined;`\n }\n ]\n },\n {\n name: 'Array.every()',\n time: 10,\n prompt: `Return object that returns whether each array contains all even numbers using Array.every().`,\n given: `const evenNumbers = [2, 4, 6, 8];\n const someOddNumbers = [2, 5, 6, 8];\n function isEven(element) {\n \n }\n return {\n evenNumbers: evenNumbers.,\n someOddNumbers: someOddNumbers.\n };`,\n answer: `const evenNumbers = [2, 4, 6, 8];\n const someOddNumbers = [2, 5, 6, 8];\n function isEven(element) {\n return element % 2 === 0\n }\n return {\n evenNumbers: evenNumbers.every(isEven),\n someOddNumbers: someOddNumbers.every(isEven)\n };`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, {\n evenNumbers: true,\n someOddNumbers: false\n }) === undefined;`\n },\n {\n name: 'Returns an Object',\n test: `assert.isObject(output) === undefined;`\n },\n {\n name: 'Object has 2 items',\n test: `assert.lengthOf(Object.keys(output), 2) === undefined;`\n },\n {\n name: `First value is true`,\n test: `assert.isTrue(output.evenNumbers) === undefined;`\n },\n {\n name: `Second value is false`,\n test: `assert.isFalse(output.someOddNumbers) === undefined;`\n }\n ]\n },\n {\n name: 'Array.some()',\n time: 10,\n prompt: `Return 'Object' that returns whether each array contains some odd numbers using 'Array.some()'.`,\n given: `const evenNumbers = [2, 4, 6, 8];\n const someOddNumbers = [2, 4, 7, 8];\n function isOdd(element) {\n \n }\n return {\n evenNumbers: evenNumbers.,\n someOddNumbers: someOddNumbers.\n };`,\n answer: `const evenNumbers = [1, 3, 5, 7];\n const someOddNumbers = [1, 3, 6, 7];\n function isOdd(element) {\n return element % 2 !== 0;\n }\n return {\n evenNumbers: evenNumbers.some(isOdd),\n someOddNumbers: someOddNumbers.some(isOdd)\n };`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, {\n evenNumbers: false,\n someOddNumbers: true\n }) === undefined;`\n },\n {\n name: 'Returns an Object',\n test: `assert.isObject(output) === undefined;`\n },\n {\n name: 'Object has 2 items',\n test: `assert.lengthOf(Object.keys(output), 2) === undefined;`\n },\n {\n name: `First value is false`,\n test: `assert.isFalse(output.evenNumbers) === undefined;`\n },\n {\n name: `Second value is true`,\n test: `assert.isTrue(output.someOddNumbers) === undefined;`\n }\n ]\n }\n // Next problems to create:\n // forEach? fix one above that tried, but can't verify forEach was used\n // some\n // reduce\n // reduceRight\n // Array.from and other ways to turn array-like into array\n];\n","module.exports = [\n {\n name: 'Create Array',\n time: 10,\n prompt: 'Create and return an array that contains \\'apple\\' and \\'banana\\'',\n given: `const fruits = [];\\rreturn fruits;`,\n answer: `const fruits = ['apple', 'banana'];\n return fruits;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, ['apple', 'banana']) === undefined;`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 2 items',\n test: `assert.lengthOf(output, 2) === undefined;`\n }\n ]\n },\n {\n name: 'Array.pop()',\n time: 10,\n prompt: `Remove 'orange' from the end of the 'fruits' array and return 'fruits'.`,\n given: `const fruits = ['apple', 'banana', 'orange'];\\r`,\n answer: `const fruits = ['apple', 'banana', 'orange'];\n fruits.pop();\n return fruits;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, ['apple', 'banana']) === undefined;`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 2 items',\n test: `assert.lengthOf(output, 2) === undefined;`\n }\n ]\n }\n]\n","module.exports = require('./lib/type');\n","/*!\n * type-detect\n * Copyright(c) 2013 jake luer \n * MIT Licensed\n */\n\n/*!\n * Primary Exports\n */\n\nvar exports = module.exports = getType;\n\n/*!\n * Detectable javascript natives\n */\n\nvar natives = {\n '[object Array]': 'array'\n , '[object RegExp]': 'regexp'\n , '[object Function]': 'function'\n , '[object Arguments]': 'arguments'\n , '[object Date]': 'date'\n};\n\n/**\n * ### typeOf (obj)\n *\n * Use several different techniques to determine\n * the type of object being tested.\n *\n *\n * @param {Mixed} object\n * @return {String} object type\n * @api public\n */\n\nfunction getType (obj) {\n var str = Object.prototype.toString.call(obj);\n if (natives[str]) return natives[str];\n if (obj === null) return 'null';\n if (obj === undefined) return 'undefined';\n if (obj === Object(obj)) return 'object';\n return typeof obj;\n}\n\nexports.Library = Library;\n\n/**\n * ### Library\n *\n * Create a repository for custom type detection.\n *\n * ```js\n * var lib = new type.Library;\n * ```\n *\n */\n\nfunction Library () {\n this.tests = {};\n}\n\n/**\n * #### .of (obj)\n *\n * Expose replacement `typeof` detection to the library.\n *\n * ```js\n * if ('string' === lib.of('hello world')) {\n * // ...\n * }\n * ```\n *\n * @param {Mixed} object to test\n * @return {String} type\n */\n\nLibrary.prototype.of = getType;\n\n/**\n * #### .define (type, test)\n *\n * Add a test to for the `.test()` assertion.\n *\n * Can be defined as a regular expression:\n *\n * ```js\n * lib.define('int', /^[0-9]+$/);\n * ```\n *\n * ... or as a function:\n *\n * ```js\n * lib.define('bln', function (obj) {\n * if ('boolean' === lib.of(obj)) return true;\n * var blns = [ 'yes', 'no', 'true', 'false', 1, 0 ];\n * if ('string' === lib.of(obj)) obj = obj.toLowerCase();\n * return !! ~blns.indexOf(obj);\n * });\n * ```\n *\n * @param {String} type\n * @param {RegExp|Function} test\n * @api public\n */\n\nLibrary.prototype.define = function (type, test) {\n if (arguments.length === 1) return this.tests[type];\n this.tests[type] = test;\n return this;\n};\n\n/**\n * #### .test (obj, test)\n *\n * Assert that an object is of type. Will first\n * check natives, and if that does not pass it will\n * use the user defined custom tests.\n *\n * ```js\n * assert(lib.test('1', 'int'));\n * assert(lib.test('yes', 'bln'));\n * ```\n *\n * @param {Mixed} object\n * @param {String} type\n * @return {Boolean} result\n * @api public\n */\n\nLibrary.prototype.test = function (obj, type) {\n if (type === getType(obj)) return true;\n var test = this.tests[type];\n\n if (test && 'regexp' === getType(test)) {\n return test.test(obj);\n } else if (test && 'function' === getType(test)) {\n return test(obj);\n } else {\n throw new ReferenceError('Type test \"' + type + '\" not defined or invalid.');\n }\n};\n","/*!\n * type-detect\n * Copyright(c) 2013 jake luer \n * MIT Licensed\n */\n\n/*!\n * Primary Exports\n */\n\nvar exports = module.exports = getType;\n\n/**\n * ### typeOf (obj)\n *\n * Use several different techniques to determine\n * the type of object being tested.\n *\n *\n * @param {Mixed} object\n * @return {String} object type\n * @api public\n */\nvar objectTypeRegexp = /^\\[object (.*)\\]$/;\n\nfunction getType(obj) {\n var type = Object.prototype.toString.call(obj).match(objectTypeRegexp)[1].toLowerCase();\n // Let \"new String('')\" return 'object'\n if (typeof Promise === 'function' && obj instanceof Promise) return 'promise';\n // PhantomJS has type \"DOMWindow\" for null\n if (obj === null) return 'null';\n // PhantomJS has type \"DOMWindow\" for undefined\n if (obj === undefined) return 'undefined';\n return type;\n}\n\nexports.Library = Library;\n\n/**\n * ### Library\n *\n * Create a repository for custom type detection.\n *\n * ```js\n * var lib = new type.Library;\n * ```\n *\n */\n\nfunction Library() {\n if (!(this instanceof Library)) return new Library();\n this.tests = {};\n}\n\n/**\n * #### .of (obj)\n *\n * Expose replacement `typeof` detection to the library.\n *\n * ```js\n * if ('string' === lib.of('hello world')) {\n * // ...\n * }\n * ```\n *\n * @param {Mixed} object to test\n * @return {String} type\n */\n\nLibrary.prototype.of = getType;\n\n/**\n * #### .define (type, test)\n *\n * Add a test to for the `.test()` assertion.\n *\n * Can be defined as a regular expression:\n *\n * ```js\n * lib.define('int', /^[0-9]+$/);\n * ```\n *\n * ... or as a function:\n *\n * ```js\n * lib.define('bln', function (obj) {\n * if ('boolean' === lib.of(obj)) return true;\n * var blns = [ 'yes', 'no', 'true', 'false', 1, 0 ];\n * if ('string' === lib.of(obj)) obj = obj.toLowerCase();\n * return !! ~blns.indexOf(obj);\n * });\n * ```\n *\n * @param {String} type\n * @param {RegExp|Function} test\n * @api public\n */\n\nLibrary.prototype.define = function(type, test) {\n if (arguments.length === 1) return this.tests[type];\n this.tests[type] = test;\n return this;\n};\n\n/**\n * #### .test (obj, test)\n *\n * Assert that an object is of type. Will first\n * check natives, and if that does not pass it will\n * use the user defined custom tests.\n *\n * ```js\n * assert(lib.test('1', 'int'));\n * assert(lib.test('yes', 'bln'));\n * ```\n *\n * @param {Mixed} object\n * @param {String} type\n * @return {Boolean} result\n * @api public\n */\n\nLibrary.prototype.test = function(obj, type) {\n if (type === getType(obj)) return true;\n var test = this.tests[type];\n\n if (test && 'regexp' === getType(test)) {\n return test.test(obj);\n } else if (test && 'function' === getType(test)) {\n return test(obj);\n } else {\n throw new ReferenceError('Type test \"' + type + '\" not defined or invalid.');\n }\n};\n","(function (document, window) {\n // DEPENDENCIES\n // ============================================================\n const probs = require('pjs-problems');\n const dedent = require('dedent');\n const assert = require('chai').assert;\n\n // PROBLEM TEMPLATE NICE-IFICATION\n // ============================================================\n\n function dedentStrings(problems) {\n return problems.map(prob => {\n prob.given = dedent(prob.given)\n prob.answer = dedent(prob.answer)\n return prob\n });\n }\n\n\n // PROBLEMS\n // ============================================================\n\n let problems = [];\n Object.keys(probs).forEach(subject => {\n problems.push(...probs[subject]);\n });\n problems = dedentStrings(problems);\n\n\n // CONFIG\n // ============================================================\n\n // Hoist current problem\n let currentProblem;\n\n // Keys to ignore while user is navigating around the textarea but not changing any code\n const ignoreKeyCodes = [\n 9, // Tab\n 37, // Left arrow\n 39, // Right arrow\n 38, // Up arrow\n 40 // Down arrow\n ];\n\n let config = {\n shuffle: true,\n timer: false,\n currentIndex: 0\n };\n\n\n // HELPERS\n // ============================================================\n\n function debounce(func, wait, immediate) {\n let timeout;\n return function () {\n const context = this;\n const args = arguments;\n const later = function () {\n timeout = null;\n if (!immediate) {\n func.apply(context, args);\n }\n };\n const callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) {\n func.apply(context, args);\n }\n };\n }\n\n // UI\n // ============================================================\n\n // elements\n const problemEl = document.getElementById('problem');\n const codeEl = document.getElementById('code');\n const testSuiteEl = document.getElementById('test-suite');\n const testTotalEl = document.getElementById('test-total');\n const evalConsoleEl = document.getElementById('eval-output');\n const assertConsoleEl = document.getElementById('assert-output');\n const shuffleProblemsButtonEl = document.getElementById('shuffle-problems');\n const previousProblemButtonEl = document.getElementById('prev-problem');\n const nextProblemButtonEl = document.getElementById('next-problem');\n\n // LOCALSTORE\n // --------------------------------------------------------------------------------\n\n // Pull config from localstorage\n if (window.localStorage) {\n const localConfig = localStorage.getItem('js_practice_config');\n if (localConfig) {\n try {\n config = JSON.parse(localConfig);\n loadApp(config);\n } catch (err) {\n console.log('LOCAL_CONFIG PARSE ERR:', err);\n }\n } else {\n console.log('LOCAL_CONFIG: No local config');\n loadApp(config);\n }\n }\n\n function updateLocalstore(config) {\n return new Promise((resolve, reject) => {\n if (window.localStorage) {\n localStorage.setItem('js_practice_config', JSON.stringify(config));\n console.log('Saved config: ', config);\n resolve();\n } else {\n reject();\n }\n });\n }\n\n // Get indexes\n function getRandomIndex(problemsArr) {\n const ind = Math.floor(Math.random() * problemsArr.length);\n config.currentIndex = ind;\n updateLocalstore(config);\n return ind;\n }\n\n function getPreviousIndex(problemsArr) {\n let probInd;\n const currentIndex = config.currentIndex;\n // If at beginning, go to end\n if (currentIndex === 0) {\n probInd = problemsArr.length - 1;\n } else {\n probInd = currentIndex - 1;\n }\n return probInd;\n }\n\n function getNextIndex(problemsArr) {\n let probInd;\n const currentIndex = config.currentIndex;\n // If at end or invalid, restart series\n if (currentIndex >= problemsArr.length - 1 || currentIndex < 0) {\n probInd = 0;\n } else {\n probInd = currentIndex + 1;\n }\n return probInd;\n }\n\n // Get problems\n function getCurrentProblem(problemsArr) {\n return problemsArr[config.currentIndex];\n }\n\n function previousProblem() {\n console.log('previousProblem!');\n // Activate back button, for visual queue of nav feedback\n previousProblemButtonEl.classList.add('active');\n config.currentIndex = config.shuffle\n ? getRandomIndex(problems)\n : getPreviousIndex(problems);\n updateLocalstore(config).then(() => {\n window.location.reload();\n });\n }\n\n function nextProblem() {\n console.log('nextProblem!');\n // Activate next button, for visual queue of nav feedback\n nextProblemButtonEl.classList.add('active');\n config.currentIndex = config.shuffle\n ? getRandomIndex(problems)\n : getNextIndex(problems);\n updateLocalstore(config).then(() => {\n window.location.reload();\n });\n }\n\n function toggleShuffle() {\n console.log('toggle shuffle!');\n config.shuffle = !config.shuffle; // Flip it\n shuffleProblemsButtonEl.classList.toggle('active');\n previousProblemButtonEl.parentNode.classList.toggle('hidden');\n updateLocalstore(config);\n }\n\n function loadProblem(problemObj) {\n currentProblem = problemObj;\n // Prob question\n problemEl.innerText = problemObj.prompt;\n // Prob given code\n if (problemObj.given) {\n codeEl.value = problemObj.given;\n }\n // Seed the tests, pass (init = true) as second param\n testSuite(null, true);\n }\n\n // TODO: Build the assert errors into the test dom on each update.\n function updateTests(testStatus, init) {\n if (init === true) {\n buildTests(currentProblem.tests);\n }\n updateTestStatus(testStatus);\n }\n\n function buildTests(tests) {\n if (tests) {\n const testsDom = tests\n .map(test => {\n return `
\n
[✘]
\n
${test.name}
\n
`;\n })\n .join('');\n testSuiteEl.innerHTML = testsDom;\n }\n }\n\n function updateTestStatus(testStatuses) {\n if (!testStatuses) {\n throw new Error('No testStatuses provided.');\n }\n // Find out if all tests have passed or not\n let allPassed = true;\n testStatuses.forEach(testPassed => {\n if (testPassed !== true) {\n allPassed = false;\n }\n });\n const testEls = [].slice.call(testSuiteEl.querySelectorAll('.test-state'));\n testEls.forEach((testStatusEl, iter) => {\n if (testStatuses[iter] === true) {\n testStatusEl.innerHTML = '[✓]';\n testStatusEl.classList.remove('fail');\n testStatusEl.classList.add('pass');\n } else {\n testStatusEl.innerHTML = '[✘]';\n testStatusEl.classList.remove('pass');\n testStatusEl.classList.add('fail');\n }\n });\n\n if (allPassed === true) {\n testTotalEl.innerText = 'PASS';\n testTotalEl.classList.remove('fail');\n testTotalEl.classList.add('pass');\n } else {\n testTotalEl.innerText = 'FAIL';\n testTotalEl.classList.remove('pass');\n testTotalEl.classList.add('fail');\n }\n }\n\n function printAssertError(errObj) {\n // Make element string\n let inner = '';\n if (errObj !== null) {\n inner = `\n
\n Expected: ${JSON.stringify(errObj.expected)}\n Actual: ${JSON.stringify(errObj.actual)}\n
`;\n }\n\n // Prepend element\n assertConsoleEl.innerHTML = inner;\n }\n\n function printEvalOutput(errObj, output) {\n // Make element string\n let inner = '';\n if (errObj && errObj.message !== undefined) {\n inner = `\n
\n Syntax Error: ${JSON.stringify(errObj.message)}\n
`;\n } else if (output) {\n inner = `\n
\n Output: ${JSON.stringify(output)}\n
`;\n }\n // Prepend element\n evalConsoleEl.innerHTML = inner;\n }\n\n\n // VERIFICATION LOGIC\n // ============================================================\n\n function testSuite(init) {\n // Show 'working' indicator\n testTotalEl.classList.toggle('working');\n // Run stuff\n const output = getOutput(codeEl.value);\n // Run tests on code, return object/array of test results\n const tested = runTests(output);\n // Hide 'working' indicator\n testTotalEl.classList.toggle('working');\n // Update UI with results\n updateTests(tested, init);\n }\n\n function getOutput(code) {\n let evald = false;\n try {\n evald = eval(`(function(){${code}})()`); // eslint-disable-line no-eval\n printEvalOutput(null, evald); // Print current output\n } catch (err) {\n printEvalOutput(err);\n }\n return evald;\n }\n\n function runTests(output) {\n let tested = false;\n tested = currentProblem.tests.map(test => {\n let testOutcome = false;\n try {\n if (output) {\n testOutcome = eval(test.test);\n }\n printAssertError(null);\n } catch (err) {\n printAssertError(err);\n }\n return testOutcome;\n });\n return tested;\n }\n\n // Wrapped to prevent race with local config retrieval\n function loadApp(config) {\n console.log('loading app!');\n\n // Show current toggle state\n if (config.shuffle === true) {\n shuffleProblemsButtonEl.classList.add('active');\n previousProblemButtonEl.parentNode.classList.add('hidden');\n }\n\n // Keybinding stuff\n // ============================================================\n\n // Debounced code validation\n const debouncedInputValidation = debounce(e => {\n // If not arrow keys or other non-character keys\n if (ignoreKeyCodes.indexOf(e.keyCode) === -1) {\n // Run test suite\n testSuite();\n }\n }, 200);\n\n function problemNav(e) {\n // Go to previous problem keybinding\n // If CMD/CTRL + SHIFT + RETURN/ENTER\n if (config.shuffle === false && e.keyCode === 13 && e.shiftKey && (e.metaKey || e.ctrlKey)) {\n // Go to next problem\n previousProblem();\n } else if (e.keyCode === 13 && !e.shiftKey && (e.metaKey || e.ctrlKey)) {\n // Go to next problem keybinding\n // If CMD/CTRL + RETURN/ENTER\n // Go to next problem\n nextProblem();\n }\n }\n\n // Event Bindings\n // ============================================================\n\n // Bind it up\n codeEl.addEventListener('keydown', debouncedInputValidation);\n document.addEventListener('keydown', problemNav);\n shuffleProblemsButtonEl.addEventListener('click', toggleShuffle);\n previousProblemButtonEl.addEventListener('click', previousProblem);\n nextProblemButtonEl.addEventListener('click', nextProblem);\n\n // Start it up!\n // Load current problem\n const currProb = getCurrentProblem(problems);\n loadProblem(currProb);\n // Initalized test suite with starting failures\n testSuite(true);\n }\n})(document, window);\n"]} \ No newline at end of file +{"version":3,"sources":["node_modules/.registry.npmjs.org/browser-pack/6.0.2/node_modules/browser-pack/_prelude.js","node_modules/.registry.npmjs.org/assertion-error/1.0.2/node_modules/assertion-error/index.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/index.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/assertion.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/config.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/core/assertions.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/interface/assert.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/interface/expect.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/interface/should.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/addChainableMethod.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/addMethod.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/addProperty.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/expectTypes.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/flag.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/getActual.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/getEnumerableProperties.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/getMessage.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/getName.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/getPathInfo.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/getPathValue.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/getProperties.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/hasProperty.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/index.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/inspect.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/objDisplay.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/overwriteMethod.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/overwriteProperty.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/test.js","node_modules/.registry.npmjs.org/chai/3.5.0/node_modules/chai/lib/chai/utils/transferFlags.js","node_modules/.registry.npmjs.org/dedent/0.7.0/node_modules/dedent/dist/dedent.js","node_modules/.registry.npmjs.org/deep-eql/0.1.3/node_modules/deep-eql/index.js","node_modules/.registry.npmjs.org/deep-eql/0.1.3/node_modules/deep-eql/lib/eql.js","node_modules/.registry.npmjs.org/pjs-problems/1.0.3/node_modules/pjs-problems/index.js","node_modules/.registry.npmjs.org/pjs-problems/1.0.3/node_modules/pjs-problems/problems/arrays.js","node_modules/.registry.npmjs.org/pjs-problems/1.0.3/node_modules/pjs-problems/problems/initial.js","node_modules/.registry.npmjs.org/type-detect/0.1.1/node_modules/type-detect/index.js","node_modules/.registry.npmjs.org/type-detect/0.1.1/node_modules/type-detect/lib/type.js","node_modules/.registry.npmjs.org/type-detect/1.0.0/node_modules/type-detect/lib/type.js","src/js/index.js"],"names":["e","t","n","r","s","o","u","a","require","i","f","Error","code","l","exports","call","length","1","module","exclude","excludeProps","res","obj","Object","keys","forEach","key","excludes","indexOf","slice","arguments","args","AssertionError","message","_props","ssf","props","this","showDiff","callee","captureStackTrace","stack","prototype","create","name","constructor","toJSON","used","version","util","use","fn","push","config","assertion","core","expect","should","assert","_chai","Assertion","msg","flag","defineProperty","get","console","warn","includeStack","set","value","addProperty","addMethod","addChainableMethod","chainingBehavior","overwriteProperty","overwriteMethod","overwriteChainableMethod","expr","negateMsg","expected","_actual","ok","test","getMessage","actual","getActual","val","truncateThreshold","chai","_","an","type","toLowerCase","article","charAt","includeChainingBehavior","include","expectTypes","eql","k","property","subset","undefined","inspect","checkArguments","toString","assertEqual","_obj","assertEql","assertAbove","to","have","len","assertLeast","assertBelow","assertMost","assertInstanceOf","getName","assertOwnProperty","hasOwnProperty","assertOwnPropertyDescriptor","descriptor","actualDescriptor","getOwnPropertyDescriptor","assertLengthChain","assertLength","assertMatch","re","exec","assertKeys","str","mixedArgsMsg","Array","any","all","filter","every","last","map","pop","join","sort","assertThrows","errMsg","is","thrown","desiredError","thrownError","RegExp","err","actuallyGot","expectedThrown","respondTo","method","itself","context","satisfy","matcher","result","objDisplay","negate","closeTo","delta","Math","abs","isSubsetOf","superset","cmp","elem","some","elem2","oneOf","list","be","assertChanges","object","prop","initial","assertIncreases","assertDecreases","chain","isNaN","isArray","start","finish","range","isDeep","pathInfo","getPathInfo","hasProperty","exists","isExtensible","TypeError","isSealed","isFrozen","express","errmsg","fail","operator","isOk","isNotOk","not","equal","act","exp","notEqual","strictEqual","notStrictEqual","deepEqual","notDeepEqual","isAbove","abv","above","isAtLeast","atlst","least","isBelow","blw","below","isAtMost","atmst","most","isTrue","isNotTrue","isFalse","isNotFalse","isNull","isNotNull","NaN","isNotNaN","isUndefined","isDefined","isFunction","isNotFunction","isObject","isNotObject","isNotArray","isString","isNotString","isNumber","isNotNumber","isBoolean","isNotBoolean","typeOf","notTypeOf","instanceOf","notInstanceOf","inc","notInclude","match","notMatch","notProperty","deepProperty","deep","notDeepProperty","propertyVal","propertyNotVal","deepPropertyVal","deepPropertyNotVal","lengthOf","throws","errt","errs","assertErr","throw","doesNotThrow","Throw","val2","approximately","sameMembers","set1","set2","same","members","sameDeepMembers","includeMembers","includeDeepMembers","inList","changes","change","doesNotChange","increases","increase","doesNotIncrease","decreases","decrease","doesNotDecrease","ifError","extensible","isNotExtensible","sealed","isNotSealed","frozen","isNotFrozen","alias","as","loadShould","shouldGetter","String","Number","Boolean","valueOf","shouldSetter","enumerable","configurable","writable","val1","exist","Should","transferFlags","hasProtoSupport","excludeNames","Function","apply","ctx","chainableBehavior","__methods","__proto__","getOwnPropertyNames","asserterName","pd","getter","types","index","art","flags","__flags","flagMsg","replace","func","parsePath","path","mArr","parseFloat","p","_getPathValue","parsed","tmp","part","info","parent","proto","getPrototypeOf","literals","number","string","ot","getPathValue","showHidden","depth","colors","formatValue","seen","stylize","recurseTimes","ret","primitive","formatPrimitive","isDOMElement","outerHTML","document","xmlVersion","XMLSerializer","serializeToString","container","createElementNS","appendChild","cloneNode","html","innerHTML","visibleKeys","getEnumerableProperties","getProperties","isError","nameSuffix","isRegExp","isDate","Date","toUTCString","formatError","base","array","braces","output","formatArray","formatProperty","reduceToSingleString","simple","JSON","stringify","Infinity","__lookupGetter__","__lookupSetter__","split","line","substr","numLinesEst","reduce","prev","cur","ar","objectToString","d","HTMLElement","nodeType","nodeName","splice","_chainingBehavior","_method","_super","_get","includeAll","dedent","strings","raw","lines","mindent","m","indent","min","trim","b","sameValue","dateEqual","regexpEqual","Buffer","isBuffer","bufferEqual","argumentsEqual","typeEqual","objectEqual","getTime","iterableEqual","isValue","ka","kb","ex","arrays","time","prompt","given","answer","tests","getType","natives","Library","[object Array]","[object RegExp]","[object Function]","[object Arguments]","[object Date]","of","define","ReferenceError","objectTypeRegexp","Promise","window","dedentStrings","problems","prob","debounce","wait","immediate","timeout","later","callNow","clearTimeout","setTimeout","updateLocalstore","resolve","reject","localStorage","setItem","log","getRandomIndex","problemsArr","ind","floor","random","currentIndex","getPreviousIndex","getNextIndex","getCurrentProblem","previousProblem","previousProblemButtonEl","classList","add","shuffle","then","location","reload","nextProblem","nextProblemButtonEl","toggleShuffle","shuffleProblemsButtonEl","toggle","parentNode","loadProblem","problemObj","state","currentProblem","problemEl","innerText","codeEl","testSuite","updateTests","testStatus","init","buildTests","updateTestStatus","testsDom","testSuiteEl","testStatuses","allPassed","testPassed","querySelectorAll","testStatusEl","iter","remove","testTotalEl","printAssertError","errObj","inner","assertConsoleEl","printEvalOutput","evalConsoleEl","tested","runTests","getOutput","evald","eval","testOutcome","loadApp","problemNav","keyCode","shiftKey","metaKey","ctrlKey","debouncedInputValidation","ignoreKeyCodes","addEventListener","probs","subject","_problems","_toConsumableArray","timer","getElementById","localConfig","getItem","parse"],"mappings":"CAAA,SAAAA,EAAAC,EAAAC,EAAAC,GAAA,SAAAC,EAAAC,EAAAC,GAAA,IAAAJ,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,IAAAE,EAAA,mBAAAC,SAAAA,QAAA,IAAAF,GAAAC,EAAA,OAAAA,EAAAF,GAAA,GAAA,GAAAI,EAAA,OAAAA,EAAAJ,GAAA,GAAA,IAAAK,EAAA,IAAAC,MAAA,uBAAAN,EAAA,KAAA,MAAAK,EAAAE,KAAA,mBAAAF,EAAA,IAAAG,EAAAX,EAAAG,IAAAS,YAAAb,EAAAI,GAAA,GAAAU,KAAAF,EAAAC,QAAA,SA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","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o\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 || arguments.callee;\n if (ssf && 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","module.exports = require('./lib/chai');\n","/*!\n * chai\n * Copyright(c) 2011-2014 Jake Luer \n * MIT Licensed\n */\n\nvar used = []\n , exports = module.exports = {};\n\n/*!\n * Chai version\n */\n\nexports.version = '3.5.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(this, util);\n used.push(fn);\n }\n\n return this;\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","/*!\n * chai\n * http://chaijs.com\n * Copyright(c) 2011-2014 Jake Luer \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 * @api private\n */\n\n function Assertion (obj, msg, stack) {\n flag(this, 'ssfi', stack || arguments.callee);\n flag(this, 'object', obj);\n flag(this, 'message', msg);\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 (true !== showDiff) showDiff = false;\n if (true !== config.showDiff) showDiff = false;\n\n if (!ok) {\n var msg = util.getMessage(this, arguments)\n , 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","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","/*!\n * chai\n * http://chaijs.com\n * Copyright(c) 2011-2014 Jake Luer \n * MIT Licensed\n */\n\nmodule.exports = function (chai, _) {\n var Assertion = chai.Assertion\n , toString = Object.prototype.toString\n , flag = _.flag;\n\n /**\n * ### Language Chains\n *\n * The following are provided as chainable getters to\n * improve the readability of your assertions. They\n * do not provide testing capabilities unless they\n * have been overwritten by a plugin.\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 *\n * @name language chains\n * @namespace BDD\n * @api public\n */\n\n [ 'to', 'be', 'been'\n , 'is', 'and', 'has', 'have'\n , 'with', 'that', 'which', 'at'\n , 'of', 'same' ].forEach(function (chain) {\n Assertion.addProperty(chain, function () {\n return this;\n });\n });\n\n /**\n * ### .not\n *\n * Negates any of assertions following in the chain.\n *\n * expect(foo).to.not.equal('bar');\n * expect(goodFn).to.not.throw(Error);\n * expect({ foo: 'baz' }).to.have.property('foo')\n * .and.not.equal('bar');\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 * Sets the `deep` flag, later used by the `equal` and\n * `property` assertions.\n *\n * expect(foo).to.deep.equal({ bar: 'baz' });\n * expect({ foo: { bar: { baz: 'quux' } } })\n * .to.have.deep.property('foo.bar.baz', 'quux');\n *\n * `.deep.property` special characters can be escaped\n * by adding two slashes before the `.` or `[]`.\n *\n * var deepCss = { '.link': { '[target]': 42 }};\n * expect(deepCss).to.have.deep.property('\\\\.link.\\\\[target\\\\]', 42);\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 * ### .any\n *\n * Sets the `any` flag, (opposite of the `all` flag)\n * later used in the `keys` assertion.\n *\n * expect(foo).to.have.any.keys('bar', 'baz');\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 /**\n * ### .all\n *\n * Sets the `all` flag (opposite of the `any` flag)\n * later used by the `keys` assertion.\n *\n * expect(foo).to.have.all.keys('bar', 'baz');\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)\n *\n * The `a` and `an` assertions are aliases that can be\n * used either as language chains or to assert a value's\n * type.\n *\n * // typeof\n * expect('test').to.be.a('string');\n * expect({ foo: 'bar' }).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(new Promise).to.be.a('promise');\n * expect(new Float32Array()).to.be.a('float32array');\n * expect(Symbol()).to.be.a('symbol');\n *\n * // es6 overrides\n * expect({[Symbol.toStringTag]:()=>'foo'}).to.be.a('foo');\n *\n * // language chain\n * expect(foo).to.be.an.instanceof(Foo);\n *\n * @name a\n * @alias an\n * @param {String} type\n * @param {String} message _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)\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(value)\n *\n * The `include` and `contain` assertions can be used as either property\n * based language chains or as methods to assert the inclusion of an object\n * in an array or a substring in a string. When used as language chains,\n * they toggle the `contains` flag for the `keys` assertion.\n *\n * expect([1,2,3]).to.include(2);\n * expect('foobar').to.contain('foo');\n * expect({ foo: 'bar', hello: 'universe' }).to.include.keys('foo');\n *\n * @name include\n * @alias contain\n * @alias includes\n * @alias contains\n * @param {Object|String|Number} obj\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function includeChainingBehavior () {\n flag(this, 'contains', true);\n }\n\n function include (val, msg) {\n _.expectTypes(this, ['array', 'object', 'string']);\n\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n var expected = false;\n\n if (_.type(obj) === 'array' && _.type(val) === 'object') {\n for (var i in obj) {\n if (_.eql(obj[i], val)) {\n expected = true;\n break;\n }\n }\n } else if (_.type(val) === 'object') {\n if (!flag(this, 'negate')) {\n for (var k in val) new Assertion(obj).property(k, val[k]);\n return;\n }\n var subset = {};\n for (var k in val) subset[k] = obj[k];\n expected = _.eql(subset, val);\n } else {\n expected = (obj != undefined) && ~obj.indexOf(val);\n }\n this.assert(\n expected\n , 'expected #{this} to include ' + _.inspect(val)\n , 'expected #{this} to not 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 truthy.\n *\n * expect('everything').to.be.ok;\n * expect(1).to.be.ok;\n * expect(false).to.not.be.ok;\n * expect(undefined).to.not.be.ok;\n * expect(null).to.not.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 `true`.\n *\n * expect(true).to.be.true;\n * expect(1).to.not.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 , this.negate ? false : true\n );\n });\n\n /**\n * ### .false\n *\n * Asserts that the target is `false`.\n *\n * expect(false).to.be.false;\n * expect(0).to.not.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 , this.negate ? true : false\n );\n });\n\n /**\n * ### .null\n *\n * Asserts that the target is `null`.\n *\n * expect(null).to.be.null;\n * expect(undefined).to.not.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 `undefined`.\n *\n * expect(undefined).to.be.undefined;\n * expect(null).to.not.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 * Asserts that the target is `NaN`.\n *\n * expect('foo').to.be.NaN;\n * expect(4).not.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 neither `null` nor `undefined`.\n *\n * var foo = 'hi'\n * , bar = null\n * , baz;\n *\n * expect(foo).to.exist;\n * expect(bar).to.not.exist;\n * expect(baz).to.not.exist;\n *\n * @name exist\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('exist', function () {\n this.assert(\n null != flag(this, 'object')\n , 'expected #{this} to exist'\n , 'expected #{this} to not exist'\n );\n });\n\n\n /**\n * ### .empty\n *\n * Asserts that the target's length is `0`. For arrays and strings, it checks\n * the `length` property. For objects, it gets the count of\n * enumerable keys.\n *\n * expect([]).to.be.empty;\n * expect('').to.be.empty;\n * expect({}).to.be.empty;\n *\n * @name empty\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('empty', function () {\n var obj = flag(this, 'object')\n , expected = obj;\n\n if (Array.isArray(obj) || 'string' === typeof object) {\n expected = obj.length;\n } else if (typeof obj === 'object') {\n expected = Object.keys(obj).length;\n }\n\n this.assert(\n !expected\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 * @name arguments\n * @alias Arguments\n * @namespace BDD\n * @api public\n */\n\n function checkArguments () {\n var obj = flag(this, 'object')\n , type = Object.prototype.toString.call(obj);\n this.assert(\n '[object 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(value)\n *\n * Asserts that the target is strictly equal (`===`) to `value`.\n * Alternately, if the `deep` flag is set, asserts that\n * the target is deeply equal to `value`.\n *\n * expect('hello').to.equal('hello');\n * expect(42).to.equal(42);\n * expect(1).to.not.equal(true);\n * expect({ foo: 'bar' }).to.not.equal({ foo: 'bar' });\n * expect({ foo: 'bar' }).to.deep.equal({ foo: 'bar' });\n *\n * @name equal\n * @alias equals\n * @alias eq\n * @alias deep.equal\n * @param {Mixed} value\n * @param {String} message _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 return this.eql(val);\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(value)\n *\n * Asserts that the target is deeply equal to `value`.\n *\n * expect({ foo: 'bar' }).to.eql({ foo: 'bar' });\n * expect([ 1, 2, 3 ]).to.eql([ 1, 2, 3 ]);\n *\n * @name eql\n * @alias eqls\n * @param {Mixed} value\n * @param {String} message _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(value)\n *\n * Asserts that the target is greater than `value`.\n *\n * expect(10).to.be.above(5);\n *\n * Can also be used in conjunction with `length` to\n * assert a minimum length. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.above(2);\n * expect([ 1, 2, 3 ]).to.have.length.above(2);\n *\n * @name above\n * @alias gt\n * @alias greaterThan\n * @param {Number} value\n * @param {String} message _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 if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len > n\n , 'expected #{this} to have a length above #{exp} but got #{act}'\n , 'expected #{this} to not have a length above #{exp}'\n , n\n , len\n );\n } else {\n this.assert(\n obj > n\n , 'expected #{this} to be above ' + n\n , 'expected #{this} to be at most ' + n\n );\n }\n }\n\n Assertion.addMethod('above', assertAbove);\n Assertion.addMethod('gt', assertAbove);\n Assertion.addMethod('greaterThan', assertAbove);\n\n /**\n * ### .least(value)\n *\n * Asserts that the target is greater than or equal to `value`.\n *\n * expect(10).to.be.at.least(10);\n *\n * Can also be used in conjunction with `length` to\n * assert a minimum length. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.of.at.least(2);\n * expect([ 1, 2, 3 ]).to.have.length.of.at.least(3);\n *\n * @name least\n * @alias gte\n * @param {Number} value\n * @param {String} message _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 if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len >= n\n , 'expected #{this} to have a length at least #{exp} but got #{act}'\n , 'expected #{this} to have a length below #{exp}'\n , n\n , len\n );\n } else {\n this.assert(\n obj >= n\n , 'expected #{this} to be at least ' + n\n , 'expected #{this} to be below ' + n\n );\n }\n }\n\n Assertion.addMethod('least', assertLeast);\n Assertion.addMethod('gte', assertLeast);\n\n /**\n * ### .below(value)\n *\n * Asserts that the target is less than `value`.\n *\n * expect(5).to.be.below(10);\n *\n * Can also be used in conjunction with `length` to\n * assert a maximum length. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.below(4);\n * expect([ 1, 2, 3 ]).to.have.length.below(4);\n *\n * @name below\n * @alias lt\n * @alias lessThan\n * @param {Number} value\n * @param {String} message _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 if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len < n\n , 'expected #{this} to have a length below #{exp} but got #{act}'\n , 'expected #{this} to not have a length below #{exp}'\n , n\n , len\n );\n } else {\n this.assert(\n obj < n\n , 'expected #{this} to be below ' + n\n , 'expected #{this} to be at least ' + n\n );\n }\n }\n\n Assertion.addMethod('below', assertBelow);\n Assertion.addMethod('lt', assertBelow);\n Assertion.addMethod('lessThan', assertBelow);\n\n /**\n * ### .most(value)\n *\n * Asserts that the target is less than or equal to `value`.\n *\n * expect(5).to.be.at.most(5);\n *\n * Can also be used in conjunction with `length` to\n * assert a maximum length. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.of.at.most(4);\n * expect([ 1, 2, 3 ]).to.have.length.of.at.most(3);\n *\n * @name most\n * @alias lte\n * @param {Number} value\n * @param {String} message _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 if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len <= n\n , 'expected #{this} to have a length at most #{exp} but got #{act}'\n , 'expected #{this} to have a length above #{exp}'\n , n\n , len\n );\n } else {\n this.assert(\n obj <= n\n , 'expected #{this} to be at most ' + n\n , 'expected #{this} to be above ' + n\n );\n }\n }\n\n Assertion.addMethod('most', assertMost);\n Assertion.addMethod('lte', assertMost);\n\n /**\n * ### .within(start, finish)\n *\n * Asserts that the target is within a range.\n *\n * expect(7).to.be.within(5,10);\n *\n * Can also be used in conjunction with `length` to\n * assert a length range. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.within(2,4);\n * expect([ 1, 2, 3 ]).to.have.length.within(2,4);\n *\n * @name within\n * @param {Number} start lowerbound inclusive\n * @param {Number} finish upperbound inclusive\n * @param {String} message _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 , range = start + '..' + finish;\n if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len >= start && len <= finish\n , 'expected #{this} to have a length within ' + range\n , 'expected #{this} to not have a length 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)\n *\n * Asserts that the target is an instance of `constructor`.\n *\n * var Tea = function (name) { this.name = name; }\n * , Chai = new Tea('chai');\n *\n * expect(Chai).to.be.an.instanceof(Tea);\n * expect([ 1, 2, 3 ]).to.be.instanceof(Array);\n *\n * @name instanceof\n * @param {Constructor} constructor\n * @param {String} message _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 var name = _.getName(constructor);\n this.assert(\n flag(this, 'object') instanceof constructor\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, [value])\n *\n * Asserts that the target has a property `name`, optionally asserting that\n * the value of that property is strictly equal to `value`.\n * If the `deep` flag is set, you can use dot- and bracket-notation for deep\n * references into objects and arrays.\n *\n * // simple referencing\n * var obj = { foo: 'bar' };\n * expect(obj).to.have.property('foo');\n * expect(obj).to.have.property('foo', 'bar');\n *\n * // deep referencing\n * var deepObj = {\n * green: { tea: 'matcha' }\n * , teas: [ 'chai', 'matcha', { tea: 'konacha' } ]\n * };\n *\n * expect(deepObj).to.have.deep.property('green.tea', 'matcha');\n * expect(deepObj).to.have.deep.property('teas[1]', 'matcha');\n * expect(deepObj).to.have.deep.property('teas[2].tea', 'konacha');\n *\n * You can also use an array as the starting point of a `deep.property`\n * assertion, or traverse nested arrays.\n *\n * var arr = [\n * [ 'chai', 'matcha', 'konacha' ]\n * , [ { tea: 'chai' }\n * , { tea: 'matcha' }\n * , { tea: 'konacha' } ]\n * ];\n *\n * expect(arr).to.have.deep.property('[0][1]', 'matcha');\n * expect(arr).to.have.deep.property('[1][2].tea', 'konacha');\n *\n * Furthermore, `property` changes the subject of the assertion\n * to be the value of that property from the original object. This\n * permits for further chainable assertions on that property.\n *\n * expect(obj).to.have.property('foo')\n * .that.is.a('string');\n * expect(deepObj).to.have.property('green')\n * .that.is.an('object')\n * .that.deep.equals({ tea: 'matcha' });\n * expect(deepObj).to.have.property('teas')\n * .that.is.an('array')\n * .with.deep.property('[2]')\n * .that.deep.equals({ tea: 'konacha' });\n *\n * Note that dots and bracket in `name` must be backslash-escaped when\n * the `deep` flag is set, while they must NOT be escaped when the `deep`\n * flag is not set.\n *\n * // simple referencing\n * var css = { '.link[target]': 42 };\n * expect(css).to.have.property('.link[target]', 42);\n *\n * // deep referencing\n * var deepCss = { '.link': { '[target]': 42 }};\n * expect(deepCss).to.have.deep.property('\\\\.link.\\\\[target\\\\]', 42);\n *\n * @name property\n * @alias deep.property\n * @param {String} name\n * @param {Mixed} value (optional)\n * @param {String} message _optional_\n * @returns value of property for chaining\n * @namespace BDD\n * @api public\n */\n\n Assertion.addMethod('property', function (name, val, msg) {\n if (msg) flag(this, 'message', msg);\n\n var isDeep = !!flag(this, 'deep')\n , descriptor = isDeep ? 'deep property ' : 'property '\n , negate = flag(this, 'negate')\n , obj = flag(this, 'object')\n , pathInfo = isDeep ? _.getPathInfo(name, obj) : null\n , hasProperty = isDeep\n ? pathInfo.exists\n : _.hasProperty(name, obj)\n , value = isDeep\n ? pathInfo.value\n : obj[name];\n\n if (negate && arguments.length > 1) {\n if (undefined === value) {\n msg = (msg != null) ? msg + ': ' : '';\n throw new Error(msg + _.inspect(obj) + ' has no ' + descriptor + _.inspect(name));\n }\n } else {\n this.assert(\n hasProperty\n , 'expected #{this} to have a ' + descriptor + _.inspect(name)\n , 'expected #{this} to not have ' + descriptor + _.inspect(name));\n }\n\n if (arguments.length > 1) {\n this.assert(\n val === value\n , 'expected #{this} to have a ' + descriptor + _.inspect(name) + ' of #{exp}, but got #{act}'\n , 'expected #{this} to not have a ' + descriptor + _.inspect(name) + ' of #{act}'\n , val\n , value\n );\n }\n\n flag(this, 'object', value);\n });\n\n\n /**\n * ### .ownProperty(name)\n *\n * Asserts that the target has an own property `name`.\n *\n * expect('test').to.have.ownProperty('length');\n *\n * @name ownProperty\n * @alias haveOwnProperty\n * @param {String} name\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertOwnProperty (name, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n this.assert(\n obj.hasOwnProperty(name)\n , 'expected #{this} to have own property ' + _.inspect(name)\n , 'expected #{this} to not have own property ' + _.inspect(name)\n );\n }\n\n Assertion.addMethod('ownProperty', assertOwnProperty);\n Assertion.addMethod('haveOwnProperty', assertOwnProperty);\n\n /**\n * ### .ownPropertyDescriptor(name[, descriptor[, message]])\n *\n * Asserts that the target has an own property descriptor `name`, that optionally matches `descriptor`.\n *\n * expect('test').to.have.ownPropertyDescriptor('length');\n * expect('test').to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 4 });\n * expect('test').not.to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 3 });\n * expect('test').ownPropertyDescriptor('length').to.have.property('enumerable', false);\n * expect('test').ownPropertyDescriptor('length').to.have.keys('value');\n *\n * @name ownPropertyDescriptor\n * @alias haveOwnPropertyDescriptor\n * @param {String} name\n * @param {Object} descriptor _optional_\n * @param {String} message _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 * ### .length\n *\n * Sets the `doLength` flag later used as a chain precursor to a value\n * comparison for the `length` property.\n *\n * expect('foo').to.have.length.above(2);\n * expect([ 1, 2, 3 ]).to.have.length.above(2);\n * expect('foo').to.have.length.below(4);\n * expect([ 1, 2, 3 ]).to.have.length.below(4);\n * expect('foo').to.have.length.within(2,4);\n * expect([ 1, 2, 3 ]).to.have.length.within(2,4);\n *\n * *Deprecation notice:* Using `length` as an assertion will be deprecated\n * in version 2.4.0 and removed in 3.0.0. Code using the old style of\n * asserting for `length` property value using `length(value)` should be\n * switched to use `lengthOf(value)` instead.\n *\n * @name length\n * @namespace BDD\n * @api public\n */\n\n /**\n * ### .lengthOf(value[, message])\n *\n * Asserts that the target's `length` property has\n * the expected value.\n *\n * expect([ 1, 2, 3]).to.have.lengthOf(3);\n * expect('foobar').to.have.lengthOf(6);\n *\n * @name lengthOf\n * @param {Number} length\n * @param {String} message _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 new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n\n this.assert(\n len == n\n , 'expected #{this} to have a length of #{exp} but got #{act}'\n , 'expected #{this} to not have a length of #{act}'\n , n\n , len\n );\n }\n\n Assertion.addChainableMethod('length', assertLength, assertLengthChain);\n Assertion.addMethod('lengthOf', assertLength);\n\n /**\n * ### .match(regexp)\n *\n * Asserts that the target matches a regular expression.\n *\n * expect('foobar').to.match(/^foo/);\n *\n * @name match\n * @alias matches\n * @param {RegExp} RegularExpression\n * @param {String} message _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(string)\n *\n * Asserts that the string target contains another string.\n *\n * expect('foobar').to.have.string('bar');\n *\n * @name string\n * @param {String} string\n * @param {String} message _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 new Assertion(obj, msg).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 /**\n * ### .keys(key1, [key2], [...])\n *\n * Asserts that the target contains any or all of the passed-in keys.\n * Use in combination with `any`, `all`, `contains`, or `have` will affect\n * what will pass.\n *\n * When used in conjunction with `any`, at least one key that is passed\n * in must exist in the target object. This is regardless whether or not\n * the `have` or `contain` qualifiers are used. Note, either `any` or `all`\n * should be used in the assertion. If neither are used, the assertion is\n * defaulted to `all`.\n *\n * When both `all` and `contain` are used, the target object must have at\n * least all of the passed-in keys but may have more keys not listed.\n *\n * When both `all` and `have` are used, the target object must both contain\n * all of the passed-in keys AND the number of keys in the target object must\n * match the number of keys passed in (in other words, a target object must\n * have all and only all of the passed-in keys).\n *\n * expect({ foo: 1, bar: 2 }).to.have.any.keys('foo', 'baz');\n * expect({ foo: 1, bar: 2 }).to.have.any.keys('foo');\n * expect({ foo: 1, bar: 2 }).to.contain.any.keys('bar', 'baz');\n * expect({ foo: 1, bar: 2 }).to.contain.any.keys(['foo']);\n * expect({ foo: 1, bar: 2 }).to.contain.any.keys({'foo': 6});\n * expect({ foo: 1, bar: 2 }).to.have.all.keys(['bar', 'foo']);\n * expect({ foo: 1, bar: 2 }).to.have.all.keys({'bar': 6, 'foo': 7});\n * expect({ foo: 1, bar: 2, baz: 3 }).to.contain.all.keys(['bar', 'foo']);\n * expect({ foo: 1, bar: 2, baz: 3 }).to.contain.all.keys({'bar': 6});\n *\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 , str\n , ok = true\n , mixedArgsMsg = 'keys must be given single argument of Array|Object|String, or multiple String arguments';\n\n switch (_.type(keys)) {\n case \"array\":\n if (arguments.length > 1) throw (new Error(mixedArgsMsg));\n break;\n case \"object\":\n if (arguments.length > 1) throw (new Error(mixedArgsMsg));\n keys = Object.keys(keys);\n break;\n default:\n keys = Array.prototype.slice.call(arguments);\n }\n\n if (!keys.length) throw new Error('keys required');\n\n var actual = Object.keys(obj)\n , expected = keys\n , len = keys.length\n , any = flag(this, 'any')\n , all = flag(this, 'all');\n\n if (!any && !all) {\n all = true;\n }\n\n // Has any\n if (any) {\n var intersection = expected.filter(function(key) {\n return ~actual.indexOf(key);\n });\n ok = intersection.length > 0;\n }\n\n // Has all\n if (all) {\n ok = keys.every(function(key){\n return ~actual.indexOf(key);\n });\n if (!flag(this, 'negate') && !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 ' + str\n , 'expected #{this} to not ' + str\n , expected.slice(0).sort()\n , actual.sort()\n , true\n );\n }\n\n Assertion.addMethod('keys', assertKeys);\n Assertion.addMethod('key', assertKeys);\n\n /**\n * ### .throw(constructor)\n *\n * Asserts that the function target will throw a specific error, or specific type of error\n * (as determined using `instanceof`), optionally with a RegExp or string inclusion test\n * for the error's message.\n *\n * var err = new ReferenceError('This is a bad function.');\n * var fn = function () { throw err; }\n * expect(fn).to.throw(ReferenceError);\n * expect(fn).to.throw(Error);\n * expect(fn).to.throw(/bad function/);\n * expect(fn).to.not.throw('good function');\n * expect(fn).to.throw(ReferenceError, /bad function/);\n * expect(fn).to.throw(err);\n *\n * Please note that when a throw expectation is negated, it will check each\n * parameter independently, starting with error constructor type. The appropriate way\n * to check for the existence of a type of error but for a message that does not match\n * is to use `and`.\n *\n * expect(fn).to.throw(ReferenceError)\n * .and.not.throw(/good function/);\n *\n * @name throw\n * @alias throws\n * @alias Throw\n * @param {ErrorConstructor} constructor\n * @param {String|RegExp} expected error message\n * @param {String} message _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 (constructor, errMsg, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n new Assertion(obj, msg).is.a('function');\n\n var thrown = false\n , desiredError = null\n , name = null\n , thrownError = null;\n\n if (arguments.length === 0) {\n errMsg = null;\n constructor = null;\n } else if (constructor && (constructor instanceof RegExp || 'string' === typeof constructor)) {\n errMsg = constructor;\n constructor = null;\n } else if (constructor && constructor instanceof Error) {\n desiredError = constructor;\n constructor = null;\n errMsg = null;\n } else if (typeof constructor === 'function') {\n name = constructor.prototype.name;\n if (!name || (name === 'Error' && constructor !== Error)) {\n name = constructor.name || (new constructor()).name;\n }\n } else {\n constructor = null;\n }\n\n try {\n obj();\n } catch (err) {\n // first, check desired error\n if (desiredError) {\n this.assert(\n err === desiredError\n , 'expected #{this} to throw #{exp} but #{act} was thrown'\n , 'expected #{this} to not throw #{exp}'\n , (desiredError instanceof Error ? desiredError.toString() : desiredError)\n , (err instanceof Error ? err.toString() : err)\n );\n\n flag(this, 'object', err);\n return this;\n }\n\n // next, check constructor\n if (constructor) {\n this.assert(\n err instanceof constructor\n , 'expected #{this} to throw #{exp} but #{act} was thrown'\n , 'expected #{this} to not throw #{exp} but #{act} was thrown'\n , name\n , (err instanceof Error ? err.toString() : err)\n );\n\n if (!errMsg) {\n flag(this, 'object', err);\n return this;\n }\n }\n\n // next, check message\n var message = 'error' === _.type(err) && \"message\" in err\n ? err.message\n : '' + err;\n\n if ((message != null) && errMsg && errMsg instanceof RegExp) {\n this.assert(\n errMsg.exec(message)\n , 'expected #{this} to throw error matching #{exp} but got #{act}'\n , 'expected #{this} to throw error not matching #{exp}'\n , errMsg\n , message\n );\n\n flag(this, 'object', err);\n return this;\n } else if ((message != null) && errMsg && 'string' === typeof errMsg) {\n this.assert(\n ~message.indexOf(errMsg)\n , 'expected #{this} to throw error including #{exp} but got #{act}'\n , 'expected #{this} to throw error not including #{act}'\n , errMsg\n , message\n );\n\n flag(this, 'object', err);\n return this;\n } else {\n thrown = true;\n thrownError = err;\n }\n }\n\n var actuallyGot = ''\n , expectedThrown = name !== null\n ? name\n : desiredError\n ? '#{exp}' //_.inspect(desiredError)\n : 'an error';\n\n if (thrown) {\n actuallyGot = ' but #{act} was thrown'\n }\n\n this.assert(\n thrown === true\n , 'expected #{this} to throw ' + expectedThrown + actuallyGot\n , 'expected #{this} to not throw ' + expectedThrown + actuallyGot\n , (desiredError instanceof Error ? desiredError.toString() : desiredError)\n , (thrownError instanceof Error ? thrownError.toString() : thrownError)\n );\n\n flag(this, 'object', thrownError);\n };\n\n Assertion.addMethod('throw', assertThrows);\n Assertion.addMethod('throws', assertThrows);\n Assertion.addMethod('Throw', assertThrows);\n\n /**\n * ### .respondTo(method)\n *\n * Asserts that the object or class target will respond to a method.\n *\n * Klass.prototype.bar = function(){};\n * expect(Klass).to.respondTo('bar');\n * expect(obj).to.respondTo('bar');\n *\n * To check if a constructor will respond to a static function,\n * set the `itself` flag.\n *\n * Klass.baz = function(){};\n * expect(Klass).itself.to.respondTo('baz');\n *\n * @name respondTo\n * @alias respondsTo\n * @param {String} method\n * @param {String} message _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' === _.type(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 * Sets the `itself` flag, later used by the `respondTo` assertion.\n *\n * function Foo() {}\n * Foo.bar = function() {}\n * Foo.prototype.baz = function() {}\n *\n * expect(Foo).itself.to.respondTo('bar');\n * expect(Foo).itself.not.to.respondTo('baz');\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(method)\n *\n * Asserts that the target passes a given truth test.\n *\n * expect(1).to.satisfy(function(num) { return num > 0; });\n *\n * @name satisfy\n * @alias satisfies\n * @param {Function} matcher\n * @param {String} message _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 , 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)\n *\n * Asserts that the target is equal `expected`, to within a +/- `delta` range.\n *\n * expect(1.5).to.be.closeTo(1, 0.5);\n *\n * @name closeTo\n * @alias approximately\n * @param {Number} expected\n * @param {Number} delta\n * @param {String} message _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\n new Assertion(obj, msg).is.a('number');\n if (_.type(expected) !== 'number' || _.type(delta) !== 'number') {\n throw new Error('the arguments to closeTo or approximately must be numbers');\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 function isSubsetOf(subset, superset, cmp) {\n return subset.every(function(elem) {\n if (!cmp) return superset.indexOf(elem) !== -1;\n\n return superset.some(function(elem2) {\n return cmp(elem, elem2);\n });\n })\n }\n\n /**\n * ### .members(set)\n *\n * Asserts that the target is a superset of `set`,\n * or that the target and `set` have the same strictly-equal (===) members.\n * Alternately, if the `deep` flag is set, set members are compared for deep\n * equality.\n *\n * expect([1, 2, 3]).to.include.members([3, 2]);\n * expect([1, 2, 3]).to.not.include.members([3, 2, 8]);\n *\n * expect([4, 2]).to.have.members([2, 4]);\n * expect([5, 2]).to.not.have.members([5, 2, 1]);\n *\n * expect([{ id: 1 }]).to.deep.include.members([{ id: 1 }]);\n *\n * @name members\n * @param {Array} set\n * @param {String} message _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\n new Assertion(obj).to.be.an('array');\n new Assertion(subset).to.be.an('array');\n\n var cmp = flag(this, 'deep') ? _.eql : undefined;\n\n if (flag(this, 'contains')) {\n return this.assert(\n isSubsetOf(subset, obj, cmp)\n , 'expected #{this} to be a superset of #{act}'\n , 'expected #{this} to not be a superset of #{act}'\n , obj\n , subset\n );\n }\n\n this.assert(\n isSubsetOf(obj, subset, cmp) && isSubsetOf(subset, obj, cmp)\n , 'expected #{this} to have the same members as #{act}'\n , 'expected #{this} to not have the same members as #{act}'\n , obj\n , subset\n );\n });\n\n /**\n * ### .oneOf(list)\n *\n * Assert that a value appears somewhere in the top level of array `list`.\n *\n * expect('a').to.be.oneOf(['a', 'b', 'c']);\n * expect(9).to.not.be.oneOf(['z']);\n * expect([3]).to.not.be.oneOf([1, 2, [3]]);\n *\n * var three = [3];\n * // for object-types, contents are not compared\n * expect(three).to.not.be.oneOf([1, 2, [3]]);\n * // comparing references works\n * expect(three).to.be.oneOf([1, 2, three]);\n *\n * @name oneOf\n * @param {Array<*>} list\n * @param {String} message _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 new Assertion(list).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 /**\n * ### .change(function)\n *\n * Asserts that a function changes an object property\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val += 3 };\n * var noChangeFn = function() { return 'foo' + 'bar'; }\n * expect(fn).to.change(obj, 'val');\n * expect(noChangeFn).to.not.change(obj, 'val')\n *\n * @name change\n * @alias changes\n * @alias Change\n * @param {String} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertChanges (object, prop, msg) {\n if (msg) flag(this, 'message', msg);\n var fn = flag(this, 'object');\n new Assertion(object, msg).to.have.property(prop);\n new Assertion(fn).is.a('function');\n\n var initial = object[prop];\n fn();\n\n this.assert(\n initial !== object[prop]\n , 'expected .' + prop + ' to change'\n , 'expected .' + prop + ' to not change'\n );\n }\n\n Assertion.addChainableMethod('change', assertChanges);\n Assertion.addChainableMethod('changes', assertChanges);\n\n /**\n * ### .increase(function)\n *\n * Asserts that a function increases an object property\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 15 };\n * expect(fn).to.increase(obj, 'val');\n *\n * @name increase\n * @alias increases\n * @alias Increase\n * @param {String} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertIncreases (object, prop, msg) {\n if (msg) flag(this, 'message', msg);\n var fn = flag(this, 'object');\n new Assertion(object, msg).to.have.property(prop);\n new Assertion(fn).is.a('function');\n\n var initial = object[prop];\n fn();\n\n this.assert(\n object[prop] - initial > 0\n , 'expected .' + prop + ' to increase'\n , 'expected .' + prop + ' to not increase'\n );\n }\n\n Assertion.addChainableMethod('increase', assertIncreases);\n Assertion.addChainableMethod('increases', assertIncreases);\n\n /**\n * ### .decrease(function)\n *\n * Asserts that a function decreases an object property\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 5 };\n * expect(fn).to.decrease(obj, 'val');\n *\n * @name decrease\n * @alias decreases\n * @alias Decrease\n * @param {String} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertDecreases (object, prop, msg) {\n if (msg) flag(this, 'message', msg);\n var fn = flag(this, 'object');\n new Assertion(object, msg).to.have.property(prop);\n new Assertion(fn).is.a('function');\n\n var initial = object[prop];\n fn();\n\n this.assert(\n object[prop] - initial < 0\n , 'expected .' + prop + ' to decrease'\n , 'expected .' + prop + ' to not decrease'\n );\n }\n\n Assertion.addChainableMethod('decrease', assertDecreases);\n Assertion.addChainableMethod('decreases', assertDecreases);\n\n /**\n * ### .extensible\n *\n * Asserts that the target is extensible (can have new properties added to\n * it).\n *\n * var nonExtensibleObject = Object.preventExtensions({});\n * var sealedObject = Object.seal({});\n * var frozenObject = Object.freeze({});\n *\n * expect({}).to.be.extensible;\n * expect(nonExtensibleObject).to.not.be.extensible;\n * expect(sealedObject).to.not.be.extensible;\n * expect(frozenObject).to.not.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 not an object (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 when a TypeError is thrown under ES5.\n\n var isExtensible;\n\n try {\n isExtensible = Object.isExtensible(obj);\n } catch (err) {\n if (err instanceof TypeError) isExtensible = false;\n else throw err;\n }\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 (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.freeze({});\n *\n * expect(sealedObject).to.be.sealed;\n * expect(frozenObject).to.be.sealed;\n * expect({}).to.not.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 not an object (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 when a TypeError is thrown under ES5.\n\n var isSealed;\n\n try {\n isSealed = Object.isSealed(obj);\n } catch (err) {\n if (err instanceof TypeError) isSealed = true;\n else throw err;\n }\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 (cannot have new properties added to it\n * and its existing properties cannot be modified).\n *\n * var frozenObject = Object.freeze({});\n *\n * expect(frozenObject).to.be.frozen;\n * expect({}).to.not.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 not an object (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 when a TypeError is thrown under ES5.\n\n var isFrozen;\n\n try {\n isFrozen = Object.isFrozen(obj);\n } catch (err) {\n if (err instanceof TypeError) isFrozen = true;\n else throw err;\n }\n\n this.assert(\n isFrozen\n , 'expected #{this} to be frozen'\n , 'expected #{this} to not be frozen'\n );\n });\n};\n","/*!\n * chai\n * Copyright(c) 2011-2014 Jake Luer \n * MIT Licensed\n */\n\n\nmodule.exports = function (chai, util) {\n\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);\n test.assert(\n express\n , errmsg\n , '[ negation message unavailable ]'\n );\n };\n\n /**\n * ### .fail(actual, expected, [message], [operator])\n *\n * Throw a failure. Node.js `assert` module-compatible.\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 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).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).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);\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 );\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);\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 );\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).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).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 * @namespace Assert\n * @api public\n */\n\n assert.deepEqual = function (act, exp, msg) {\n new Assertion(act, msg).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).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).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).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).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).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).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).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).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).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).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).to.not.equal(null);\n };\n\n /**\n * ### .isNaN\n * Asserts that value is NaN\n *\n * assert.isNaN('foo', 'foo 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).to.be.NaN;\n };\n\n /**\n * ### .isNotNaN\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).not.to.be.NaN;\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).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).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).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).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).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).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).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).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).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).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).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).to.not.be.a('number');\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).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).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).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).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).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).to.not.be.instanceOf(type);\n };\n\n /**\n * ### .include(haystack, needle, [message])\n *\n * Asserts that `haystack` includes `needle`. Works\n * for strings and arrays.\n *\n * assert.include('foobar', 'bar', 'foobar contains string \"bar\"');\n * assert.include([ 1, 2, 3 ], 3, 'array contains value');\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).include(inc);\n };\n\n /**\n * ### .notInclude(haystack, needle, [message])\n *\n * Asserts that `haystack` does not include `needle`. Works\n * for strings and arrays.\n *\n * assert.notInclude('foobar', 'baz', 'string not include substring');\n * assert.notInclude([ 1, 2, 3 ], 4, 'array not include contain value');\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).not.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).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).to.not.match(re);\n };\n\n /**\n * ### .property(object, property, [message])\n *\n * Asserts that `object` has a property named by `property`.\n *\n * assert.property({ tea: { green: 'matcha' }}, 'tea');\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).to.have.property(prop);\n };\n\n /**\n * ### .notProperty(object, property, [message])\n *\n * Asserts that `object` does _not_ have a property named 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).to.not.have.property(prop);\n };\n\n /**\n * ### .deepProperty(object, property, [message])\n *\n * Asserts that `object` has a property named by `property`, which can be a\n * string using dot- and bracket-notation for deep reference.\n *\n * assert.deepProperty({ tea: { green: 'matcha' }}, 'tea.green');\n *\n * @name deepProperty\n * @param {Object} object\n * @param {String} property\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.deepProperty = function (obj, prop, msg) {\n new Assertion(obj, msg).to.have.deep.property(prop);\n };\n\n /**\n * ### .notDeepProperty(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 deep reference.\n *\n * assert.notDeepProperty({ tea: { green: 'matcha' }}, 'tea.oolong');\n *\n * @name notDeepProperty\n * @param {Object} object\n * @param {String} property\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notDeepProperty = function (obj, prop, msg) {\n new Assertion(obj, msg).to.not.have.deep.property(prop);\n };\n\n /**\n * ### .propertyVal(object, property, value, [message])\n *\n * Asserts that `object` has a property named by `property` with value given\n * by `value`.\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).to.have.property(prop, val);\n };\n\n /**\n * ### .propertyNotVal(object, property, value, [message])\n *\n * Asserts that `object` has a property named by `property`, but with a value\n * different from that given by `value`.\n *\n * assert.propertyNotVal({ tea: 'is good' }, 'tea', 'is bad');\n *\n * @name propertyNotVal\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.propertyNotVal = function (obj, prop, val, msg) {\n new Assertion(obj, msg).to.not.have.property(prop, val);\n };\n\n /**\n * ### .deepPropertyVal(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 deep\n * reference.\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).to.have.deep.property(prop, val);\n };\n\n /**\n * ### .deepPropertyNotVal(object, property, value, [message])\n *\n * Asserts that `object` has a property named by `property`, but with a value\n * different from that given by `value`. `property` can use dot- and\n * bracket-notation for deep reference.\n *\n * assert.deepPropertyNotVal({ tea: { green: 'matcha' }}, 'tea.green', 'konacha');\n *\n * @name deepPropertyNotVal\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.deepPropertyNotVal = function (obj, prop, val, msg) {\n new Assertion(obj, msg).to.not.have.deep.property(prop, val);\n };\n\n /**\n * ### .lengthOf(object, length, [message])\n *\n * Asserts that `object` has a `length` property 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 *\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).to.have.length(len);\n };\n\n /**\n * ### .throws(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 * assert.throws(fn, 'function throws a reference error');\n * assert.throws(fn, /function throws a reference error/);\n * assert.throws(fn, ReferenceError);\n * assert.throws(fn, ReferenceError, 'function throws a reference error');\n * assert.throws(fn, ReferenceError, /function throws a reference error/);\n *\n * @name throws\n * @alias 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 Assert\n * @api public\n */\n\n assert.throws = function (fn, errt, errs, msg) {\n if ('string' === typeof errt || errt instanceof RegExp) {\n errs = errt;\n errt = null;\n }\n\n var assertErr = new Assertion(fn, msg).to.throw(errt, errs);\n return flag(assertErr, 'object');\n };\n\n /**\n * ### .doesNotThrow(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 * assert.doesNotThrow(fn, Error, 'function does not throw');\n *\n * @name doesNotThrow\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 Assert\n * @api public\n */\n\n assert.doesNotThrow = function (fn, type, msg) {\n if ('string' === typeof type) {\n msg = type;\n type = null;\n }\n\n new Assertion(fn, msg).to.not.Throw(type);\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 throw new Error('Invalid operator \"' + operator + '\"');\n }\n var test = new Assertion(ok, msg);\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).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).to.be.approximately(exp, delta);\n };\n\n /**\n * ### .sameMembers(set1, set2, [message])\n *\n * Asserts that `set1` and `set2` have the same members.\n * Order is not taken into account.\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).to.have.same.members(set2);\n }\n\n /**\n * ### .sameDeepMembers(set1, set2, [message])\n *\n * Asserts that `set1` and `set2` have the same members - using a deep equality checking.\n * Order is not taken into account.\n *\n * assert.sameDeepMembers([ {b: 3}, {a: 2}, {c: 5} ], [ {c: 5}, {b: 3}, {a: 2} ], '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).to.have.same.deep.members(set2);\n }\n\n /**\n * ### .includeMembers(superset, subset, [message])\n *\n * Asserts that `subset` is included in `superset`.\n * Order is not taken into account.\n *\n * assert.includeMembers([ 1, 2, 3 ], [ 2, 1 ], '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).to.include.members(subset);\n }\n\n /**\n * ### .includeDeepMembers(superset, subset, [message])\n *\n * Asserts that `subset` is included in `superset` - using deep equality checking.\n * Order is not taken into account.\n * 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).to.include.deep.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).to.be.oneOf(list);\n }\n\n /**\n * ### .changes(function, object, property)\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\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.changes = function (fn, obj, prop) {\n new Assertion(fn).to.change(obj, prop);\n }\n\n /**\n * ### .doesNotChange(function, object, property)\n *\n * Asserts that a function does not changes 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\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotChange = function (fn, obj, prop) {\n new Assertion(fn).to.not.change(obj, prop);\n }\n\n /**\n * ### .increases(function, object, property)\n *\n * Asserts that a function increases an 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\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.increases = function (fn, obj, prop) {\n new Assertion(fn).to.increase(obj, prop);\n }\n\n /**\n * ### .doesNotIncrease(function, object, property)\n *\n * Asserts that a function does not increase 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\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotIncrease = function (fn, obj, prop) {\n new Assertion(fn).to.not.increase(obj, prop);\n }\n\n /**\n * ### .decreases(function, object, property)\n *\n * Asserts that a function decreases an 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\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.decreases = function (fn, obj, prop) {\n new Assertion(fn).to.decrease(obj, prop);\n }\n\n /**\n * ### .doesNotDecrease(function, object, property)\n *\n * Asserts that a function does not decreases an 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\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotDecrease = function (fn, obj, prop) {\n new Assertion(fn).to.not.decrease(obj, prop);\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).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.freese({});\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).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).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).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).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).to.not.be.frozen;\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};\n","/*!\n * chai\n * Copyright(c) 2011-2014 Jake Luer \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(actual, expected, [message], [operator])\n *\n * Throw a failure.\n *\n * @name fail\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @param {String} operator\n * @namespace Expect\n * @api public\n */\n\n chai.expect.fail = function (actual, expected, message, operator) {\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 \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 || this instanceof Number || this instanceof Boolean ) {\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(actual, expected, [message], [operator])\n *\n * Throw a failure.\n *\n * @name fail\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @param {String} operator\n * @namespace Should\n * @api public\n */\n\n should.fail = function (actual, expected, message, operator) {\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 - addChainingMethod utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Module dependencies\n */\n\nvar transferFlags = require('./transferFlags');\nvar flag = require('./flag');\nvar config = require('../config');\n\n/*!\n * Module variables\n */\n\n// Check whether `__proto__` is supported\nvar hasProtoSupport = '__proto__' in Object;\n\n// Without `__proto__` support, this module will need to add properties to a function.\n// However, some Function.prototype methods cannot be overwritten,\n// and there seems no easy cross-platform way to detect them (@see chaijs/chai/issues/69).\nvar excludeNames = /^(?:length|name|arguments|caller)$/;\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 (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 () {\n chainableBehavior.chainingBehavior.call(this);\n\n var assert = function assert() {\n var old_ssfi = flag(this, 'ssfi');\n if (old_ssfi && config.includeStack === false)\n flag(this, 'ssfi', assert);\n var result = chainableBehavior.method.apply(this, arguments);\n return result === undefined ? this : result;\n };\n\n // Use `__proto__` if available\n if (hasProtoSupport) {\n // Inherit all properties from the object by replacing the `Function` prototype\n var prototype = assert.__proto__ = Object.create(this);\n // Restore the `call` and `apply` methods from `Function`\n prototype.call = call;\n prototype.apply = apply;\n }\n // Otherwise, redefine all properties (slow!)\n else {\n var asserterNames = Object.getOwnPropertyNames(ctx);\n asserterNames.forEach(function (asserterName) {\n if (!excludeNames.test(asserterName)) {\n var pd = Object.getOwnPropertyDescriptor(ctx, asserterName);\n Object.defineProperty(assert, asserterName, pd);\n }\n });\n }\n\n transferFlags(this, assert);\n return assert;\n }\n , configurable: true\n });\n};\n","/*!\n * Chai - addMethod utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\nvar config = require('../config');\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 */\nvar flag = require('./flag');\n\nmodule.exports = function (ctx, name, method) {\n ctx[name] = function () {\n var old_ssfi = flag(this, 'ssfi');\n if (old_ssfi && config.includeStack === false)\n flag(this, 'ssfi', ctx[name]);\n var result = method.apply(this, arguments);\n return result === undefined ? this : result;\n };\n};\n","/*!\n * Chai - addProperty utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\nvar config = require('../config');\nvar flag = require('./flag');\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 (ctx, name, getter) {\n Object.defineProperty(ctx, name,\n { get: function addProperty() {\n var old_ssfi = flag(this, 'ssfi');\n if (old_ssfi && config.includeStack === false)\n flag(this, 'ssfi', addProperty);\n\n var result = getter.call(this);\n return result === undefined ? this : result;\n }\n , configurable: true\n });\n};\n","/*!\n * Chai - expectTypes utility\n * Copyright(c) 2012-2014 Jake Luer \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 (obj, types) {\n var obj = flag(obj, 'object');\n types = types.map(function (t) { return t.toLowerCase(); });\n types.sort();\n\n // Transforms ['lorem', 'ipsum'] into 'a lirum, 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 if (!types.some(function (expected) { return type(obj) === expected; })) {\n throw new AssertionError(\n 'object tested must be ' + str + ', but ' + type(obj) + ' given'\n );\n }\n};\n","/*!\n * Chai - flag utility\n * Copyright(c) 2012-2014 Jake Luer \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 (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 - getActual utility\n * Copyright(c) 2012-2014 Jake Luer \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 (obj, args) {\n return args.length > 4 ? args[4] : obj._obj;\n};\n","/*!\n * Chai - getEnumerableProperties utility\n * Copyright(c) 2012-2014 Jake Luer \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","/*!\n * Chai - message composition utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Module dependancies\n */\n\nvar flag = require('./flag')\n , getActual = require('./getActual')\n , inspect = require('./inspect')\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 (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 - getName utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * # getName(func)\n *\n * Gets the name of a function, in a cross-browser way.\n *\n * @param {Function} a function (usually a constructor)\n * @namespace Utils\n * @name getName\n */\n\nmodule.exports = function (func) {\n if (func.name) return func.name;\n\n var match = /^\\s?function ([^(]*)\\(/.exec(func);\n return match && match[1] ? match[1] : \"\";\n};\n","/*!\n * Chai - getPathInfo utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\nvar hasProperty = require('./hasProperty');\n\n/**\n * ### .getPathInfo(path, object)\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 {String} path\n * @param {Object} object\n * @returns {Object} info\n * @namespace Utils\n * @name getPathInfo\n * @api public\n */\n\nmodule.exports = function getPathInfo(path, obj) {\n var parsed = parsePath(path),\n last = parsed[parsed.length - 1];\n\n var info = {\n parent: parsed.length > 1 ? _getPathValue(parsed, obj, parsed.length - 1) : obj,\n name: last.p || last.i,\n value: _getPathValue(parsed, obj)\n };\n info.exists = hasProperty(info.name, info.parent);\n\n return info;\n};\n\n\n/*!\n * ## parsePath(path)\n *\n * Helper function used to parse string object\n * paths. Use in conjunction with `_getPathValue`.\n *\n * var parsed = parsePath('myobject.property.subprop');\n *\n * ### Paths:\n *\n * * Can be as near 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 , parts = str.match(/(\\\\\\.|[^.]+?)+/g);\n return parts.map(function (value) {\n var re = /^\\[(\\d+)\\]$/\n , mArr = re.exec(value);\n if (mArr) return { i: parseFloat(mArr[1]) };\n else return { p: value.replace(/\\\\([.\\[\\]])/g, '$1') };\n });\n}\n\n\n/*!\n * ## _getPathValue(parsed, obj)\n *\n * Helper companion function for `.parsePath` that returns\n * the value located at the parsed address.\n *\n * var value = getPathValue(parsed, obj);\n *\n * @param {Object} parsed definition from `parsePath`.\n * @param {Object} object to search against\n * @param {Number} object to search against\n * @returns {Object|Undefined} value\n * @api private\n */\n\nfunction _getPathValue (parsed, obj, index) {\n var tmp = obj\n , res;\n\n index = (index === undefined ? parsed.length : index);\n\n for (var i = 0, l = index; i < l; i++) {\n var part = parsed[i];\n if (tmp) {\n if ('undefined' !== typeof part.p)\n tmp = tmp[part.p];\n else if ('undefined' !== typeof part.i)\n tmp = tmp[part.i];\n if (i == (l - 1)) res = tmp;\n } else {\n res = undefined;\n }\n }\n return res;\n}\n","/*!\n * Chai - getPathValue utility\n * Copyright(c) 2012-2014 Jake Luer \n * @see https://github.com/logicalparadox/filtr\n * MIT Licensed\n */\n\nvar getPathInfo = require('./getPathInfo');\n\n/**\n * ### .getPathValue(path, object)\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('prop1.str', obj); // Hello\n * getPathValue('prop1.att[2]', obj); // b\n * getPathValue('prop2.arr[0].nested', obj); // Universe\n *\n * @param {String} path\n * @param {Object} object\n * @returns {Object} value or `undefined`\n * @namespace Utils\n * @name getPathValue\n * @api public\n */\nmodule.exports = function(path, obj) {\n var info = getPathInfo(path, obj);\n return info.value;\n};\n","/*!\n * Chai - getProperties utility\n * Copyright(c) 2012-2014 Jake Luer \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 - hasProperty utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\nvar type = require('type-detect');\n\n/**\n * ### .hasProperty(object, name)\n *\n * This allows checking whether an object has\n * named property or numeric array index.\n *\n * Basically does the same thing as the `in`\n * operator but works properly with natives\n * and null/undefined values.\n *\n * var obj = {\n * arr: ['a', 'b', 'c']\n * , str: 'Hello'\n * }\n *\n * The following would be the results.\n *\n * hasProperty('str', obj); // true\n * hasProperty('constructor', obj); // true\n * hasProperty('bar', obj); // false\n *\n * hasProperty('length', obj.str); // true\n * hasProperty(1, obj.str); // true\n * hasProperty(5, obj.str); // false\n *\n * hasProperty('length', obj.arr); // true\n * hasProperty(2, obj.arr); // true\n * hasProperty(3, obj.arr); // false\n *\n * @param {Objuect} object\n * @param {String|Number} name\n * @returns {Boolean} whether it exists\n * @namespace Utils\n * @name getPathInfo\n * @api public\n */\n\nvar literals = {\n 'number': Number\n , 'string': String\n};\n\nmodule.exports = function hasProperty(name, obj) {\n var ot = type(obj);\n\n // Bad Object, obviously no props at all\n if(ot === 'null' || ot === 'undefined')\n return false;\n\n // The `in` operator does not work with certain literals\n // box these before the check\n if(literals[ot] && typeof obj !== 'object')\n obj = new literals[ot](obj);\n\n return name in obj;\n};\n","/*!\n * chai\n * Copyright(c) 2011 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Main exports\n */\n\nvar exports = module.exports = {};\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 value\n */\n\nexports.getPathValue = require('./getPathValue');\n\n/*!\n * Deep path info\n */\n\nexports.getPathInfo = require('./getPathInfo');\n\n/*!\n * Check if a property exists\n */\n\nexports.hasProperty = require('./hasProperty');\n\n/*!\n * Function name\n */\n\nexports.getName = require('./getName');\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","// This is (almost) directly from Node.js utils\n// https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/util.js\n\nvar getName = require('./getName');\nvar getProperties = require('./getProperties');\nvar getEnumerableProperties = require('./getEnumerableProperties');\n\nmodule.exports = inspect;\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 {Boolean} showHidden Flag that shows hidden (not enumerable)\n * properties of objects.\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 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);\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 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 // Some type of object without properties can be shortcutted.\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 var name = getName(value);\n var 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 = '', 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 (typeof value === 'function') {\n var name = getName(value);\n var 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 {\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 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 // For some reason typeof null is \"object\", so special case here.\n if (value === null) {\n return ctx.stylize('null', 'null');\n }\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 (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 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;\n if (value.__lookupGetter__) {\n if (value.__lookupGetter__(key)) {\n if (value.__lookupSetter__(key)) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (value.__lookupSetter__(key)) {\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\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.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 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 \n * MIT Licensed\n */\n\n/*!\n * Module dependancies\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 (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 - overwriteChainableMethod utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * ### overwriteChainableMethod (ctx, name, method, chainingBehavior)\n *\n * Overwites 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, 'length',\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.length(3);\n * expect(myFoo).to.have.length.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 (ctx, name, method, chainingBehavior) {\n var chainableBehavior = ctx.__methods[name];\n\n var _chainingBehavior = chainableBehavior.chainingBehavior;\n chainableBehavior.chainingBehavior = function () {\n var result = chainingBehavior(_chainingBehavior).call(this);\n return result === undefined ? this : result;\n };\n\n var _method = chainableBehavior.method;\n chainableBehavior.method = function () {\n var result = method(_method).apply(this, arguments);\n return result === undefined ? this : result;\n };\n};\n","/*!\n * Chai - overwriteMethod utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * ### overwriteMethod (ctx, name, fn)\n *\n * Overwites 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 (ctx, name, method) {\n var _method = ctx[name]\n , _super = function () { return this; };\n\n if (_method && 'function' === typeof _method)\n _super = _method;\n\n ctx[name] = function () {\n var result = method(_super).apply(this, arguments);\n return result === undefined ? this : result;\n }\n};\n","/*!\n * Chai - overwriteProperty utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * ### overwriteProperty (ctx, name, fn)\n *\n * Overwites 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 (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 () {\n var result = getter(_super).call(this);\n return result === undefined ? this : result;\n }\n , configurable: true\n });\n};\n","/*!\n * Chai - test utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Module dependancies\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 (obj, args) {\n var negate = flag(obj, 'negate')\n , expr = args[0];\n return negate ? !expr : expr;\n};\n","/*!\n * Chai - transferFlags utility\n * Copyright(c) 2012-2014 Jake Luer \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`, and `message`)\n * will not be transferred.\n *\n *\n * var newAssertion = new Assertion();\n * utils.transferFlags(assertion, newAssertion);\n *\n * var anotherAsseriton = 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 (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 != 'message')) {\n object.__flags[flag] = flags[flag];\n }\n }\n};\n","\"use strict\";\n\nfunction dedent(strings) {\n\n var raw = void 0;\n if (typeof strings === \"string\") {\n // dedent can be used as a plain function\n raw = [strings];\n } else {\n raw = strings.raw;\n }\n\n // first, perform interpolation\n var result = \"\";\n for (var i = 0; i < raw.length; i++) {\n result += raw[i].\n // join lines when there is a suppressed newline\n replace(/\\\\\\n[ \\t]*/g, \"\").\n\n // handle escaped backticks\n replace(/\\\\`/g, \"`\");\n\n if (i < (arguments.length <= 1 ? 0 : arguments.length - 1)) {\n result += arguments.length <= i + 1 ? undefined : arguments[i + 1];\n }\n }\n\n // now strip indentation\n var lines = result.split(\"\\n\");\n var mindent = null;\n lines.forEach(function (l) {\n var m = l.match(/^(\\s+)\\S+/);\n if (m) {\n var indent = m[1].length;\n if (!mindent) {\n // this is the first indented line\n mindent = indent;\n } else {\n mindent = Math.min(mindent, indent);\n }\n }\n });\n\n if (mindent !== null) {\n result = lines.map(function (l) {\n return l[0] === \" \" ? l.slice(mindent) : l;\n }).join(\"\\n\");\n }\n\n // dedent eats leading and trailing whitespace too\n result = result.trim();\n\n // handle escaped newlines at the end to ensure they don't get stripped too\n return result.replace(/\\\\n/g, \"\\n\");\n}\n\nif (typeof module !== \"undefined\") {\n module.exports = dedent;\n}\n","module.exports = require('./lib/eql');\n","/*!\n * deep-eql\n * Copyright(c) 2013 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Module dependencies\n */\n\nvar type = require('type-detect');\n\n/*!\n * Buffer.isBuffer browser shim\n */\n\nvar Buffer;\ntry { Buffer = require('buffer').Buffer; }\ncatch(ex) {\n Buffer = {};\n Buffer.isBuffer = function() { return false; }\n}\n\n/*!\n * Primary Export\n */\n\nmodule.exports = deepEqual;\n\n/**\n * Assert super-strict (egal) equality between\n * two objects of any type.\n *\n * @param {Mixed} a\n * @param {Mixed} b\n * @param {Array} memoised (optional)\n * @return {Boolean} equal match\n */\n\nfunction deepEqual(a, b, m) {\n if (sameValue(a, b)) {\n return true;\n } else if ('date' === type(a)) {\n return dateEqual(a, b);\n } else if ('regexp' === type(a)) {\n return regexpEqual(a, b);\n } else if (Buffer.isBuffer(a)) {\n return bufferEqual(a, b);\n } else if ('arguments' === type(a)) {\n return argumentsEqual(a, b, m);\n } else if (!typeEqual(a, b)) {\n return false;\n } else if (('object' !== type(a) && 'object' !== type(b))\n && ('array' !== type(a) && 'array' !== type(b))) {\n return sameValue(a, b);\n } else {\n return objectEqual(a, b, m);\n }\n}\n\n/*!\n * Strict (egal) equality test. Ensures that NaN always\n * equals NaN and `-0` does not equal `+0`.\n *\n * @param {Mixed} a\n * @param {Mixed} b\n * @return {Boolean} equal match\n */\n\nfunction sameValue(a, b) {\n if (a === b) return a !== 0 || 1 / a === 1 / b;\n return a !== a && b !== b;\n}\n\n/*!\n * Compare the types of two given objects and\n * return if they are equal. Note that an Array\n * has a type of `array` (not `object`) and arguments\n * have a type of `arguments` (not `array`/`object`).\n *\n * @param {Mixed} a\n * @param {Mixed} b\n * @return {Boolean} result\n */\n\nfunction typeEqual(a, b) {\n return type(a) === type(b);\n}\n\n/*!\n * Compare two Date objects by asserting that\n * the time values are equal using `saveValue`.\n *\n * @param {Date} a\n * @param {Date} b\n * @return {Boolean} result\n */\n\nfunction dateEqual(a, b) {\n if ('date' !== type(b)) return false;\n return sameValue(a.getTime(), b.getTime());\n}\n\n/*!\n * Compare two regular expressions by converting them\n * to string and checking for `sameValue`.\n *\n * @param {RegExp} a\n * @param {RegExp} b\n * @return {Boolean} result\n */\n\nfunction regexpEqual(a, b) {\n if ('regexp' !== type(b)) return false;\n return sameValue(a.toString(), b.toString());\n}\n\n/*!\n * Assert deep equality of two `arguments` objects.\n * Unfortunately, these must be sliced to arrays\n * prior to test to ensure no bad behavior.\n *\n * @param {Arguments} a\n * @param {Arguments} b\n * @param {Array} memoize (optional)\n * @return {Boolean} result\n */\n\nfunction argumentsEqual(a, b, m) {\n if ('arguments' !== type(b)) return false;\n a = [].slice.call(a);\n b = [].slice.call(b);\n return deepEqual(a, b, m);\n}\n\n/*!\n * Get enumerable properties of a given object.\n *\n * @param {Object} a\n * @return {Array} property names\n */\n\nfunction enumerable(a) {\n var res = [];\n for (var key in a) res.push(key);\n return res;\n}\n\n/*!\n * Simple equality for flat iterable objects\n * such as Arrays or Node.js buffers.\n *\n * @param {Iterable} a\n * @param {Iterable} b\n * @return {Boolean} result\n */\n\nfunction iterableEqual(a, b) {\n if (a.length !== b.length) return false;\n\n var i = 0;\n var match = true;\n\n for (; i < a.length; i++) {\n if (a[i] !== b[i]) {\n match = false;\n break;\n }\n }\n\n return match;\n}\n\n/*!\n * Extension to `iterableEqual` specifically\n * for Node.js Buffers.\n *\n * @param {Buffer} a\n * @param {Mixed} b\n * @return {Boolean} result\n */\n\nfunction bufferEqual(a, b) {\n if (!Buffer.isBuffer(b)) return false;\n return iterableEqual(a, b);\n}\n\n/*!\n * Block for `objectEqual` ensuring non-existing\n * values don't get in.\n *\n * @param {Mixed} object\n * @return {Boolean} result\n */\n\nfunction isValue(a) {\n return a !== null && a !== undefined;\n}\n\n/*!\n * Recursively check the equality of two objects.\n * Once basic sameness has been established it will\n * defer to `deepEqual` for each enumerable key\n * in the object.\n *\n * @param {Mixed} a\n * @param {Mixed} b\n * @return {Boolean} result\n */\n\nfunction objectEqual(a, b, m) {\n if (!isValue(a) || !isValue(b)) {\n return false;\n }\n\n if (a.prototype !== b.prototype) {\n return false;\n }\n\n var i;\n if (m) {\n for (i = 0; i < m.length; i++) {\n if ((m[i][0] === a && m[i][1] === b)\n || (m[i][0] === b && m[i][1] === a)) {\n return true;\n }\n }\n } else {\n m = [];\n }\n\n try {\n var ka = enumerable(a);\n var kb = enumerable(b);\n } catch (ex) {\n return false;\n }\n\n ka.sort();\n kb.sort();\n\n if (!iterableEqual(ka, kb)) {\n return false;\n }\n\n m.push([ a, b ]);\n\n var key;\n for (i = ka.length - 1; i >= 0; i--) {\n key = ka[i];\n if (!deepEqual(a[key], b[key], m)) {\n return false;\n }\n }\n\n return true;\n}\n","const initial = require('./problems/initial');\nconst arrays = require('./problems/arrays');\n\nmodule.exports = {\n initial: initial,\n arrays: arrays\n};\n","module.exports = [\n {\n name: 'Access Array by index (first)',\n time: 10,\n prompt: 'Return the first value of the Array',\n given: `const fruits = ['apple', 'banana'];\\r`,\n answer: `const fruits = ['apple', 'banana'];\n return fruits[0];`,\n tests: [\n {\n name: 'Correct output',\n test: 'assert.deepEqual(output, \\'apple\\') === undefined'\n },\n {\n name: 'Returns a String',\n test: 'assert.isString(output) === undefined'\n }\n ]\n },\n {\n name: 'Access Array by index (last)',\n time: 10,\n prompt: 'Return the last value of the Array',\n given: `const fruits = ['apple', 'banana', 'orange'];\\r`,\n answer: `const fruits = ['apple', 'banana', 'orange'];\n return fruits[fruits.length - 1];`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, 'orange') === undefined;`\n },\n {\n name: 'Returns a String',\n test: `assert.isString(output) === undefined;`\n }\n ]\n },\n {\n name: 'Access Array by index (second)',\n time: 10,\n prompt: 'Return the second value of the Array',\n given: `const fruits = ['apple', 'banana'];\\r`,\n answer: `const fruits = ['apple', 'banana'];\n return fruits[1];`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, 'banana') === undefined;`\n },\n {\n name: 'Returns a String',\n test: `assert.isString(output) === undefined;`\n }\n ]\n },\n {\n name: 'Array.forEach()',\n time: 20,\n prompt: 'Loop over the array, add an \\'x\\' to the end of each name, push each fruit into a new array, then return the new array.',\n given: `const fruits = ['apple', 'banana'];\\r`,\n answer: `const fruits = ['apple', 'banana'];\n const newFruits = [];\n fruits.forEach(function(item) {\n newFruits.push(item+'x');\n });\n return newFruits;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, ['applex', 'bananax']) === undefined;`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 2 items',\n test: `assert.lengthOf(output, 2) === undefined;`\n }\n ]\n },\n {\n name: 'Array.push()',\n time: 10,\n prompt: `Add 'orange' to the end of the 'fruits' array and return 'fruits'.`,\n given: `const fruits = ['apple', 'banana'];\\r`,\n answer: `const fruits = ['apple', 'banana'];\n fruits.push('orange');\n return fruits;`,\n tests: [\n {\n name: 'Correct output',\n test: `(assert.deepEqual(output, ['apple', 'banana', 'orange']) === undefined);`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 3 items',\n test: `assert.lengthOf(output, 3) === undefined;`\n }\n ]\n },\n {\n name: 'Array.shift()',\n time: 10,\n prompt: `Remove 'apple' from the front of the 'fruits' array and return 'fruits'.`,\n given: `const fruits = ['apple', 'banana', 'orange'];\\r`,\n answer: `const fruits = ['apple', 'banana', 'orange'];\n fruits.shift();\n return fruits;`,\n tests: [\n {\n name: 'Output must be correct',\n test: `assert.deepEqual(output, ['banana', 'orange']) === undefined;`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 2 items',\n test: `assert.lengthOf(output, 2) === undefined;`\n }\n ]\n },\n {\n name: 'Array.unshift()',\n time: 10,\n prompt: `Add 'strawberry' to the front of the 'fruits' array and return 'fruits'.`,\n given: `const fruits = ['apple', 'banana', 'orange'];\\r`,\n answer: `const fruits = ['apple', 'banana', 'orange'];\n fruits.unshift('strawberry');\n return fruits;`,\n tests: [\n {\n name: 'Output must be correct',\n test: `(assert.deepEqual(output, [\n 'strawberry',\n 'apple',\n 'banana',\n 'orange'\n ]) === undefined)`\n },\n {\n name: 'Must return an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 4 items',\n test: `assert.lengthOf(output, 4) === undefined;`\n }\n ]\n },\n {\n name: 'Array.indexOf()',\n time: 10,\n prompt: `Return the index of 'banana' in the Array.`,\n given: `const fruits = ['strawberry', 'banana', 'mango'];\\r`,\n answer: `const fruits = ['strawberry', 'banana', 'mango'];\n const ind = fruits.indexOf('banana');\n return ind;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, 1) === undefined;`\n },\n {\n name: 'Returns a Number',\n test: `assert.isNumber(output) === undefined;`\n }\n ]\n },\n {\n name: 'Array.concat()',\n time: 10,\n prompt: `Merge the two arrays using Array's 'concat()' method. Return the resulting array.`,\n given: `const fruits = ['strawberry', 'banana'];\\rconst otherFruits = ['pear','peach'];\\r`,\n answer: `const fruits = ['strawberry', 'banana'];\n const otherFruits = ['pear','peach'];\n const allTheFruits = fruits.concat(otherFruits);\n return allTheFruits;\\r`,\n tests: [\n {\n name: 'Correct output',\n test: `(assert.deepEqual(output, [\n 'strawberry',\n 'banana',\n 'pear',\n 'peach'\n ]) === undefined\n );`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 4 items',\n test: `assert.lengthOf(output, 4) === undefined;`\n }\n ]\n },\n {\n name: 'Array.join()',\n time: 10,\n prompt: `Mix the two flavors with a '-' using Array's 'join' method. Return the resulting hybrid flavor.`,\n given: `const fruits = ['strawberry', 'banana'];\\r`,\n answer: `const fruits = ['strawberry', 'banana'];\n const hybrid = fruits.join('-');\n return hybrid;\\r`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, 'strawberry-banana') === undefined;`\n },\n {\n name: 'Returns a String',\n test: `assert.isString(output) === undefined;`\n }\n ]\n },\n {\n name: 'Array.slice()',\n time: 20,\n prompt: `Return just the citrus fruits from the 'fruits' array using 'Array.slice()'`,\n given: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\\r`,\n answer: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\n const citrus = fruits.slice(1, 3);\n return citrus;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, ['orange', 'lemon']) === undefined;`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 2 items',\n test: `assert.lengthOf(output, 2) === undefined;`\n }\n ]\n },\n {\n name: 'Array.reverse()',\n time: 10,\n prompt: `Reverse the order of the 'fruit' array using 'Array.reverse()'`,\n given: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\\r`,\n answer: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\n const stiurf = fruits.reverse();\n return stiurf;`,\n tests: [\n {\n name: 'Correct output',\n test: `(assert.deepEqual(output, [\n 'banana',\n 'lemon',\n 'orange',\n 'strawberry'\n ]) === undefined);`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 4 items',\n test: `assert.lengthOf(output, 4) === undefined;`\n },\n {\n name: `First item is 'banana'`,\n test: `assert.deepEqual(output[0], 'banana') === undefined;`\n }\n ]\n },\n {\n name: 'Array.sort()',\n time: 10,\n prompt: `Return the 'fruits' Array after sorting them using 'Array.sort()'.`,\n given: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\\r`,\n answer: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\n const orderlyFruit = fruits.sort();\n return orderlyFruit;`,\n tests: [\n {\n name: 'Correct output',\n test: `(assert.deepEqual(output, [\n 'banana',\n 'lemon',\n 'orange',\n 'strawberry'\n ]) === undefined);`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 4 items',\n test: `assert.lengthOf(output, 4) === undefined;`\n },\n {\n name: `First item is 'banana'`,\n test: `assert.deepEqual(output[0], 'banana') === undefined;`\n }\n ]\n },\n {\n name: 'Array.lastIndexOf()',\n time: 10,\n prompt: `Return the index of the last 'peach' instance in the 'fruit' array using 'Array.lastIndexOf()'`,\n given: `const fruits = ['peach', 'orange', 'lemon', 'peach'];\\r`,\n answer: `const fruits = ['peach', 'orange', 'lemon', 'peach'];\n const wheresTheLastPeach = fruits.lastIndexOf('peach');\n return wheresTheLastPeach;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, 3) === undefined;`\n },\n {\n name: 'Returns a Number',\n test: `assert.isNumber(output) === undefined;`\n }\n ]\n },\n {\n name: 'Array.filter()',\n time: 10,\n prompt: `Return an array of the numbers greater than 5 in 'numbers' using 'Array.filter()'`,\n given: `const numbers = [1, 1, 2, 3, 5, 8, 13, 21];\\r`,\n answer: `const numbers = [1, 1, 2, 3, 5, 8, 13, 21];\n const overFive = numbers.filter(num => num > 5);\n return overFive;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, [8, 13, 21]) === undefined;`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 3 items',\n test: `assert.lengthOf(output, 3) === undefined;`\n },\n {\n name: `First item is 8`,\n test: `assert.deepEqual(output[0], 8) === undefined;`\n }\n ]\n },\n {\n name: 'Array.map()',\n time: 10,\n prompt: `Return an array of 'numbers' array's square roots, using 'Array.map()' and 'Math.sqrt()'`,\n given: `const numbers = [25, 121, 169];\\r`,\n answer: `const numbers = [25, 121, 169];\n const roots = numbers.map(num => Math.sqrt(num));\n return roots;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, [5, 11, 13]) === undefined;`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 3 items',\n test: `assert.lengthOf(output, 3) === undefined;`\n },\n {\n name: `First item is 5`,\n test: `assert.deepEqual(output[0], 5) === undefined;`\n },\n {\n name: `Last item is 13`,\n test: `assert.deepEqual(output[output.length - 1], 13) === undefined;`\n }\n ]\n },\n {\n name: 'Array.every()',\n time: 10,\n prompt: `Return object that returns whether each array contains all even numbers using Array.every().`,\n given: `const evenNumbers = [2, 4, 6, 8];\n const someOddNumbers = [2, 5, 6, 8];\n function isEven(element) {\n \n }\n return {\n evenNumbers: evenNumbers.,\n someOddNumbers: someOddNumbers.\n };`,\n answer: `const evenNumbers = [2, 4, 6, 8];\n const someOddNumbers = [2, 5, 6, 8];\n function isEven(element) {\n return element % 2 === 0\n }\n return {\n evenNumbers: evenNumbers.every(isEven),\n someOddNumbers: someOddNumbers.every(isEven)\n };`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, {\n evenNumbers: true,\n someOddNumbers: false\n }) === undefined;`\n },\n {\n name: 'Returns an Object',\n test: `assert.isObject(output) === undefined;`\n },\n {\n name: 'Object has 2 items',\n test: `assert.lengthOf(Object.keys(output), 2) === undefined;`\n },\n {\n name: `First value is true`,\n test: `assert.isTrue(output.evenNumbers) === undefined;`\n },\n {\n name: `Second value is false`,\n test: `assert.isFalse(output.someOddNumbers) === undefined;`\n }\n ]\n },\n {\n name: 'Array.some()',\n time: 10,\n prompt: `Return 'Object' that returns whether each array contains some odd numbers using 'Array.some()'.`,\n given: `const evenNumbers = [2, 4, 6, 8];\n const someOddNumbers = [2, 4, 7, 8];\n function isOdd(element) {\n \n }\n return {\n evenNumbers: evenNumbers.,\n someOddNumbers: someOddNumbers.\n };`,\n answer: `const evenNumbers = [1, 3, 5, 7];\n const someOddNumbers = [1, 3, 6, 7];\n function isOdd(element) {\n return element % 2 !== 0;\n }\n return {\n evenNumbers: evenNumbers.some(isOdd),\n someOddNumbers: someOddNumbers.some(isOdd)\n };`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, {\n evenNumbers: false,\n someOddNumbers: true\n }) === undefined;`\n },\n {\n name: 'Returns an Object',\n test: `assert.isObject(output) === undefined;`\n },\n {\n name: 'Object has 2 items',\n test: `assert.lengthOf(Object.keys(output), 2) === undefined;`\n },\n {\n name: `First value is false`,\n test: `assert.isFalse(output.evenNumbers) === undefined;`\n },\n {\n name: `Second value is true`,\n test: `assert.isTrue(output.someOddNumbers) === undefined;`\n }\n ]\n }\n // Next problems to create:\n // forEach? fix one above that tried, but can't verify forEach was used\n // some\n // reduce\n // reduceRight\n // Array.from and other ways to turn array-like into array\n];\n","module.exports = [\n {\n name: 'Create Array',\n time: 10,\n prompt: 'Create and return an array that contains \\'apple\\' and \\'banana\\'',\n given: `const fruits = [];\\rreturn fruits;`,\n answer: `const fruits = ['apple', 'banana'];\n return fruits;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, ['apple', 'banana']) === undefined;`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 2 items',\n test: `assert.lengthOf(output, 2) === undefined;`\n }\n ]\n },\n {\n name: 'Array.pop()',\n time: 10,\n prompt: `Remove 'orange' from the end of the 'fruits' array and return 'fruits'.`,\n given: `const fruits = ['apple', 'banana', 'orange'];\\r`,\n answer: `const fruits = ['apple', 'banana', 'orange'];\n fruits.pop();\n return fruits;`,\n tests: [\n {\n name: 'Correct output',\n test: `assert.deepEqual(output, ['apple', 'banana']) === undefined;`\n },\n {\n name: 'Returns an Array',\n test: `assert.isArray(output) === undefined;`\n },\n {\n name: 'Array has 2 items',\n test: `assert.lengthOf(output, 2) === undefined;`\n }\n ]\n }\n]\n","module.exports = require('./lib/type');\n","/*!\n * type-detect\n * Copyright(c) 2013 jake luer \n * MIT Licensed\n */\n\n/*!\n * Primary Exports\n */\n\nvar exports = module.exports = getType;\n\n/*!\n * Detectable javascript natives\n */\n\nvar natives = {\n '[object Array]': 'array'\n , '[object RegExp]': 'regexp'\n , '[object Function]': 'function'\n , '[object Arguments]': 'arguments'\n , '[object Date]': 'date'\n};\n\n/**\n * ### typeOf (obj)\n *\n * Use several different techniques to determine\n * the type of object being tested.\n *\n *\n * @param {Mixed} object\n * @return {String} object type\n * @api public\n */\n\nfunction getType (obj) {\n var str = Object.prototype.toString.call(obj);\n if (natives[str]) return natives[str];\n if (obj === null) return 'null';\n if (obj === undefined) return 'undefined';\n if (obj === Object(obj)) return 'object';\n return typeof obj;\n}\n\nexports.Library = Library;\n\n/**\n * ### Library\n *\n * Create a repository for custom type detection.\n *\n * ```js\n * var lib = new type.Library;\n * ```\n *\n */\n\nfunction Library () {\n this.tests = {};\n}\n\n/**\n * #### .of (obj)\n *\n * Expose replacement `typeof` detection to the library.\n *\n * ```js\n * if ('string' === lib.of('hello world')) {\n * // ...\n * }\n * ```\n *\n * @param {Mixed} object to test\n * @return {String} type\n */\n\nLibrary.prototype.of = getType;\n\n/**\n * #### .define (type, test)\n *\n * Add a test to for the `.test()` assertion.\n *\n * Can be defined as a regular expression:\n *\n * ```js\n * lib.define('int', /^[0-9]+$/);\n * ```\n *\n * ... or as a function:\n *\n * ```js\n * lib.define('bln', function (obj) {\n * if ('boolean' === lib.of(obj)) return true;\n * var blns = [ 'yes', 'no', 'true', 'false', 1, 0 ];\n * if ('string' === lib.of(obj)) obj = obj.toLowerCase();\n * return !! ~blns.indexOf(obj);\n * });\n * ```\n *\n * @param {String} type\n * @param {RegExp|Function} test\n * @api public\n */\n\nLibrary.prototype.define = function (type, test) {\n if (arguments.length === 1) return this.tests[type];\n this.tests[type] = test;\n return this;\n};\n\n/**\n * #### .test (obj, test)\n *\n * Assert that an object is of type. Will first\n * check natives, and if that does not pass it will\n * use the user defined custom tests.\n *\n * ```js\n * assert(lib.test('1', 'int'));\n * assert(lib.test('yes', 'bln'));\n * ```\n *\n * @param {Mixed} object\n * @param {String} type\n * @return {Boolean} result\n * @api public\n */\n\nLibrary.prototype.test = function (obj, type) {\n if (type === getType(obj)) return true;\n var test = this.tests[type];\n\n if (test && 'regexp' === getType(test)) {\n return test.test(obj);\n } else if (test && 'function' === getType(test)) {\n return test(obj);\n } else {\n throw new ReferenceError('Type test \"' + type + '\" not defined or invalid.');\n }\n};\n","/*!\n * type-detect\n * Copyright(c) 2013 jake luer \n * MIT Licensed\n */\n\n/*!\n * Primary Exports\n */\n\nvar exports = module.exports = getType;\n\n/**\n * ### typeOf (obj)\n *\n * Use several different techniques to determine\n * the type of object being tested.\n *\n *\n * @param {Mixed} object\n * @return {String} object type\n * @api public\n */\nvar objectTypeRegexp = /^\\[object (.*)\\]$/;\n\nfunction getType(obj) {\n var type = Object.prototype.toString.call(obj).match(objectTypeRegexp)[1].toLowerCase();\n // Let \"new String('')\" return 'object'\n if (typeof Promise === 'function' && obj instanceof Promise) return 'promise';\n // PhantomJS has type \"DOMWindow\" for null\n if (obj === null) return 'null';\n // PhantomJS has type \"DOMWindow\" for undefined\n if (obj === undefined) return 'undefined';\n return type;\n}\n\nexports.Library = Library;\n\n/**\n * ### Library\n *\n * Create a repository for custom type detection.\n *\n * ```js\n * var lib = new type.Library;\n * ```\n *\n */\n\nfunction Library() {\n if (!(this instanceof Library)) return new Library();\n this.tests = {};\n}\n\n/**\n * #### .of (obj)\n *\n * Expose replacement `typeof` detection to the library.\n *\n * ```js\n * if ('string' === lib.of('hello world')) {\n * // ...\n * }\n * ```\n *\n * @param {Mixed} object to test\n * @return {String} type\n */\n\nLibrary.prototype.of = getType;\n\n/**\n * #### .define (type, test)\n *\n * Add a test to for the `.test()` assertion.\n *\n * Can be defined as a regular expression:\n *\n * ```js\n * lib.define('int', /^[0-9]+$/);\n * ```\n *\n * ... or as a function:\n *\n * ```js\n * lib.define('bln', function (obj) {\n * if ('boolean' === lib.of(obj)) return true;\n * var blns = [ 'yes', 'no', 'true', 'false', 1, 0 ];\n * if ('string' === lib.of(obj)) obj = obj.toLowerCase();\n * return !! ~blns.indexOf(obj);\n * });\n * ```\n *\n * @param {String} type\n * @param {RegExp|Function} test\n * @api public\n */\n\nLibrary.prototype.define = function(type, test) {\n if (arguments.length === 1) return this.tests[type];\n this.tests[type] = test;\n return this;\n};\n\n/**\n * #### .test (obj, test)\n *\n * Assert that an object is of type. Will first\n * check natives, and if that does not pass it will\n * use the user defined custom tests.\n *\n * ```js\n * assert(lib.test('1', 'int'));\n * assert(lib.test('yes', 'bln'));\n * ```\n *\n * @param {Mixed} object\n * @param {String} type\n * @return {Boolean} result\n * @api public\n */\n\nLibrary.prototype.test = function(obj, type) {\n if (type === getType(obj)) return true;\n var test = this.tests[type];\n\n if (test && 'regexp' === getType(test)) {\n return test.test(obj);\n } else if (test && 'function' === getType(test)) {\n return test(obj);\n } else {\n throw new ReferenceError('Type test \"' + type + '\" not defined or invalid.');\n }\n};\n","(function (document, window) {\n // DEPENDENCIES\n // ============================================================\n const probs = require('pjs-problems');\n const dedent = require('dedent');\n const assert = require('chai').assert;\n\n // PROBLEM TEMPLATE NICE-IFICATION\n // ============================================================\n\n function dedentStrings(problems) {\n return problems.map(prob => {\n prob.given = dedent(prob.given)\n prob.answer = dedent(prob.answer)\n return prob\n });\n }\n\n\n // PROBLEMS\n // ============================================================\n\n let problems = [];\n Object.keys(probs).forEach(subject => {\n problems.push(...probs[subject]);\n });\n problems = dedentStrings(problems);\n\n\n // CONFIG\n // ============================================================\n\n // Hoist current problem\n let currentProblem;\n\n // Keys to ignore while user is navigating around the textarea but not changing any code\n const ignoreKeyCodes = [\n 9, // Tab\n 37, // Left arrow\n 39, // Right arrow\n 38, // Up arrow\n 40 // Down arrow\n ];\n\n let config = {\n shuffle: true,\n timer: false,\n currentIndex: 0\n };\n\n let state = {\n currentProblem: getCurrentProblem(problems)\n }\n\n\n // HELPERS\n // ============================================================\n\n function debounce(func, wait, immediate) {\n let timeout;\n return function () {\n const context = this;\n const args = arguments;\n const later = function () {\n timeout = null;\n if (!immediate) {\n func.apply(context, args);\n }\n };\n const callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) {\n func.apply(context, args);\n }\n };\n }\n\n // UI\n // ============================================================\n\n // elements\n const problemEl = document.getElementById('problem');\n const codeEl = document.getElementById('code');\n const testSuiteEl = document.getElementById('test-suite');\n const testTotalEl = document.getElementById('test-total');\n const evalConsoleEl = document.getElementById('eval-output');\n const assertConsoleEl = document.getElementById('assert-output');\n const shuffleProblemsButtonEl = document.getElementById('shuffle-problems');\n const previousProblemButtonEl = document.getElementById('prev-problem');\n const nextProblemButtonEl = document.getElementById('next-problem');\n\n // LOCALSTORE\n // --------------------------------------------------------------------------------\n\n // Pull config from localstorage\n if (window.localStorage) {\n const localConfig = localStorage.getItem('js_practice_config');\n if (localConfig) {\n try {\n config = JSON.parse(localConfig);\n loadApp(config);\n } catch (err) {\n console.log('LOCAL_CONFIG PARSE ERR:', err);\n }\n } else {\n console.log('LOCAL_CONFIG: No local config');\n loadApp(config);\n }\n }\n\n function updateLocalstore(config) {\n return new Promise((resolve, reject) => {\n if (window.localStorage) {\n localStorage.setItem('js_practice_config', JSON.stringify(config));\n console.log('Saved config: ', config);\n resolve();\n } else {\n reject();\n }\n });\n }\n\n // Get indexes\n function getRandomIndex(problemsArr) {\n const ind = Math.floor(Math.random() * problemsArr.length);\n config.currentIndex = ind;\n updateLocalstore(config);\n return ind;\n }\n\n function getPreviousIndex(problemsArr) {\n let probInd;\n const currentIndex = config.currentIndex;\n // If at beginning, go to end\n if (currentIndex === 0) {\n probInd = problemsArr.length - 1;\n } else {\n probInd = currentIndex - 1;\n }\n return probInd;\n }\n\n function getNextIndex(problemsArr) {\n let probInd;\n const currentIndex = config.currentIndex;\n // If at end or invalid, restart series\n if (currentIndex >= problemsArr.length - 1 || currentIndex < 0) {\n probInd = 0;\n } else {\n probInd = currentIndex + 1;\n }\n return probInd;\n }\n\n // Get problems\n function getCurrentProblem(problemsArr) {\n return problemsArr[config.currentIndex];\n }\n\n function previousProblem() {\n console.log('previousProblem!');\n // Activate back button, for visual queue of nav feedback\n previousProblemButtonEl.classList.add('active');\n config.currentIndex = config.shuffle\n ? getRandomIndex(problems)\n : getPreviousIndex(problems);\n updateLocalstore(config).then(() => {\n window.location.reload();\n });\n }\n\n function nextProblem() {\n console.log('nextProblem!');\n // Activate next button, for visual queue of nav feedback\n nextProblemButtonEl.classList.add('active');\n config.currentIndex = config.shuffle\n ? getRandomIndex(problems)\n : getNextIndex(problems);\n updateLocalstore(config).then(() => {\n window.location.reload();\n });\n }\n\n function toggleShuffle() {\n console.log('toggle shuffle!');\n config.shuffle = !config.shuffle; // Flip it\n shuffleProblemsButtonEl.classList.toggle('active');\n previousProblemButtonEl.parentNode.classList.toggle('hidden');\n updateLocalstore(config);\n }\n\n function loadProblem(problemObj) {\n state.currentProblem = problemObj;\n // Prob question\n problemEl.innerText = problemObj.prompt;\n // Prob given code\n if (problemObj.given) {\n codeEl.value = problemObj.given;\n }\n // Seed the tests, pass (init = true) as second param\n testSuite(null, true);\n }\n\n // TODO: Build the assert errors into the test dom on each update.\n function updateTests(testStatus, init) {\n if (init === true) {\n buildTests(state.currentProblem.tests);\n }\n updateTestStatus(testStatus);\n }\n\n function buildTests(tests) {\n if (tests) {\n const testsDom = tests\n .map(test => {\n return `
\n
[✘]
\n
${test.name}
\n
`;\n })\n .join('');\n testSuiteEl.innerHTML = testsDom;\n }\n }\n\n function updateTestStatus(testStatuses) {\n if (!testStatuses) {\n throw new Error('No testStatuses provided.');\n }\n // Find out if all tests have passed or not\n let allPassed = true;\n testStatuses.forEach(testPassed => {\n if (testPassed !== true) {\n allPassed = false;\n }\n });\n const testEls = [].slice.call(testSuiteEl.querySelectorAll('.test-state'));\n testEls.forEach((testStatusEl, iter) => {\n if (testStatuses[iter] === true) {\n testStatusEl.innerHTML = '[✓]';\n testStatusEl.classList.remove('fail');\n testStatusEl.classList.add('pass');\n } else {\n testStatusEl.innerHTML = '[✘]';\n testStatusEl.classList.remove('pass');\n testStatusEl.classList.add('fail');\n }\n });\n\n if (allPassed === true) {\n testTotalEl.innerText = 'PASS';\n testTotalEl.classList.remove('fail');\n testTotalEl.classList.add('pass');\n } else {\n testTotalEl.innerText = 'FAIL';\n testTotalEl.classList.remove('pass');\n testTotalEl.classList.add('fail');\n }\n }\n\n function printAssertError(errObj) {\n // Make element string\n let inner = '';\n if (errObj !== null) {\n inner = `\n
\n Expected: ${JSON.stringify(errObj.expected)}\n Actual: ${JSON.stringify(errObj.actual)}\n
`;\n }\n\n // Prepend element\n assertConsoleEl.innerHTML = inner;\n }\n\n function printEvalOutput(errObj, output) {\n // Make element string\n let inner = '';\n if (errObj && errObj.message !== undefined) {\n inner = `\n
\n Syntax Error: ${JSON.stringify(errObj.message)}\n
`;\n } else if (output) {\n inner = `\n
\n Output: ${JSON.stringify(output)}\n
`;\n }\n // Prepend element\n evalConsoleEl.innerHTML = inner;\n }\n\n\n // VERIFICATION LOGIC\n // ============================================================\n\n function testSuite(init) {\n // Show 'working' indicator\n testTotalEl.classList.toggle('working');\n // Run stuff\n const output = getOutput(codeEl.value);\n // Run tests on code, return object/array of test results\n const tested = runTests(output);\n // Hide 'working' indicator\n testTotalEl.classList.toggle('working');\n // Update UI with results\n updateTests(tested, init);\n }\n\n function getOutput(code) {\n let evald = false;\n try {\n evald = eval(`(function(){${code}})()`); // eslint-disable-line no-eval\n printEvalOutput(null, evald); // Print current output\n } catch (err) {\n printEvalOutput(err);\n }\n return evald;\n }\n\n function runTests(output) {\n let tested = false;\n tested = state.currentProblem.tests.map(test => {\n let testOutcome = false;\n try {\n if (output) {\n testOutcome = eval(test.test);\n }\n printAssertError(null);\n } catch (err) {\n printAssertError(err);\n }\n return testOutcome;\n });\n return tested;\n }\n\n // Wrapped to prevent race with local config retrieval\n function loadApp(config) {\n console.log('loading app!');\n\n // Show current toggle state\n if (config.shuffle === true) {\n shuffleProblemsButtonEl.classList.add('active');\n previousProblemButtonEl.parentNode.classList.add('hidden');\n }\n\n // Keybinding stuff\n // ============================================================\n\n // Debounced code validation\n const debouncedInputValidation = debounce(e => {\n // If not arrow keys or other non-character keys\n if (ignoreKeyCodes.indexOf(e.keyCode) === -1) {\n // Run test suite\n testSuite();\n }\n }, 200);\n\n function problemNav(e) {\n // Go to previous problem keybinding\n // If CMD/CTRL + SHIFT + RETURN/ENTER\n if (config.shuffle === false && e.keyCode === 13 && e.shiftKey && (e.metaKey || e.ctrlKey)) {\n // Go to next problem\n previousProblem();\n } else if (e.keyCode === 13 && !e.shiftKey && (e.metaKey || e.ctrlKey)) {\n // Go to next problem keybinding\n // If CMD/CTRL + RETURN/ENTER\n // Go to next problem\n nextProblem();\n }\n }\n\n // Event Bindings\n // ============================================================\n\n // Bind it up\n codeEl.addEventListener('keydown', debouncedInputValidation);\n document.addEventListener('keydown', problemNav);\n shuffleProblemsButtonEl.addEventListener('click', toggleShuffle);\n previousProblemButtonEl.addEventListener('click', previousProblem);\n nextProblemButtonEl.addEventListener('click', nextProblem);\n\n // Start it up!\n // Load current problem\n const currProb = getCurrentProblem(problems);\n loadProblem(currProb);\n // Initalized test suite with starting failures\n testSuite(true);\n }\n})(document, window);\n"]} \ No newline at end of file diff --git a/public/service-worker.js b/public/service-worker.js index b4de3bd..408294f 100644 --- a/public/service-worker.js +++ b/public/service-worker.js @@ -1,2 +1,2 @@ -"use strict";function setOfCachedUrls(e){return e.keys().then(function(e){return e.map(function(e){return e.url})}).then(function(e){return new Set(e)})}var precacheConfig=[["/dist/css/style.css","ba4d66c91d1ed66848154a34ab4948cf"],["/dist/img/back.svg","898ada2a32ec64bd5b6959c22e8f231d"],["/dist/img/monitor.svg","348592da5567b5a3c46acfb5dcd341bc"],["/dist/img/next.svg","045593410b9f51390e750b9e1e7fff15"],["/dist/img/reload.svg","a0ab1b765280e4d22e6fb747042f6503"],["/dist/img/shuffle.svg","3a5e3c1bf04eb3493d8a2ffa547aa58f"],["/dist/img/social-banner.png","7c1a8058bb3d00c2b40283c735748cfc"],["/dist/js/bundle.min.js","e534dee6ffdd27dae5b8137ef1f2acc5"],["/dist/js/loadJS.js","72c55936069f60560a386e46f462c73a"],["/dist/js/sw-registration.js","677217d8e642c1ccff69fc01c96b4431"],["/index.html","c7522a5d3255caca0f12c5282ef0644d"]],cacheName="sw-precache-v3--"+(self.registration?self.registration.scope:""),ignoreUrlParametersMatching=[/^utm_/],addDirectoryIndex=function(e,t){var n=new URL(e);return"/"===n.pathname.slice(-1)&&(n.pathname+=t),n.toString()},cleanResponse=function(e){return e.redirected?("body"in e?Promise.resolve(e.body):e.blob()).then(function(t){return new Response(t,{headers:e.headers,status:e.status,statusText:e.statusText})}):Promise.resolve(e)},createCacheKey=function(e,t,n,r){var a=new URL(e);return r&&a.pathname.match(r)||(a.search+=(a.search?"&":"")+encodeURIComponent(t)+"="+encodeURIComponent(n)),a.toString()},isPathWhitelisted=function(e,t){if(0===e.length)return!0;var n=new URL(t).pathname;return e.some(function(e){return n.match(e)})},stripIgnoredUrlParameters=function(e,t){var n=new URL(e);return n.hash="",n.search=n.search.slice(1).split("&").map(function(e){return e.split("=")}).filter(function(e){return t.every(function(t){return!t.test(e[0])})}).map(function(e){return e.join("=")}).join("&"),n.toString()},hashParamName="_sw-precache",urlsToCacheKeys=new Map(precacheConfig.map(function(e){var t=e[0],n=e[1],r=new URL(t,self.location),a=createCacheKey(r,hashParamName,n,!1);return[r.toString(),a]}));self.addEventListener("install",function(e){e.waitUntil(caches.open(cacheName).then(function(e){return setOfCachedUrls(e).then(function(t){return Promise.all(Array.from(urlsToCacheKeys.values()).map(function(n){if(!t.has(n)){var r=new Request(n,{credentials:"same-origin"});return fetch(r).then(function(t){if(!t.ok)throw new Error("Request for "+n+" returned a response with status "+t.status);return cleanResponse(t).then(function(t){return e.put(n,t)})})}}))})}).then(function(){return self.skipWaiting()}))}),self.addEventListener("activate",function(e){var t=new Set(urlsToCacheKeys.values());e.waitUntil(caches.open(cacheName).then(function(e){return e.keys().then(function(n){return Promise.all(n.map(function(n){if(!t.has(n.url))return e.delete(n)}))})}).then(function(){return self.clients.claim()}))}),self.addEventListener("fetch",function(e){if("GET"===e.request.method){var t,n=stripIgnoredUrlParameters(e.request.url,ignoreUrlParametersMatching);(t=urlsToCacheKeys.has(n))||(n=addDirectoryIndex(n,"index.html"),t=urlsToCacheKeys.has(n));t&&e.respondWith(caches.open(cacheName).then(function(e){return e.match(urlsToCacheKeys.get(n)).then(function(e){if(e)return e;throw Error("The cached response that was expected is missing.")})}).catch(function(t){return console.warn('Couldn\'t serve response for "%s" from cache: %O',e.request.url,t),fetch(e.request)}))}}); +"use strict";function setOfCachedUrls(e){return e.keys().then(function(e){return e.map(function(e){return e.url})}).then(function(e){return new Set(e)})}var precacheConfig=[["/dist/css/style.css","ba4d66c91d1ed66848154a34ab4948cf"],["/dist/img/back.svg","898ada2a32ec64bd5b6959c22e8f231d"],["/dist/img/monitor.svg","348592da5567b5a3c46acfb5dcd341bc"],["/dist/img/next.svg","045593410b9f51390e750b9e1e7fff15"],["/dist/img/reload.svg","a0ab1b765280e4d22e6fb747042f6503"],["/dist/img/shuffle.svg","3a5e3c1bf04eb3493d8a2ffa547aa58f"],["/dist/img/social-banner.png","7c1a8058bb3d00c2b40283c735748cfc"],["/dist/js/bundle.min.js","26e9f75378c4964e08802b99e960f4bc"],["/dist/js/loadJS.js","72c55936069f60560a386e46f462c73a"],["/dist/js/sw-registration.js","677217d8e642c1ccff69fc01c96b4431"],["/index.html","c7522a5d3255caca0f12c5282ef0644d"]],cacheName="sw-precache-v3--"+(self.registration?self.registration.scope:""),ignoreUrlParametersMatching=[/^utm_/],addDirectoryIndex=function(e,t){var n=new URL(e);return"/"===n.pathname.slice(-1)&&(n.pathname+=t),n.toString()},cleanResponse=function(e){return e.redirected?("body"in e?Promise.resolve(e.body):e.blob()).then(function(t){return new Response(t,{headers:e.headers,status:e.status,statusText:e.statusText})}):Promise.resolve(e)},createCacheKey=function(e,t,n,r){var a=new URL(e);return r&&a.pathname.match(r)||(a.search+=(a.search?"&":"")+encodeURIComponent(t)+"="+encodeURIComponent(n)),a.toString()},isPathWhitelisted=function(e,t){if(0===e.length)return!0;var n=new URL(t).pathname;return e.some(function(e){return n.match(e)})},stripIgnoredUrlParameters=function(e,t){var n=new URL(e);return n.hash="",n.search=n.search.slice(1).split("&").map(function(e){return e.split("=")}).filter(function(e){return t.every(function(t){return!t.test(e[0])})}).map(function(e){return e.join("=")}).join("&"),n.toString()},hashParamName="_sw-precache",urlsToCacheKeys=new Map(precacheConfig.map(function(e){var t=e[0],n=e[1],r=new URL(t,self.location),a=createCacheKey(r,hashParamName,n,!1);return[r.toString(),a]}));self.addEventListener("install",function(e){e.waitUntil(caches.open(cacheName).then(function(e){return setOfCachedUrls(e).then(function(t){return Promise.all(Array.from(urlsToCacheKeys.values()).map(function(n){if(!t.has(n)){var r=new Request(n,{credentials:"same-origin"});return fetch(r).then(function(t){if(!t.ok)throw new Error("Request for "+n+" returned a response with status "+t.status);return cleanResponse(t).then(function(t){return e.put(n,t)})})}}))})}).then(function(){return self.skipWaiting()}))}),self.addEventListener("activate",function(e){var t=new Set(urlsToCacheKeys.values());e.waitUntil(caches.open(cacheName).then(function(e){return e.keys().then(function(n){return Promise.all(n.map(function(n){if(!t.has(n.url))return e.delete(n)}))})}).then(function(){return self.clients.claim()}))}),self.addEventListener("fetch",function(e){if("GET"===e.request.method){var t,n=stripIgnoredUrlParameters(e.request.url,ignoreUrlParametersMatching);(t=urlsToCacheKeys.has(n))||(n=addDirectoryIndex(n,"index.html"),t=urlsToCacheKeys.has(n));t&&e.respondWith(caches.open(cacheName).then(function(e){return e.match(urlsToCacheKeys.get(n)).then(function(e){if(e)return e;throw Error("The cached response that was expected is missing.")})}).catch(function(t){return console.warn('Couldn\'t serve response for "%s" from cache: %O',e.request.url,t),fetch(e.request)}))}}); //# sourceMappingURL=service-worker.js.map diff --git a/public/service-worker.js.map b/public/service-worker.js.map index 4ddd931..7af7bdb 100644 --- a/public/service-worker.js.map +++ b/public/service-worker.js.map @@ -1 +1 @@ -{"version":3,"sources":["service-worker.js"],"names":["setOfCachedUrls","cache","keys","then","requests","map","request","url","urls","Set","precacheConfig","cacheName","self","registration","scope","ignoreUrlParametersMatching","addDirectoryIndex","originalUrl","index","URL","pathname","slice","toString","cleanResponse","originalResponse","redirected","Promise","resolve","body","blob","Response","headers","status","statusText","createCacheKey","paramName","paramValue","dontCacheBustUrlsMatching","match","search","encodeURIComponent","isPathWhitelisted","whitelist","absoluteUrlString","length","path","some","whitelistedPathRegex","stripIgnoredUrlParameters","hash","split","kv","filter","every","ignoredRegex","test","join","hashParamName","urlsToCacheKeys","Map","item","relativeUrl","absoluteUrl","location","cacheKey","addEventListener","event","waitUntil","caches","open","cachedUrls","all","Array","from","values","has","Request","credentials","fetch","response","ok","Error","responseToCache","put","skipWaiting","setOfExpectedUrls","existingRequests","existingRequest","delete","clients","claim","method","shouldRespond","respondWith","get","catch","e","console","warn"],"mappings":"AAqCA,aAyGA,SAASA,gBAAgBC,GACvB,OAAOA,EAAMC,OAAOC,KAAK,SAASC,GAChC,OAAOA,EAASC,IAAI,SAASC,GAC3B,OAAOA,EAAQC,QAEhBJ,KAAK,SAASK,GACf,OAAO,IAAIC,IAAID,KA7GnB,IAAIE,iBAAmB,sBAAsB,qCAAq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AAIY,EAAgBhF,KACzC,OAAON,EAAMuF,OAAOD,UAK3BpF,KAAK,WAEN,OAAOS,KAAK6E,QAAQC,aAO1B9E,KAAKqD,iBAAiB,QAAS,SAASC,GACtC,GAA6B,QAAzBA,EAAM5D,QAAQqF,OAAkB,CAIlC,IAAIC,EAIArF,EAAMyC,0BAA0BkB,EAAM5D,QAAQC,IAAKQ,8BACvD6E,EAAgBlC,gBAAgBiB,IAAIpE,MAMlCA,EAAMS,kBAAkBT,EAFL,cAGnBqF,EAAgBlC,gBAAgBiB,IAAIpE,IAgBlCqF,GACF1B,EAAM2B,YACJzB,OAAOC,KAAK1D,WAAWR,KAAK,SAASF,GACnC,OAAOA,EAAMqC,MAAMoB,gBAAgBoC,IAAIvF,IAAMJ,KAAK,SAAS4E,GACzD,GAAIA,EACF,OAAOA,EAET,MAAME,MAAM,yDAEbc,MAAM,SAASC,GAIhB,OADAC,QAAQC,KAAK,mDAAoDhC,EAAM5D,QAAQC,IAAKyF,GAC7ElB,MAAMZ,EAAM5D","file":"service-worker.js","sourcesContent":["/**\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n*/\n\n// DO NOT EDIT THIS GENERATED OUTPUT DIRECTLY!\n// This file should be overwritten as part of your build process.\n// If you need to extend the behavior of the generated service worker, the best approach is to write\n// additional code and include it using the importScripts option:\n// https://github.com/GoogleChrome/sw-precache#importscripts-arraystring\n//\n// Alternatively, it's possible to make changes to the underlying template file and then use that as the\n// new base for generating output, via the templateFilePath option:\n// https://github.com/GoogleChrome/sw-precache#templatefilepath-string\n//\n// If you go that route, make sure that whenever you update your sw-precache dependency, you reconcile any\n// changes made to this original template file with your modified copy.\n\n// This generated service worker JavaScript will precache your site's resources.\n// The code needs to be saved in a .js file at the top-level of your site, and registered\n// from your pages in order to be used. See\n// https://github.com/googlechrome/sw-precache/blob/master/demo/app/js/service-worker-registration.js\n// for an example of how you can register this script and handle various service worker events.\n\n/* eslint-env worker, serviceworker */\n/* eslint-disable indent, no-unused-vars, no-multiple-empty-lines, max-nested-callbacks, space-before-function-paren, quotes, comma-spacing */\n'use strict';\n\nvar precacheConfig = [[\"/dist/css/style.css\",\"ba4d66c91d1ed66848154a34ab4948cf\"],[\"/dist/img/back.svg\",\"898ada2a32ec64bd5b6959c22e8f231d\"],[\"/dist/img/monitor.svg\",\"348592da5567b5a3c46acfb5dcd341bc\"],[\"/dist/img/next.svg\",\"045593410b9f51390e750b9e1e7fff15\"],[\"/dist/img/reload.svg\",\"a0ab1b765280e4d22e6fb747042f6503\"],[\"/dist/img/shuffle.svg\",\"3a5e3c1bf04eb3493d8a2ffa547aa58f\"],[\"/dist/img/social-banner.png\",\"7c1a8058bb3d00c2b40283c735748cfc\"],[\"/dist/js/bundle.min.js\",\"e534dee6ffdd27dae5b8137ef1f2acc5\"],[\"/dist/js/loadJS.js\",\"72c55936069f60560a386e46f462c73a\"],[\"/dist/js/sw-registration.js\",\"677217d8e642c1ccff69fc01c96b4431\"],[\"/index.html\",\"c7522a5d3255caca0f12c5282ef0644d\"]];\nvar cacheName = 'sw-precache-v3--' + (self.registration ? self.registration.scope : '');\n\n\nvar ignoreUrlParametersMatching = [/^utm_/];\n\n\n\nvar addDirectoryIndex = function (originalUrl, index) {\n var url = new URL(originalUrl);\n if (url.pathname.slice(-1) === '/') {\n url.pathname += index;\n }\n return url.toString();\n };\n\nvar cleanResponse = function (originalResponse) {\n // If this is not a redirected response, then we don't have to do anything.\n if (!originalResponse.redirected) {\n return Promise.resolve(originalResponse);\n }\n\n // Firefox 50 and below doesn't support the Response.body stream, so we may\n // need to read the entire body to memory as a Blob.\n var bodyPromise = 'body' in originalResponse ?\n Promise.resolve(originalResponse.body) :\n originalResponse.blob();\n\n return bodyPromise.then(function(body) {\n // new Response() is happy when passed either a stream or a Blob.\n return new Response(body, {\n headers: originalResponse.headers,\n status: originalResponse.status,\n statusText: originalResponse.statusText\n });\n });\n };\n\nvar createCacheKey = function (originalUrl, paramName, paramValue,\n dontCacheBustUrlsMatching) {\n // Create a new URL object to avoid modifying originalUrl.\n var url = new URL(originalUrl);\n\n // If dontCacheBustUrlsMatching is not set, or if we don't have a match,\n // then add in the extra cache-busting URL parameter.\n if (!dontCacheBustUrlsMatching ||\n !(url.pathname.match(dontCacheBustUrlsMatching))) {\n url.search += (url.search ? '&' : '') +\n encodeURIComponent(paramName) + '=' + encodeURIComponent(paramValue);\n }\n\n return url.toString();\n };\n\nvar isPathWhitelisted = function (whitelist, absoluteUrlString) {\n // If the whitelist is empty, then consider all URLs to be whitelisted.\n if (whitelist.length === 0) {\n return true;\n }\n\n // Otherwise compare each path regex to the path of the URL passed in.\n var path = (new URL(absoluteUrlString)).pathname;\n return whitelist.some(function(whitelistedPathRegex) {\n return path.match(whitelistedPathRegex);\n });\n };\n\nvar stripIgnoredUrlParameters = function (originalUrl,\n ignoreUrlParametersMatching) {\n var url = new URL(originalUrl);\n // Remove the hash; see https://github.com/GoogleChrome/sw-precache/issues/290\n url.hash = '';\n\n url.search = url.search.slice(1) // Exclude initial '?'\n .split('&') // Split into an array of 'key=value' strings\n .map(function(kv) {\n return kv.split('='); // Split each 'key=value' string into a [key, value] array\n })\n .filter(function(kv) {\n return ignoreUrlParametersMatching.every(function(ignoredRegex) {\n return !ignoredRegex.test(kv[0]); // Return true iff the key doesn't match any of the regexes.\n });\n })\n .map(function(kv) {\n return kv.join('='); // Join each [key, value] array into a 'key=value' string\n })\n .join('&'); // Join the array of 'key=value' strings into a string with '&' in between each\n\n return url.toString();\n };\n\n\nvar hashParamName = '_sw-precache';\nvar urlsToCacheKeys = new Map(\n precacheConfig.map(function(item) {\n var relativeUrl = item[0];\n var hash = item[1];\n var absoluteUrl = new URL(relativeUrl, self.location);\n var cacheKey = createCacheKey(absoluteUrl, hashParamName, hash, false);\n return [absoluteUrl.toString(), cacheKey];\n })\n);\n\nfunction setOfCachedUrls(cache) {\n return cache.keys().then(function(requests) {\n return requests.map(function(request) {\n return request.url;\n });\n }).then(function(urls) {\n return new Set(urls);\n });\n}\n\nself.addEventListener('install', function(event) {\n event.waitUntil(\n caches.open(cacheName).then(function(cache) {\n return setOfCachedUrls(cache).then(function(cachedUrls) {\n return Promise.all(\n Array.from(urlsToCacheKeys.values()).map(function(cacheKey) {\n // If we don't have a key matching url in the cache already, add it.\n if (!cachedUrls.has(cacheKey)) {\n var request = new Request(cacheKey, {credentials: 'same-origin'});\n return fetch(request).then(function(response) {\n // Bail out of installation unless we get back a 200 OK for\n // every request.\n if (!response.ok) {\n throw new Error('Request for ' + cacheKey + ' returned a ' +\n 'response with status ' + response.status);\n }\n\n return cleanResponse(response).then(function(responseToCache) {\n return cache.put(cacheKey, responseToCache);\n });\n });\n }\n })\n );\n });\n }).then(function() {\n \n // Force the SW to transition from installing -> active state\n return self.skipWaiting();\n \n })\n );\n});\n\nself.addEventListener('activate', function(event) {\n var setOfExpectedUrls = new Set(urlsToCacheKeys.values());\n\n event.waitUntil(\n caches.open(cacheName).then(function(cache) {\n return cache.keys().then(function(existingRequests) {\n return Promise.all(\n existingRequests.map(function(existingRequest) {\n if (!setOfExpectedUrls.has(existingRequest.url)) {\n return cache.delete(existingRequest);\n }\n })\n );\n });\n }).then(function() {\n \n return self.clients.claim();\n \n })\n );\n});\n\n\nself.addEventListener('fetch', function(event) {\n if (event.request.method === 'GET') {\n // Should we call event.respondWith() inside this fetch event handler?\n // This needs to be determined synchronously, which will give other fetch\n // handlers a chance to handle the request if need be.\n var shouldRespond;\n\n // First, remove all the ignored parameters and hash fragment, and see if we\n // have that URL in our cache. If so, great! shouldRespond will be true.\n var url = stripIgnoredUrlParameters(event.request.url, ignoreUrlParametersMatching);\n shouldRespond = urlsToCacheKeys.has(url);\n\n // If shouldRespond is false, check again, this time with 'index.html'\n // (or whatever the directoryIndex option is set to) at the end.\n var directoryIndex = 'index.html';\n if (!shouldRespond && directoryIndex) {\n url = addDirectoryIndex(url, directoryIndex);\n shouldRespond = urlsToCacheKeys.has(url);\n }\n\n // If shouldRespond is still false, check to see if this is a navigation\n // request, and if so, whether the URL matches navigateFallbackWhitelist.\n var navigateFallback = '';\n if (!shouldRespond &&\n navigateFallback &&\n (event.request.mode === 'navigate') &&\n isPathWhitelisted([], event.request.url)) {\n url = new URL(navigateFallback, self.location).toString();\n shouldRespond = urlsToCacheKeys.has(url);\n }\n\n // If shouldRespond was set to true at any point, then call\n // event.respondWith(), using the appropriate cache key.\n if (shouldRespond) {\n event.respondWith(\n caches.open(cacheName).then(function(cache) {\n return cache.match(urlsToCacheKeys.get(url)).then(function(response) {\n if (response) {\n return response;\n }\n throw Error('The cached response that was expected is missing.');\n });\n }).catch(function(e) {\n // Fall back to just fetch()ing the request if some unexpected error\n // prevented the cached response from being valid.\n console.warn('Couldn\\'t serve response for \"%s\" from cache: %O', event.request.url, e);\n return fetch(event.request);\n })\n );\n }\n }\n});\n\n\n\n\n\n\n\n"]} \ No newline at end of file +{"version":3,"sources":["service-worker.js"],"names":["setOfCachedUrls","cache","keys","then","requests","map","request","url","urls","Set","precacheConfig","cacheName","self","registration","scope","ignoreUrlParametersMatching","addDirectoryIndex","originalUrl","index","URL","pathname","slice","toString","cleanResponse","originalResponse","redirected","Promise","resolve","body","blob","Response","headers","status","statusText","createCacheKey","paramName","paramValue","dontCacheBustUrlsMatching","match","search","encodeURIComponent","isPathWhitelisted","whitelist","absoluteUrlString","length","path","some","whitelistedPathRegex","stripIgnoredUrlParameters","hash","split","kv","filter","every","ignoredRegex","test","join","hashParamName","urlsToCacheKeys","Map","item","relativeUrl","absoluteUrl","location","cacheKey","addEventListener","event","waitUntil","caches","open","cachedUrls","all","Array","from","values","has","Request","credentials","fetch","response","ok","Error","responseToCache","put","skipWaiting","setOfExpectedUrls","existingRequests","existingRequest","delete","clients","claim","method","shouldRespond","respondWith","get","catch","e","console","warn"],"mappings":"AAqCA,aAyGA,SAASA,gBAAgBC,GACvB,OAAOA,EAAMC,OAAOC,KAAK,SAASC,GAChC,OAAOA,EAASC,IAAI,SAASC,GAC3B,OAAOA,EAAQC,QAEhBJ,KAAK,SAASK,GACf,OAAO,IAAIC,IAAID,KA7GnB,IAAIE,iBAAmB,sBAAsB,qCAAqC,qBAAqB,qCAAqC,wBAAwB,qCAAqC,qBAAqB,qCAAqC,uBAAuB,qCAAqC,wBAAwB,qCAAqC,8BAA8B,qCAAqC,yBAAyB,qCAAqC,qBAAqB,qCAAqC,8BAA8B,qCAAqC,cAAc,qCACpoBC,UAAY,oBAAsBC,KAAKC,aAAeD,KAAKC,aAAaC,MAAQ,IAGhFC,6BAA+B,SAI/BC,kBAAoB,SAAUC,EAAaC,GAC3C,IAAIX,EAAM,IAAIY,IAAIF,GAIlB,MAH+B,MAA3BV,EAAIa,SAASC,OAAO,KACtBd,EAAIa,UAAYF,GAEXX,EAAIe,YAGXC,cAAgB,SAAUC,GAE1B,OAAKA,EAAiBC,YAMJ,SAAUD,EAC1BE,QAAQC,QAAQH,EAAiBI,MACjCJ,EAAiBK,QAEA1B,KAAK,SAASyB,GAE/B,OAAO,IAAIE,SAASF,GAClBG,QAASP,EAAiBO,QAC1BC,OAAQR,EAAiBQ,OACzBC,WAAYT,EAAiBS,eAdxBP,QAAQC,QAAQH,IAmBzBU,eAAiB,SAAUjB,EAAakB,EAAWC,EAC5BC,GAEvB,IAAI9B,EAAM,IAAIY,IAAIF,GAUlB,OANKoB,GACC9B,EAAIa,SAASkB,MAAMD,KACvB9B,EAAIgC,SAAWhC,EAAIgC,OAAS,IAAM,IAChCC,mBAAmBL,GAAa,IAAMK,mBAAmBJ,IAGtD7B,EAAIe,YAGXmB,kBAAoB,SAAUC,EAAWC,GAEzC,GAAyB,IAArBD,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F,IAAInB,EAAUkB,eAOtC/E,KAAK,WAGN,OAAOS,KAAKwE,mBAMlBxE,KAAKqD,iBAAiB,WAAY,SAASC,GACzC,IAAImB,EAAoB,IAAI5E,IAAIiD,gBAAgBgB,UAEhDR,EAAMC,UACJC,OAAOC,KAAK1D,WAAWR,KAAK,SAASF,GACnC,OAAOA,EAAMC,OAAOC,KAAK,SAASmF,GAChC,OAAO5D,QAAQ6C,IACbe,EAAiBjF,IAAI,SAASkF,GAC5B,IAAKF,EAAkBV,IAAIY,EAAgBhF,KACzC,OAAON,EAAMuF,OAAOD,UAK3BpF,KAAK,WAEN,OAAOS,KAAK6E,QAAQC,aAO1B9E,KAAKqD,iBAAiB,QAAS,SAASC,GACtC,GAA6B,QAAzBA,EAAM5D,QAAQqF,OAAkB,CAIlC,IAAIC,EAIArF,EAAMyC,0BAA0BkB,EAAM5D,QAAQC,IAAKQ,8BACvD6E,EAAgBlC,gBAAgBiB,IAAIpE,MAMlCA,EAAMS,kBAAkBT,EAFL,cAGnBqF,EAAgBlC,gBAAgBiB,IAAIpE,IAgBlCqF,GACF1B,EAAM2B,YACJzB,OAAOC,KAAK1D,WAAWR,KAAK,SAASF,GACnC,OAAOA,EAAMqC,MAAMoB,gBAAgBoC,IAAIvF,IAAMJ,KAAK,SAAS4E,GACzD,GAAIA,EACF,OAAOA,EAET,MAAME,MAAM,yDAEbc,MAAM,SAASC,GAIhB,OADAC,QAAQC,KAAK,mDAAoDhC,EAAM5D,QAAQC,IAAKyF,GAC7ElB,MAAMZ,EAAM5D","file":"service-worker.js","sourcesContent":["/**\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n*/\n\n// DO NOT EDIT THIS GENERATED OUTPUT DIRECTLY!\n// This file should be overwritten as part of your build process.\n// If you need to extend the behavior of the generated service worker, the best approach is to write\n// additional code and include it using the importScripts option:\n// https://github.com/GoogleChrome/sw-precache#importscripts-arraystring\n//\n// Alternatively, it's possible to make changes to the underlying template file and then use that as the\n// new base for generating output, via the templateFilePath option:\n// https://github.com/GoogleChrome/sw-precache#templatefilepath-string\n//\n// If you go that route, make sure that whenever you update your sw-precache dependency, you reconcile any\n// changes made to this original template file with your modified copy.\n\n// This generated service worker JavaScript will precache your site's resources.\n// The code needs to be saved in a .js file at the top-level of your site, and registered\n// from your pages in order to be used. See\n// https://github.com/googlechrome/sw-precache/blob/master/demo/app/js/service-worker-registration.js\n// for an example of how you can register this script and handle various service worker events.\n\n/* eslint-env worker, serviceworker */\n/* eslint-disable indent, no-unused-vars, no-multiple-empty-lines, max-nested-callbacks, space-before-function-paren, quotes, comma-spacing */\n'use strict';\n\nvar precacheConfig = [[\"/dist/css/style.css\",\"ba4d66c91d1ed66848154a34ab4948cf\"],[\"/dist/img/back.svg\",\"898ada2a32ec64bd5b6959c22e8f231d\"],[\"/dist/img/monitor.svg\",\"348592da5567b5a3c46acfb5dcd341bc\"],[\"/dist/img/next.svg\",\"045593410b9f51390e750b9e1e7fff15\"],[\"/dist/img/reload.svg\",\"a0ab1b765280e4d22e6fb747042f6503\"],[\"/dist/img/shuffle.svg\",\"3a5e3c1bf04eb3493d8a2ffa547aa58f\"],[\"/dist/img/social-banner.png\",\"7c1a8058bb3d00c2b40283c735748cfc\"],[\"/dist/js/bundle.min.js\",\"26e9f75378c4964e08802b99e960f4bc\"],[\"/dist/js/loadJS.js\",\"72c55936069f60560a386e46f462c73a\"],[\"/dist/js/sw-registration.js\",\"677217d8e642c1ccff69fc01c96b4431\"],[\"/index.html\",\"c7522a5d3255caca0f12c5282ef0644d\"]];\nvar cacheName = 'sw-precache-v3--' + (self.registration ? self.registration.scope : '');\n\n\nvar ignoreUrlParametersMatching = [/^utm_/];\n\n\n\nvar addDirectoryIndex = function (originalUrl, index) {\n var url = new URL(originalUrl);\n if (url.pathname.slice(-1) === '/') {\n url.pathname += index;\n }\n return url.toString();\n };\n\nvar cleanResponse = function (originalResponse) {\n // If this is not a redirected response, then we don't have to do anything.\n if (!originalResponse.redirected) {\n return Promise.resolve(originalResponse);\n }\n\n // Firefox 50 and below doesn't support the Response.body stream, so we may\n // need to read the entire body to memory as a Blob.\n var bodyPromise = 'body' in originalResponse ?\n Promise.resolve(originalResponse.body) :\n originalResponse.blob();\n\n return bodyPromise.then(function(body) {\n // new Response() is happy when passed either a stream or a Blob.\n return new Response(body, {\n headers: originalResponse.headers,\n status: originalResponse.status,\n statusText: originalResponse.statusText\n });\n });\n };\n\nvar createCacheKey = function (originalUrl, paramName, paramValue,\n dontCacheBustUrlsMatching) {\n // Create a new URL object to avoid modifying originalUrl.\n var url = new URL(originalUrl);\n\n // If dontCacheBustUrlsMatching is not set, or if we don't have a match,\n // then add in the extra cache-busting URL parameter.\n if (!dontCacheBustUrlsMatching ||\n !(url.pathname.match(dontCacheBustUrlsMatching))) {\n url.search += (url.search ? '&' : '') +\n encodeURIComponent(paramName) + '=' + encodeURIComponent(paramValue);\n }\n\n return url.toString();\n };\n\nvar isPathWhitelisted = function (whitelist, absoluteUrlString) {\n // If the whitelist is empty, then consider all URLs to be whitelisted.\n if (whitelist.length === 0) {\n return true;\n }\n\n // Otherwise compare each path regex to the path of the URL passed in.\n var path = (new URL(absoluteUrlString)).pathname;\n return whitelist.some(function(whitelistedPathRegex) {\n return path.match(whitelistedPathRegex);\n });\n };\n\nvar stripIgnoredUrlParameters = function (originalUrl,\n ignoreUrlParametersMatching) {\n var url = new URL(originalUrl);\n // Remove the hash; see https://github.com/GoogleChrome/sw-precache/issues/290\n url.hash = '';\n\n url.search = url.search.slice(1) // Exclude initial '?'\n .split('&') // Split into an array of 'key=value' strings\n .map(function(kv) {\n return kv.split('='); // Split each 'key=value' string into a [key, value] array\n })\n .filter(function(kv) {\n return ignoreUrlParametersMatching.every(function(ignoredRegex) {\n return !ignoredRegex.test(kv[0]); // Return true iff the key doesn't match any of the regexes.\n });\n })\n .map(function(kv) {\n return kv.join('='); // Join each [key, value] array into a 'key=value' string\n })\n .join('&'); // Join the array of 'key=value' strings into a string with '&' in between each\n\n return url.toString();\n };\n\n\nvar hashParamName = '_sw-precache';\nvar urlsToCacheKeys = new Map(\n precacheConfig.map(function(item) {\n var relativeUrl = item[0];\n var hash = item[1];\n var absoluteUrl = new URL(relativeUrl, self.location);\n var cacheKey = createCacheKey(absoluteUrl, hashParamName, hash, false);\n return [absoluteUrl.toString(), cacheKey];\n })\n);\n\nfunction setOfCachedUrls(cache) {\n return cache.keys().then(function(requests) {\n return requests.map(function(request) {\n return request.url;\n });\n }).then(function(urls) {\n return new Set(urls);\n });\n}\n\nself.addEventListener('install', function(event) {\n event.waitUntil(\n caches.open(cacheName).then(function(cache) {\n return setOfCachedUrls(cache).then(function(cachedUrls) {\n return Promise.all(\n Array.from(urlsToCacheKeys.values()).map(function(cacheKey) {\n // If we don't have a key matching url in the cache already, add it.\n if (!cachedUrls.has(cacheKey)) {\n var request = new Request(cacheKey, {credentials: 'same-origin'});\n return fetch(request).then(function(response) {\n // Bail out of installation unless we get back a 200 OK for\n // every request.\n if (!response.ok) {\n throw new Error('Request for ' + cacheKey + ' returned a ' +\n 'response with status ' + response.status);\n }\n\n return cleanResponse(response).then(function(responseToCache) {\n return cache.put(cacheKey, responseToCache);\n });\n });\n }\n })\n );\n });\n }).then(function() {\n \n // Force the SW to transition from installing -> active state\n return self.skipWaiting();\n \n })\n );\n});\n\nself.addEventListener('activate', function(event) {\n var setOfExpectedUrls = new Set(urlsToCacheKeys.values());\n\n event.waitUntil(\n caches.open(cacheName).then(function(cache) {\n return cache.keys().then(function(existingRequests) {\n return Promise.all(\n existingRequests.map(function(existingRequest) {\n if (!setOfExpectedUrls.has(existingRequest.url)) {\n return cache.delete(existingRequest);\n }\n })\n );\n });\n }).then(function() {\n \n return self.clients.claim();\n \n })\n );\n});\n\n\nself.addEventListener('fetch', function(event) {\n if (event.request.method === 'GET') {\n // Should we call event.respondWith() inside this fetch event handler?\n // This needs to be determined synchronously, which will give other fetch\n // handlers a chance to handle the request if need be.\n var shouldRespond;\n\n // First, remove all the ignored parameters and hash fragment, and see if we\n // have that URL in our cache. If so, great! shouldRespond will be true.\n var url = stripIgnoredUrlParameters(event.request.url, ignoreUrlParametersMatching);\n shouldRespond = urlsToCacheKeys.has(url);\n\n // If shouldRespond is false, check again, this time with 'index.html'\n // (or whatever the directoryIndex option is set to) at the end.\n var directoryIndex = 'index.html';\n if (!shouldRespond && directoryIndex) {\n url = addDirectoryIndex(url, directoryIndex);\n shouldRespond = urlsToCacheKeys.has(url);\n }\n\n // If shouldRespond is still false, check to see if this is a navigation\n // request, and if so, whether the URL matches navigateFallbackWhitelist.\n var navigateFallback = '';\n if (!shouldRespond &&\n navigateFallback &&\n (event.request.mode === 'navigate') &&\n isPathWhitelisted([], event.request.url)) {\n url = new URL(navigateFallback, self.location).toString();\n shouldRespond = urlsToCacheKeys.has(url);\n }\n\n // If shouldRespond was set to true at any point, then call\n // event.respondWith(), using the appropriate cache key.\n if (shouldRespond) {\n event.respondWith(\n caches.open(cacheName).then(function(cache) {\n return cache.match(urlsToCacheKeys.get(url)).then(function(response) {\n if (response) {\n return response;\n }\n throw Error('The cached response that was expected is missing.');\n });\n }).catch(function(e) {\n // Fall back to just fetch()ing the request if some unexpected error\n // prevented the cached response from being valid.\n console.warn('Couldn\\'t serve response for \"%s\" from cache: %O', event.request.url, e);\n return fetch(event.request);\n })\n );\n }\n }\n});\n\n\n\n\n\n\n\n"]} \ No newline at end of file diff --git a/src/js/index.js b/src/js/index.js index 32da6bb..841c6fd 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -48,6 +48,10 @@ currentIndex: 0 }; + let state = { + currentProblem: getCurrentProblem(problems) + } + // HELPERS // ============================================================ @@ -187,7 +191,7 @@ } function loadProblem(problemObj) { - currentProblem = problemObj; + state.currentProblem = problemObj; // Prob question problemEl.innerText = problemObj.prompt; // Prob given code @@ -201,7 +205,7 @@ // TODO: Build the assert errors into the test dom on each update. function updateTests(testStatus, init) { if (init === true) { - buildTests(currentProblem.tests); + buildTests(state.currentProblem.tests); } updateTestStatus(testStatus); } @@ -318,7 +322,7 @@ function runTests(output) { let tested = false; - tested = currentProblem.tests.map(test => { + tested = state.currentProblem.tests.map(test => { let testOutcome = false; try { if (output) { diff --git a/src/service-worker.js b/src/service-worker.js index 6d29258..ac74976 100644 --- a/src/service-worker.js +++ b/src/service-worker.js @@ -37,7 +37,7 @@ /* eslint-disable indent, no-unused-vars, no-multiple-empty-lines, max-nested-callbacks, space-before-function-paren, quotes, comma-spacing */ 'use strict'; -var precacheConfig = [["/dist/css/style.css","ba4d66c91d1ed66848154a34ab4948cf"],["/dist/img/back.svg","898ada2a32ec64bd5b6959c22e8f231d"],["/dist/img/monitor.svg","348592da5567b5a3c46acfb5dcd341bc"],["/dist/img/next.svg","045593410b9f51390e750b9e1e7fff15"],["/dist/img/reload.svg","a0ab1b765280e4d22e6fb747042f6503"],["/dist/img/shuffle.svg","3a5e3c1bf04eb3493d8a2ffa547aa58f"],["/dist/img/social-banner.png","7c1a8058bb3d00c2b40283c735748cfc"],["/dist/js/bundle.min.js","e534dee6ffdd27dae5b8137ef1f2acc5"],["/dist/js/loadJS.js","72c55936069f60560a386e46f462c73a"],["/dist/js/sw-registration.js","677217d8e642c1ccff69fc01c96b4431"],["/index.html","c7522a5d3255caca0f12c5282ef0644d"]]; +var precacheConfig = [["/dist/css/style.css","ba4d66c91d1ed66848154a34ab4948cf"],["/dist/img/back.svg","898ada2a32ec64bd5b6959c22e8f231d"],["/dist/img/monitor.svg","348592da5567b5a3c46acfb5dcd341bc"],["/dist/img/next.svg","045593410b9f51390e750b9e1e7fff15"],["/dist/img/reload.svg","a0ab1b765280e4d22e6fb747042f6503"],["/dist/img/shuffle.svg","3a5e3c1bf04eb3493d8a2ffa547aa58f"],["/dist/img/social-banner.png","7c1a8058bb3d00c2b40283c735748cfc"],["/dist/js/bundle.min.js","26e9f75378c4964e08802b99e960f4bc"],["/dist/js/loadJS.js","72c55936069f60560a386e46f462c73a"],["/dist/js/sw-registration.js","677217d8e642c1ccff69fc01c96b4431"],["/index.html","c7522a5d3255caca0f12c5282ef0644d"]]; var cacheName = 'sw-precache-v3--' + (self.registration ? self.registration.scope : '');