Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(594)

Side by Side Diff: polymer_0.5.4/bower_components/web-animations-js/node_modules/chai/chai.js

Issue 895523005: Added Polymer 0.5.4 (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1
1 ;(function(){ 2 ;(function(){
2 3
3 /** 4 /**
4 * Require the given path. 5 * Require the module at `name`.
5 * 6 *
6 * @param {String} path 7 * @param {String} name
7 * @return {Object} exports 8 * @return {Object} exports
8 * @api public 9 * @api public
9 */ 10 */
10 11
11 function require(path, parent, orig) { 12 function require(name) {
12 var resolved = require.resolve(path); 13 var module = require.modules[name];
14 if (!module) throw new Error('failed to require "' + name + '"');
13 15
14 // lookup failed 16 if (!('exports' in module) && typeof module.definition === 'function') {
15 if (null == resolved) { 17 module.client = module.component = true;
16 orig = orig || path; 18 module.definition.call(this, module.exports = {}, module);
17 parent = parent || 'root'; 19 delete module.definition;
18 var err = new Error('Failed to require "' + orig + '" from "' + parent + '"' );
19 err.path = orig;
20 err.parent = parent;
21 err.require = true;
22 throw err;
23 }
24
25 var module = require.modules[resolved];
26
27 // perform real require()
28 // by invoking the module's
29 // registered function
30 if (!module._resolving && !module.exports) {
31 var mod = {};
32 mod.exports = {};
33 mod.client = mod.component = true;
34 module._resolving = true;
35 module.call(this, mod.exports, require.relative(resolved), mod);
36 delete module._resolving;
37 module.exports = mod.exports;
38 } 20 }
39 21
40 return module.exports; 22 return module.exports;
41 } 23 }
42 24
43 /** 25 /**
26 * Meta info, accessible in the global scope unless you use AMD option.
27 */
28
29 require.loader = 'component';
30
31 /**
32 * Internal helper object, contains a sorting function for semantiv versioning
33 */
34 require.helper = {};
35 require.helper.semVerSort = function(a, b) {
36 var aArray = a.version.split('.');
37 var bArray = b.version.split('.');
38 for (var i=0; i<aArray.length; ++i) {
39 var aInt = parseInt(aArray[i], 10);
40 var bInt = parseInt(bArray[i], 10);
41 if (aInt === bInt) {
42 var aLex = aArray[i].substr((""+aInt).length);
43 var bLex = bArray[i].substr((""+bInt).length);
44 if (aLex === '' && bLex !== '') return 1;
45 if (aLex !== '' && bLex === '') return -1;
46 if (aLex !== '' && bLex !== '') return aLex > bLex ? 1 : -1;
47 continue;
48 } else if (aInt > bInt) {
49 return 1;
50 } else {
51 return -1;
52 }
53 }
54 return 0;
55 }
56
57 /**
58 * Find and require a module which name starts with the provided name.
59 * If multiple modules exists, the highest semver is used.
60 * This function can only be used for remote dependencies.
61
62 * @param {String} name - module name: `user~repo`
63 * @param {Boolean} returnPath - returns the canonical require path if true,
64 * otherwise it returns the epxorted module
65 */
66 require.latest = function (name, returnPath) {
67 function showError(name) {
68 throw new Error('failed to find latest module of "' + name + '"');
69 }
70 // only remotes with semvers, ignore local files conataining a '/'
71 var versionRegexp = /(.*)~(.*)@v?(\d+\.\d+\.\d+[^\/]*)$/;
72 var remoteRegexp = /(.*)~(.*)/;
73 if (!remoteRegexp.test(name)) showError(name);
74 var moduleNames = Object.keys(require.modules);
75 var semVerCandidates = [];
76 var otherCandidates = []; // for instance: name of the git branch
77 for (var i=0; i<moduleNames.length; i++) {
78 var moduleName = moduleNames[i];
79 if (new RegExp(name + '@').test(moduleName)) {
80 var version = moduleName.substr(name.length+1);
81 var semVerMatch = versionRegexp.exec(moduleName);
82 if (semVerMatch != null) {
83 semVerCandidates.push({version: version, name: moduleName});
84 } else {
85 otherCandidates.push({version: version, name: moduleName});
86 }
87 }
88 }
89 if (semVerCandidates.concat(otherCandidates).length === 0) {
90 showError(name);
91 }
92 if (semVerCandidates.length > 0) {
93 var module = semVerCandidates.sort(require.helper.semVerSort).pop().name;
94 if (returnPath === true) {
95 return module;
96 }
97 return require(module);
98 }
99 // if the build contains more than one branch of the same module
100 // you should not use this funciton
101 var module = otherCandidates.pop().name;
102 if (returnPath === true) {
103 return module;
104 }
105 return require(module);
106 }
107
108 /**
44 * Registered modules. 109 * Registered modules.
45 */ 110 */
46 111
47 require.modules = {}; 112 require.modules = {};
48 113
49 /** 114 /**
50 * Registered aliases. 115 * Register module at `name` with callback `definition`.
51 */
52
53 require.aliases = {};
54
55 /**
56 * Resolve `path`.
57 * 116 *
58 * Lookup: 117 * @param {String} name
59 *
60 * - PATH/index.js
61 * - PATH.js
62 * - PATH
63 *
64 * @param {String} path
65 * @return {String} path or null
66 * @api private
67 */
68
69 require.resolve = function(path) {
70 if (path.charAt(0) === '/') path = path.slice(1);
71
72 var paths = [
73 path,
74 path + '.js',
75 path + '.json',
76 path + '/index.js',
77 path + '/index.json'
78 ];
79
80 for (var i = 0; i < paths.length; i++) {
81 var path = paths[i];
82 if (require.modules.hasOwnProperty(path)) return path;
83 if (require.aliases.hasOwnProperty(path)) return require.aliases[path];
84 }
85 };
86
87 /**
88 * Normalize `path` relative to the current path.
89 *
90 * @param {String} curr
91 * @param {String} path
92 * @return {String}
93 * @api private
94 */
95
96 require.normalize = function(curr, path) {
97 var segs = [];
98
99 if ('.' != path.charAt(0)) return path;
100
101 curr = curr.split('/');
102 path = path.split('/');
103
104 for (var i = 0; i < path.length; ++i) {
105 if ('..' == path[i]) {
106 curr.pop();
107 } else if ('.' != path[i] && '' != path[i]) {
108 segs.push(path[i]);
109 }
110 }
111
112 return curr.concat(segs).join('/');
113 };
114
115 /**
116 * Register module at `path` with callback `definition`.
117 *
118 * @param {String} path
119 * @param {Function} definition 118 * @param {Function} definition
120 * @api private 119 * @api private
121 */ 120 */
122 121
123 require.register = function(path, definition) { 122 require.register = function (name, definition) {
124 require.modules[path] = definition; 123 require.modules[name] = {
124 definition: definition
125 };
125 }; 126 };
126 127
127 /** 128 /**
128 * Alias a module definition. 129 * Define a module's exports immediately with `exports`.
129 * 130 *
130 * @param {String} from 131 * @param {String} name
131 * @param {String} to 132 * @param {Generic} exports
132 * @api private 133 * @api private
133 */ 134 */
134 135
135 require.alias = function(from, to) { 136 require.define = function (name, exports) {
136 if (!require.modules.hasOwnProperty(from)) { 137 require.modules[name] = {
137 throw new Error('Failed to alias "' + from + '", it does not exist'); 138 exports: exports
138 } 139 };
139 require.aliases[to] = from;
140 }; 140 };
141 141 require.register("chaijs~assertion-error@1.0.0", function (exports, module) {
142 /**
143 * Return a require function relative to the `parent` path.
144 *
145 * @param {String} parent
146 * @return {Function}
147 * @api private
148 */
149
150 require.relative = function(parent) {
151 var p = require.normalize(parent, '..');
152
153 /**
154 * lastIndexOf helper.
155 */
156
157 function lastIndexOf(arr, obj) {
158 var i = arr.length;
159 while (i--) {
160 if (arr[i] === obj) return i;
161 }
162 return -1;
163 }
164
165 /**
166 * The relative require() itself.
167 */
168
169 function localRequire(path) {
170 var resolved = localRequire.resolve(path);
171 return require(resolved, parent, path);
172 }
173
174 /**
175 * Resolve relative to the parent.
176 */
177
178 localRequire.resolve = function(path) {
179 var c = path.charAt(0);
180 if ('/' == c) return path.slice(1);
181 if ('.' == c) return require.normalize(p, path);
182
183 // resolve deps by returning
184 // the dep in the nearest "deps"
185 // directory
186 var segs = parent.split('/');
187 var i = lastIndexOf(segs, 'deps') + 1;
188 if (!i) i = 0;
189 path = segs.slice(0, i + 1).join('/') + '/deps/' + path;
190 return path;
191 };
192
193 /**
194 * Check if module is defined at `path`.
195 */
196
197 localRequire.exists = function(path) {
198 return require.modules.hasOwnProperty(localRequire.resolve(path));
199 };
200
201 return localRequire;
202 };
203 require.register("chaijs-assertion-error/index.js", function(exports, require, m odule){
204 /*! 142 /*!
205 * assertion-error 143 * assertion-error
206 * Copyright(c) 2013 Jake Luer <jake@qualiancy.com> 144 * Copyright(c) 2013 Jake Luer <jake@qualiancy.com>
207 * MIT Licensed 145 * MIT Licensed
208 */ 146 */
209 147
210 /*! 148 /*!
211 * Return a function that will copy properties from 149 * Return a function that will copy properties from
212 * one object to another excluding any originally 150 * one object to another excluding any originally
213 * listed. Returned function will create a new `{}`. 151 * listed. Returned function will create a new `{}`.
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 244
307 // include stack if exists and not turned off 245 // include stack if exists and not turned off
308 if (false !== stack && this.stack) { 246 if (false !== stack && this.stack) {
309 props.stack = this.stack; 247 props.stack = this.stack;
310 } 248 }
311 249
312 return props; 250 return props;
313 }; 251 };
314 252
315 }); 253 });
316 require.register("chaijs-type-detect/lib/type.js", function(exports, require, mo dule){ 254
255 require.register("chaijs~type-detect@0.1.1", function (exports, module) {
317 /*! 256 /*!
318 * type-detect 257 * type-detect
319 * Copyright(c) 2013 jake luer <jake@alogicalparadox.com> 258 * Copyright(c) 2013 jake luer <jake@alogicalparadox.com>
320 * MIT Licensed 259 * MIT Licensed
321 */ 260 */
322 261
323 /*! 262 /*!
324 * Primary Exports 263 * Primary Exports
325 */ 264 */
326 265
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 if (test && 'regexp' === getType(test)) { 390 if (test && 'regexp' === getType(test)) {
452 return test.test(obj); 391 return test.test(obj);
453 } else if (test && 'function' === getType(test)) { 392 } else if (test && 'function' === getType(test)) {
454 return test(obj); 393 return test(obj);
455 } else { 394 } else {
456 throw new ReferenceError('Type test "' + type + '" not defined or invalid.') ; 395 throw new ReferenceError('Type test "' + type + '" not defined or invalid.') ;
457 } 396 }
458 }; 397 };
459 398
460 }); 399 });
461 require.register("chaijs-deep-eql/lib/eql.js", function(exports, require, module ){ 400
401 require.register("chaijs~deep-eql@0.1.3", function (exports, module) {
462 /*! 402 /*!
463 * deep-eql 403 * deep-eql
464 * Copyright(c) 2013 Jake Luer <jake@alogicalparadox.com> 404 * Copyright(c) 2013 Jake Luer <jake@alogicalparadox.com>
465 * MIT Licensed 405 * MIT Licensed
466 */ 406 */
467 407
468 /*! 408 /*!
469 * Module dependencies 409 * Module dependencies
470 */ 410 */
471 411
472 var type = require('type-detect'); 412 var type = require('chaijs~type-detect@0.1.1');
473 413
474 /*! 414 /*!
475 * Buffer.isBuffer browser shim 415 * Buffer.isBuffer browser shim
476 */ 416 */
477 417
478 var Buffer; 418 var Buffer;
479 try { Buffer = require('buffer').Buffer; } 419 try { Buffer = require('buffer').Buffer; }
480 catch(ex) { 420 catch(ex) {
481 Buffer = {}; 421 Buffer = {};
482 Buffer.isBuffer = function() { return false; } 422 Buffer.isBuffer = function() { return false; }
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 key = ka[i]; 651 key = ka[i];
712 if (!deepEqual(a[key], b[key], m)) { 652 if (!deepEqual(a[key], b[key], m)) {
713 return false; 653 return false;
714 } 654 }
715 } 655 }
716 656
717 return true; 657 return true;
718 } 658 }
719 659
720 }); 660 });
721 require.register("chai/index.js", function(exports, require, module){ 661
722 module.exports = require('./lib/chai'); 662 require.register("chai", function (exports, module) {
663 module.exports = require('chai/lib/chai.js');
723 664
724 }); 665 });
725 require.register("chai/lib/chai.js", function(exports, require, module){ 666
667 require.register("chai/lib/chai.js", function (exports, module) {
726 /*! 668 /*!
727 * chai 669 * chai
728 * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com> 670 * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
729 * MIT Licensed 671 * MIT Licensed
730 */ 672 */
731 673
732 var used = [] 674 var used = []
733 , exports = module.exports = {}; 675 , exports = module.exports = {};
734 676
735 /*! 677 /*!
736 * Chai version 678 * Chai version
737 */ 679 */
738 680
739 exports.version = '1.9.2'; 681 exports.version = '1.10.0';
740 682
741 /*! 683 /*!
742 * Assertion Error 684 * Assertion Error
743 */ 685 */
744 686
745 exports.AssertionError = require('assertion-error'); 687 exports.AssertionError = require('chaijs~assertion-error@1.0.0');
746 688
747 /*! 689 /*!
748 * Utils for plugins (not exported) 690 * Utils for plugins (not exported)
749 */ 691 */
750 692
751 var util = require('./chai/utils'); 693 var util = require('chai/lib/chai/utils/index.js');
752 694
753 /** 695 /**
754 * # .use(function) 696 * # .use(function)
755 * 697 *
756 * Provides a way to extend the internals of Chai 698 * Provides a way to extend the internals of Chai
757 * 699 *
758 * @param {Function} 700 * @param {Function}
759 * @returns {this} for chaining 701 * @returns {this} for chaining
760 * @api public 702 * @api public
761 */ 703 */
762 704
763 exports.use = function (fn) { 705 exports.use = function (fn) {
764 if (!~used.indexOf(fn)) { 706 if (!~used.indexOf(fn)) {
765 fn(this, util); 707 fn(this, util);
766 used.push(fn); 708 used.push(fn);
767 } 709 }
768 710
769 return this; 711 return this;
770 }; 712 };
771 713
772 /*! 714 /*!
773 * Configuration 715 * Configuration
774 */ 716 */
775 717
776 var config = require('./chai/config'); 718 var config = require('chai/lib/chai/config.js');
777 exports.config = config; 719 exports.config = config;
778 720
779 /*! 721 /*!
780 * Primary `Assertion` prototype 722 * Primary `Assertion` prototype
781 */ 723 */
782 724
783 var assertion = require('./chai/assertion'); 725 var assertion = require('chai/lib/chai/assertion.js');
784 exports.use(assertion); 726 exports.use(assertion);
785 727
786 /*! 728 /*!
787 * Core Assertions 729 * Core Assertions
788 */ 730 */
789 731
790 var core = require('./chai/core/assertions'); 732 var core = require('chai/lib/chai/core/assertions.js');
791 exports.use(core); 733 exports.use(core);
792 734
793 /*! 735 /*!
794 * Expect interface 736 * Expect interface
795 */ 737 */
796 738
797 var expect = require('./chai/interface/expect'); 739 var expect = require('chai/lib/chai/interface/expect.js');
798 exports.use(expect); 740 exports.use(expect);
799 741
800 /*! 742 /*!
801 * Should interface 743 * Should interface
802 */ 744 */
803 745
804 var should = require('./chai/interface/should'); 746 var should = require('chai/lib/chai/interface/should.js');
805 exports.use(should); 747 exports.use(should);
806 748
807 /*! 749 /*!
808 * Assert interface 750 * Assert interface
809 */ 751 */
810 752
811 var assert = require('./chai/interface/assert'); 753 var assert = require('chai/lib/chai/interface/assert.js');
812 exports.use(assert); 754 exports.use(assert);
813 755
814 }); 756 });
815 require.register("chai/lib/chai/assertion.js", function(exports, require, module ){ 757
758 require.register("chai/lib/chai/assertion.js", function (exports, module) {
816 /*! 759 /*!
817 * chai 760 * chai
818 * http://chaijs.com 761 * http://chaijs.com
819 * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com> 762 * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
820 * MIT Licensed 763 * MIT Licensed
821 */ 764 */
822 765
823 var config = require('./config'); 766 var config = require('chai/lib/chai/config.js');
767 var NOOP = function() { };
824 768
825 module.exports = function (_chai, util) { 769 module.exports = function (_chai, util) {
826 /*! 770 /*!
827 * Module dependencies. 771 * Module dependencies.
828 */ 772 */
829 773
830 var AssertionError = _chai.AssertionError 774 var AssertionError = _chai.AssertionError
831 , flag = util.flag; 775 , flag = util.flag;
832 776
833 /*! 777 /*!
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 }; 821 };
878 822
879 Assertion.addMethod = function (name, fn) { 823 Assertion.addMethod = function (name, fn) {
880 util.addMethod(this.prototype, name, fn); 824 util.addMethod(this.prototype, name, fn);
881 }; 825 };
882 826
883 Assertion.addChainableMethod = function (name, fn, chainingBehavior) { 827 Assertion.addChainableMethod = function (name, fn, chainingBehavior) {
884 util.addChainableMethod(this.prototype, name, fn, chainingBehavior); 828 util.addChainableMethod(this.prototype, name, fn, chainingBehavior);
885 }; 829 };
886 830
831 Assertion.addChainableNoop = function(name, fn) {
832 util.addChainableMethod(this.prototype, name, NOOP, fn);
833 };
834
887 Assertion.overwriteProperty = function (name, fn) { 835 Assertion.overwriteProperty = function (name, fn) {
888 util.overwriteProperty(this.prototype, name, fn); 836 util.overwriteProperty(this.prototype, name, fn);
889 }; 837 };
890 838
891 Assertion.overwriteMethod = function (name, fn) { 839 Assertion.overwriteMethod = function (name, fn) {
892 util.overwriteMethod(this.prototype, name, fn); 840 util.overwriteMethod(this.prototype, name, fn);
893 }; 841 };
894 842
895 Assertion.overwriteChainableMethod = function (name, fn, chainingBehavior) { 843 Assertion.overwriteChainableMethod = function (name, fn, chainingBehavior) {
896 util.overwriteChainableMethod(this.prototype, name, fn, chainingBehavior); 844 util.overwriteChainableMethod(this.prototype, name, fn, chainingBehavior);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
938 { get: function () { 886 { get: function () {
939 return flag(this, 'object'); 887 return flag(this, 'object');
940 } 888 }
941 , set: function (val) { 889 , set: function (val) {
942 flag(this, 'object', val); 890 flag(this, 'object', val);
943 } 891 }
944 }); 892 });
945 }; 893 };
946 894
947 }); 895 });
948 require.register("chai/lib/chai/config.js", function(exports, require, module){ 896
897 require.register("chai/lib/chai/config.js", function (exports, module) {
949 module.exports = { 898 module.exports = {
950 899
951 /** 900 /**
952 * ### config.includeStack 901 * ### config.includeStack
953 * 902 *
954 * User configurable property, influences whether stack trace 903 * User configurable property, influences whether stack trace
955 * is included in Assertion error message. Default of false 904 * is included in Assertion error message. Default of false
956 * suppresses stack trace in the error message. 905 * suppresses stack trace in the error message.
957 * 906 *
958 * chai.config.includeStack = true; // enable stack on error 907 * chai.config.includeStack = true; // enable stack on error
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
991 * 940 *
992 * @param {Number} 941 * @param {Number}
993 * @api public 942 * @api public
994 */ 943 */
995 944
996 truncateThreshold: 40 945 truncateThreshold: 40
997 946
998 }; 947 };
999 948
1000 }); 949 });
1001 require.register("chai/lib/chai/core/assertions.js", function(exports, require, module){ 950
951 require.register("chai/lib/chai/core/assertions.js", function (exports, module) {
1002 /*! 952 /*!
1003 * chai 953 * chai
1004 * http://chaijs.com 954 * http://chaijs.com
1005 * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com> 955 * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
1006 * MIT Licensed 956 * MIT Licensed
1007 */ 957 */
1008 958
1009 module.exports = function (chai, _) { 959 module.exports = function (chai, _) {
1010 var Assertion = chai.Assertion 960 var Assertion = chai.Assertion
1011 , toString = Object.prototype.toString 961 , toString = Object.prototype.toString
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1180 * ### .ok 1130 * ### .ok
1181 * 1131 *
1182 * Asserts that the target is truthy. 1132 * Asserts that the target is truthy.
1183 * 1133 *
1184 * expect('everthing').to.be.ok; 1134 * expect('everthing').to.be.ok;
1185 * expect(1).to.be.ok; 1135 * expect(1).to.be.ok;
1186 * expect(false).to.not.be.ok; 1136 * expect(false).to.not.be.ok;
1187 * expect(undefined).to.not.be.ok; 1137 * expect(undefined).to.not.be.ok;
1188 * expect(null).to.not.be.ok; 1138 * expect(null).to.not.be.ok;
1189 * 1139 *
1140 * Can also be used as a function, which prevents some linter errors.
1141 *
1142 * expect('everthing').to.be.ok();
1143 *
1190 * @name ok 1144 * @name ok
1191 * @api public 1145 * @api public
1192 */ 1146 */
1193 1147
1194 Assertion.addProperty('ok', function () { 1148 Assertion.addChainableNoop('ok', function () {
1195 this.assert( 1149 this.assert(
1196 flag(this, 'object') 1150 flag(this, 'object')
1197 , 'expected #{this} to be truthy' 1151 , 'expected #{this} to be truthy'
1198 , 'expected #{this} to be falsy'); 1152 , 'expected #{this} to be falsy');
1199 }); 1153 });
1200 1154
1201 /** 1155 /**
1202 * ### .true 1156 * ### .true
1203 * 1157 *
1204 * Asserts that the target is `true`. 1158 * Asserts that the target is `true`.
1205 * 1159 *
1206 * expect(true).to.be.true; 1160 * expect(true).to.be.true;
1207 * expect(1).to.not.be.true; 1161 * expect(1).to.not.be.true;
1208 * 1162 *
1163 * Can also be used as a function, which prevents some linter errors.
1164 *
1165 * expect(true).to.be.true();
1166 *
1209 * @name true 1167 * @name true
1210 * @api public 1168 * @api public
1211 */ 1169 */
1212 1170
1213 Assertion.addProperty('true', function () { 1171 Assertion.addChainableNoop('true', function () {
1214 this.assert( 1172 this.assert(
1215 true === flag(this, 'object') 1173 true === flag(this, 'object')
1216 , 'expected #{this} to be true' 1174 , 'expected #{this} to be true'
1217 , 'expected #{this} to be false' 1175 , 'expected #{this} to be false'
1218 , this.negate ? false : true 1176 , this.negate ? false : true
1219 ); 1177 );
1220 }); 1178 });
1221 1179
1222 /** 1180 /**
1223 * ### .false 1181 * ### .false
1224 * 1182 *
1225 * Asserts that the target is `false`. 1183 * Asserts that the target is `false`.
1226 * 1184 *
1227 * expect(false).to.be.false; 1185 * expect(false).to.be.false;
1228 * expect(0).to.not.be.false; 1186 * expect(0).to.not.be.false;
1229 * 1187 *
1188 * Can also be used as a function, which prevents some linter errors.
1189 *
1190 * expect(false).to.be.false();
1191 *
1230 * @name false 1192 * @name false
1231 * @api public 1193 * @api public
1232 */ 1194 */
1233 1195
1234 Assertion.addProperty('false', function () { 1196 Assertion.addChainableNoop('false', function () {
1235 this.assert( 1197 this.assert(
1236 false === flag(this, 'object') 1198 false === flag(this, 'object')
1237 , 'expected #{this} to be false' 1199 , 'expected #{this} to be false'
1238 , 'expected #{this} to be true' 1200 , 'expected #{this} to be true'
1239 , this.negate ? true : false 1201 , this.negate ? true : false
1240 ); 1202 );
1241 }); 1203 });
1242 1204
1243 /** 1205 /**
1244 * ### .null 1206 * ### .null
1245 * 1207 *
1246 * Asserts that the target is `null`. 1208 * Asserts that the target is `null`.
1247 * 1209 *
1248 * expect(null).to.be.null; 1210 * expect(null).to.be.null;
1249 * expect(undefined).not.to.be.null; 1211 * expect(undefined).not.to.be.null;
1250 * 1212 *
1213 * Can also be used as a function, which prevents some linter errors.
1214 *
1215 * expect(null).to.be.null();
1216 *
1251 * @name null 1217 * @name null
1252 * @api public 1218 * @api public
1253 */ 1219 */
1254 1220
1255 Assertion.addProperty('null', function () { 1221 Assertion.addChainableNoop('null', function () {
1256 this.assert( 1222 this.assert(
1257 null === flag(this, 'object') 1223 null === flag(this, 'object')
1258 , 'expected #{this} to be null' 1224 , 'expected #{this} to be null'
1259 , 'expected #{this} not to be null' 1225 , 'expected #{this} not to be null'
1260 ); 1226 );
1261 }); 1227 });
1262 1228
1263 /** 1229 /**
1264 * ### .undefined 1230 * ### .undefined
1265 * 1231 *
1266 * Asserts that the target is `undefined`. 1232 * Asserts that the target is `undefined`.
1267 * 1233 *
1268 * expect(undefined).to.be.undefined; 1234 * expect(undefined).to.be.undefined;
1269 * expect(null).to.not.be.undefined; 1235 * expect(null).to.not.be.undefined;
1270 * 1236 *
1237 * Can also be used as a function, which prevents some linter errors.
1238 *
1239 * expect(undefined).to.be.undefined();
1240 *
1271 * @name undefined 1241 * @name undefined
1272 * @api public 1242 * @api public
1273 */ 1243 */
1274 1244
1275 Assertion.addProperty('undefined', function () { 1245 Assertion.addChainableNoop('undefined', function () {
1276 this.assert( 1246 this.assert(
1277 undefined === flag(this, 'object') 1247 undefined === flag(this, 'object')
1278 , 'expected #{this} to be undefined' 1248 , 'expected #{this} to be undefined'
1279 , 'expected #{this} not to be undefined' 1249 , 'expected #{this} not to be undefined'
1280 ); 1250 );
1281 }); 1251 });
1282 1252
1283 /** 1253 /**
1284 * ### .exist 1254 * ### .exist
1285 * 1255 *
1286 * Asserts that the target is neither `null` nor `undefined`. 1256 * Asserts that the target is neither `null` nor `undefined`.
1287 * 1257 *
1288 * var foo = 'hi' 1258 * var foo = 'hi'
1289 * , bar = null 1259 * , bar = null
1290 * , baz; 1260 * , baz;
1291 * 1261 *
1292 * expect(foo).to.exist; 1262 * expect(foo).to.exist;
1293 * expect(bar).to.not.exist; 1263 * expect(bar).to.not.exist;
1294 * expect(baz).to.not.exist; 1264 * expect(baz).to.not.exist;
1295 * 1265 *
1266 * Can also be used as a function, which prevents some linter errors.
1267 *
1268 * expect(foo).to.exist();
1269 *
1296 * @name exist 1270 * @name exist
1297 * @api public 1271 * @api public
1298 */ 1272 */
1299 1273
1300 Assertion.addProperty('exist', function () { 1274 Assertion.addChainableNoop('exist', function () {
1301 this.assert( 1275 this.assert(
1302 null != flag(this, 'object') 1276 null != flag(this, 'object')
1303 , 'expected #{this} to exist' 1277 , 'expected #{this} to exist'
1304 , 'expected #{this} to not exist' 1278 , 'expected #{this} to not exist'
1305 ); 1279 );
1306 }); 1280 });
1307 1281
1308 1282
1309 /** 1283 /**
1310 * ### .empty 1284 * ### .empty
1311 * 1285 *
1312 * Asserts that the target's length is `0`. For arrays, it checks 1286 * Asserts that the target's length is `0`. For arrays, it checks
1313 * the `length` property. For objects, it gets the count of 1287 * the `length` property. For objects, it gets the count of
1314 * enumerable keys. 1288 * enumerable keys.
1315 * 1289 *
1316 * expect([]).to.be.empty; 1290 * expect([]).to.be.empty;
1317 * expect('').to.be.empty; 1291 * expect('').to.be.empty;
1318 * expect({}).to.be.empty; 1292 * expect({}).to.be.empty;
1319 * 1293 *
1294 * Can also be used as a function, which prevents some linter errors.
1295 *
1296 * expect([]).to.be.empty();
1297 *
1320 * @name empty 1298 * @name empty
1321 * @api public 1299 * @api public
1322 */ 1300 */
1323 1301
1324 Assertion.addProperty('empty', function () { 1302 Assertion.addChainableNoop('empty', function () {
1325 var obj = flag(this, 'object') 1303 var obj = flag(this, 'object')
1326 , expected = obj; 1304 , expected = obj;
1327 1305
1328 if (Array.isArray(obj) || 'string' === typeof object) { 1306 if (Array.isArray(obj) || 'string' === typeof object) {
1329 expected = obj.length; 1307 expected = obj.length;
1330 } else if (typeof obj === 'object') { 1308 } else if (typeof obj === 'object') {
1331 expected = Object.keys(obj).length; 1309 expected = Object.keys(obj).length;
1332 } 1310 }
1333 1311
1334 this.assert( 1312 this.assert(
1335 !expected 1313 !expected
1336 , 'expected #{this} to be empty' 1314 , 'expected #{this} to be empty'
1337 , 'expected #{this} not to be empty' 1315 , 'expected #{this} not to be empty'
1338 ); 1316 );
1339 }); 1317 });
1340 1318
1341 /** 1319 /**
1342 * ### .arguments 1320 * ### .arguments
1343 * 1321 *
1344 * Asserts that the target is an arguments object. 1322 * Asserts that the target is an arguments object.
1345 * 1323 *
1346 * function test () { 1324 * function test () {
1347 * expect(arguments).to.be.arguments; 1325 * expect(arguments).to.be.arguments;
1348 * } 1326 * }
1349 * 1327 *
1328 * Can also be used as a function, which prevents some linter errors.
1329 *
1330 * function test () {
1331 * expect(arguments).to.be.arguments();
1332 * }
1333 *
1350 * @name arguments 1334 * @name arguments
1351 * @alias Arguments 1335 * @alias Arguments
1352 * @api public 1336 * @api public
1353 */ 1337 */
1354 1338
1355 function checkArguments () { 1339 function checkArguments () {
1356 var obj = flag(this, 'object') 1340 var obj = flag(this, 'object')
1357 , type = Object.prototype.toString.call(obj); 1341 , type = Object.prototype.toString.call(obj);
1358 this.assert( 1342 this.assert(
1359 '[object Arguments]' === type 1343 '[object Arguments]' === type
1360 , 'expected #{this} to be arguments but got ' + type 1344 , 'expected #{this} to be arguments but got ' + type
1361 , 'expected #{this} to not be arguments' 1345 , 'expected #{this} to not be arguments'
1362 ); 1346 );
1363 } 1347 }
1364 1348
1365 Assertion.addProperty('arguments', checkArguments); 1349 Assertion.addChainableNoop('arguments', checkArguments);
1366 Assertion.addProperty('Arguments', checkArguments); 1350 Assertion.addChainableNoop('Arguments', checkArguments);
1367 1351
1368 /** 1352 /**
1369 * ### .equal(value) 1353 * ### .equal(value)
1370 * 1354 *
1371 * Asserts that the target is strictly equal (`===`) to `value`. 1355 * Asserts that the target is strictly equal (`===`) to `value`.
1372 * Alternately, if the `deep` flag is set, asserts that 1356 * Alternately, if the `deep` flag is set, asserts that
1373 * the target is deeply equal to `value`. 1357 * the target is deeply equal to `value`.
1374 * 1358 *
1375 * expect('hello').to.equal('hello'); 1359 * expect('hello').to.equal('hello');
1376 * expect(42).to.equal(42); 1360 * expect(42).to.equal(42);
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after
2319 isSubsetOf(obj, subset, cmp) && isSubsetOf(subset, obj, cmp) 2303 isSubsetOf(obj, subset, cmp) && isSubsetOf(subset, obj, cmp)
2320 , 'expected #{this} to have the same members as #{act}' 2304 , 'expected #{this} to have the same members as #{act}'
2321 , 'expected #{this} to not have the same members as #{act}' 2305 , 'expected #{this} to not have the same members as #{act}'
2322 , obj 2306 , obj
2323 , subset 2307 , subset
2324 ); 2308 );
2325 }); 2309 });
2326 }; 2310 };
2327 2311
2328 }); 2312 });
2329 require.register("chai/lib/chai/interface/assert.js", function(exports, require, module){ 2313
2314 require.register("chai/lib/chai/interface/assert.js", function (exports, module) {
2330 /*! 2315 /*!
2331 * chai 2316 * chai
2332 * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com> 2317 * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
2333 * MIT Licensed 2318 * MIT Licensed
2334 */ 2319 */
2335 2320
2336 2321
2337 module.exports = function (chai, util) { 2322 module.exports = function (chai, util) {
2338 2323
2339 /*! 2324 /*!
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after
3378 3363
3379 (function alias(name, as){ 3364 (function alias(name, as){
3380 assert[as] = assert[name]; 3365 assert[as] = assert[name];
3381 return alias; 3366 return alias;
3382 }) 3367 })
3383 ('Throw', 'throw') 3368 ('Throw', 'throw')
3384 ('Throw', 'throws'); 3369 ('Throw', 'throws');
3385 }; 3370 };
3386 3371
3387 }); 3372 });
3388 require.register("chai/lib/chai/interface/expect.js", function(exports, require, module){ 3373
3374 require.register("chai/lib/chai/interface/expect.js", function (exports, module) {
3389 /*! 3375 /*!
3390 * chai 3376 * chai
3391 * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com> 3377 * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
3392 * MIT Licensed 3378 * MIT Licensed
3393 */ 3379 */
3394 3380
3395 module.exports = function (chai, util) { 3381 module.exports = function (chai, util) {
3396 chai.expect = function (val, message) { 3382 chai.expect = function (val, message) {
3397 return new chai.Assertion(val, message); 3383 return new chai.Assertion(val, message);
3398 }; 3384 };
3399 }; 3385 };
3400 3386
3401 3387
3402 }); 3388 });
3403 require.register("chai/lib/chai/interface/should.js", function(exports, require, module){ 3389
3390 require.register("chai/lib/chai/interface/should.js", function (exports, module) {
3404 /*! 3391 /*!
3405 * chai 3392 * chai
3406 * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com> 3393 * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
3407 * MIT Licensed 3394 * MIT Licensed
3408 */ 3395 */
3409 3396
3410 module.exports = function (chai, util) { 3397 module.exports = function (chai, util) {
3411 var Assertion = chai.Assertion; 3398 var Assertion = chai.Assertion;
3412 3399
3413 function loadShould () { 3400 function loadShould () {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
3474 should.not['throw'] = should.not['Throw']; 3461 should.not['throw'] = should.not['Throw'];
3475 3462
3476 return should; 3463 return should;
3477 }; 3464 };
3478 3465
3479 chai.should = loadShould; 3466 chai.should = loadShould;
3480 chai.Should = loadShould; 3467 chai.Should = loadShould;
3481 }; 3468 };
3482 3469
3483 }); 3470 });
3484 require.register("chai/lib/chai/utils/addChainableMethod.js", function(exports, require, module){ 3471
3472 require.register("chai/lib/chai/utils/addChainableMethod.js", function (exports, module) {
3485 /*! 3473 /*!
3486 * Chai - addChainingMethod utility 3474 * Chai - addChainingMethod utility
3487 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> 3475 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
3488 * MIT Licensed 3476 * MIT Licensed
3489 */ 3477 */
3490 3478
3491 /*! 3479 /*!
3492 * Module dependencies 3480 * Module dependencies
3493 */ 3481 */
3494 3482
3495 var transferFlags = require('./transferFlags'); 3483 var transferFlags = require('chai/lib/chai/utils/transferFlags.js');
3496 var flag = require('./flag'); 3484 var flag = require('chai/lib/chai/utils/flag.js');
3497 var config = require('../config'); 3485 var config = require('chai/lib/chai/config.js');
3498 3486
3499 /*! 3487 /*!
3500 * Module variables 3488 * Module variables
3501 */ 3489 */
3502 3490
3503 // Check whether `__proto__` is supported 3491 // Check whether `__proto__` is supported
3504 var hasProtoSupport = '__proto__' in Object; 3492 var hasProtoSupport = '__proto__' in Object;
3505 3493
3506 // Without `__proto__` support, this module will need to add properties to a fun ction. 3494 // Without `__proto__` support, this module will need to add properties to a fun ction.
3507 // However, some Function.prototype methods cannot be overwritten, 3495 // However, some Function.prototype methods cannot be overwritten,
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
3588 } 3576 }
3589 3577
3590 transferFlags(this, assert); 3578 transferFlags(this, assert);
3591 return assert; 3579 return assert;
3592 } 3580 }
3593 , configurable: true 3581 , configurable: true
3594 }); 3582 });
3595 }; 3583 };
3596 3584
3597 }); 3585 });
3598 require.register("chai/lib/chai/utils/addMethod.js", function(exports, require, module){ 3586
3587 require.register("chai/lib/chai/utils/addMethod.js", function (exports, module) {
3599 /*! 3588 /*!
3600 * Chai - addMethod utility 3589 * Chai - addMethod utility
3601 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> 3590 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
3602 * MIT Licensed 3591 * MIT Licensed
3603 */ 3592 */
3604 3593
3605 var config = require('../config'); 3594 var config = require('chai/lib/chai/config.js');
3606 3595
3607 /** 3596 /**
3608 * ### .addMethod (ctx, name, method) 3597 * ### .addMethod (ctx, name, method)
3609 * 3598 *
3610 * Adds a method to the prototype of an object. 3599 * Adds a method to the prototype of an object.
3611 * 3600 *
3612 * utils.addMethod(chai.Assertion.prototype, 'foo', function (str) { 3601 * utils.addMethod(chai.Assertion.prototype, 'foo', function (str) {
3613 * var obj = utils.flag(this, 'object'); 3602 * var obj = utils.flag(this, 'object');
3614 * new chai.Assertion(obj).to.be.equal(str); 3603 * new chai.Assertion(obj).to.be.equal(str);
3615 * }); 3604 * });
3616 * 3605 *
3617 * Can also be accessed directly from `chai.Assertion`. 3606 * Can also be accessed directly from `chai.Assertion`.
3618 * 3607 *
3619 * chai.Assertion.addMethod('foo', fn); 3608 * chai.Assertion.addMethod('foo', fn);
3620 * 3609 *
3621 * Then can be used as any other assertion. 3610 * Then can be used as any other assertion.
3622 * 3611 *
3623 * expect(fooStr).to.be.foo('bar'); 3612 * expect(fooStr).to.be.foo('bar');
3624 * 3613 *
3625 * @param {Object} ctx object to which the method is added 3614 * @param {Object} ctx object to which the method is added
3626 * @param {String} name of method to add 3615 * @param {String} name of method to add
3627 * @param {Function} method function to be used for name 3616 * @param {Function} method function to be used for name
3628 * @name addMethod 3617 * @name addMethod
3629 * @api public 3618 * @api public
3630 */ 3619 */
3631 var flag = require('./flag'); 3620 var flag = require('chai/lib/chai/utils/flag.js');
3632 3621
3633 module.exports = function (ctx, name, method) { 3622 module.exports = function (ctx, name, method) {
3634 ctx[name] = function () { 3623 ctx[name] = function () {
3635 var old_ssfi = flag(this, 'ssfi'); 3624 var old_ssfi = flag(this, 'ssfi');
3636 if (old_ssfi && config.includeStack === false) 3625 if (old_ssfi && config.includeStack === false)
3637 flag(this, 'ssfi', ctx[name]); 3626 flag(this, 'ssfi', ctx[name]);
3638 var result = method.apply(this, arguments); 3627 var result = method.apply(this, arguments);
3639 return result === undefined ? this : result; 3628 return result === undefined ? this : result;
3640 }; 3629 };
3641 }; 3630 };
3642 3631
3643 }); 3632 });
3644 require.register("chai/lib/chai/utils/addProperty.js", function(exports, require , module){ 3633
3634 require.register("chai/lib/chai/utils/addProperty.js", function (exports, module ) {
3645 /*! 3635 /*!
3646 * Chai - addProperty utility 3636 * Chai - addProperty utility
3647 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> 3637 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
3648 * MIT Licensed 3638 * MIT Licensed
3649 */ 3639 */
3650 3640
3651 /** 3641 /**
3652 * ### addProperty (ctx, name, getter) 3642 * ### addProperty (ctx, name, getter)
3653 * 3643 *
3654 * Adds a property to the prototype of an object. 3644 * Adds a property to the prototype of an object.
(...skipping 22 matching lines...) Expand all
3677 Object.defineProperty(ctx, name, 3667 Object.defineProperty(ctx, name,
3678 { get: function () { 3668 { get: function () {
3679 var result = getter.call(this); 3669 var result = getter.call(this);
3680 return result === undefined ? this : result; 3670 return result === undefined ? this : result;
3681 } 3671 }
3682 , configurable: true 3672 , configurable: true
3683 }); 3673 });
3684 }; 3674 };
3685 3675
3686 }); 3676 });
3687 require.register("chai/lib/chai/utils/flag.js", function(exports, require, modul e){ 3677
3678 require.register("chai/lib/chai/utils/flag.js", function (exports, module) {
3688 /*! 3679 /*!
3689 * Chai - flag utility 3680 * Chai - flag utility
3690 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> 3681 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
3691 * MIT Licensed 3682 * MIT Licensed
3692 */ 3683 */
3693 3684
3694 /** 3685 /**
3695 * ### flag(object ,key, [value]) 3686 * ### flag(object ,key, [value])
3696 * 3687 *
3697 * Get or set a flag value on an object. If a 3688 * Get or set a flag value on an object. If a
(...skipping 14 matching lines...) Expand all
3712 module.exports = function (obj, key, value) { 3703 module.exports = function (obj, key, value) {
3713 var flags = obj.__flags || (obj.__flags = Object.create(null)); 3704 var flags = obj.__flags || (obj.__flags = Object.create(null));
3714 if (arguments.length === 3) { 3705 if (arguments.length === 3) {
3715 flags[key] = value; 3706 flags[key] = value;
3716 } else { 3707 } else {
3717 return flags[key]; 3708 return flags[key];
3718 } 3709 }
3719 }; 3710 };
3720 3711
3721 }); 3712 });
3722 require.register("chai/lib/chai/utils/getActual.js", function(exports, require, module){ 3713
3714 require.register("chai/lib/chai/utils/getActual.js", function (exports, module) {
3723 /*! 3715 /*!
3724 * Chai - getActual utility 3716 * Chai - getActual utility
3725 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> 3717 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
3726 * MIT Licensed 3718 * MIT Licensed
3727 */ 3719 */
3728 3720
3729 /** 3721 /**
3730 * # getActual(object, [actual]) 3722 * # getActual(object, [actual])
3731 * 3723 *
3732 * Returns the `actual` value for an Assertion 3724 * Returns the `actual` value for an Assertion
3733 * 3725 *
3734 * @param {Object} object (constructed Assertion) 3726 * @param {Object} object (constructed Assertion)
3735 * @param {Arguments} chai.Assertion.prototype.assert arguments 3727 * @param {Arguments} chai.Assertion.prototype.assert arguments
3736 */ 3728 */
3737 3729
3738 module.exports = function (obj, args) { 3730 module.exports = function (obj, args) {
3739 return args.length > 4 ? args[4] : obj._obj; 3731 return args.length > 4 ? args[4] : obj._obj;
3740 }; 3732 };
3741 3733
3742 }); 3734 });
3743 require.register("chai/lib/chai/utils/getEnumerableProperties.js", function(expo rts, require, module){ 3735
3736 require.register("chai/lib/chai/utils/getEnumerableProperties.js", function (exp orts, module) {
3744 /*! 3737 /*!
3745 * Chai - getEnumerableProperties utility 3738 * Chai - getEnumerableProperties utility
3746 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> 3739 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
3747 * MIT Licensed 3740 * MIT Licensed
3748 */ 3741 */
3749 3742
3750 /** 3743 /**
3751 * ### .getEnumerableProperties(object) 3744 * ### .getEnumerableProperties(object)
3752 * 3745 *
3753 * This allows the retrieval of enumerable property names of an object, 3746 * This allows the retrieval of enumerable property names of an object,
3754 * inherited or not. 3747 * inherited or not.
3755 * 3748 *
3756 * @param {Object} object 3749 * @param {Object} object
3757 * @returns {Array} 3750 * @returns {Array}
3758 * @name getEnumerableProperties 3751 * @name getEnumerableProperties
3759 * @api public 3752 * @api public
3760 */ 3753 */
3761 3754
3762 module.exports = function getEnumerableProperties(object) { 3755 module.exports = function getEnumerableProperties(object) {
3763 var result = []; 3756 var result = [];
3764 for (var name in object) { 3757 for (var name in object) {
3765 result.push(name); 3758 result.push(name);
3766 } 3759 }
3767 return result; 3760 return result;
3768 }; 3761 };
3769 3762
3770 }); 3763 });
3771 require.register("chai/lib/chai/utils/getMessage.js", function(exports, require, module){ 3764
3765 require.register("chai/lib/chai/utils/getMessage.js", function (exports, module) {
3772 /*! 3766 /*!
3773 * Chai - message composition utility 3767 * Chai - message composition utility
3774 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> 3768 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
3775 * MIT Licensed 3769 * MIT Licensed
3776 */ 3770 */
3777 3771
3778 /*! 3772 /*!
3779 * Module dependancies 3773 * Module dependancies
3780 */ 3774 */
3781 3775
3782 var flag = require('./flag') 3776 var flag = require('chai/lib/chai/utils/flag.js')
3783 , getActual = require('./getActual') 3777 , getActual = require('chai/lib/chai/utils/getActual.js')
3784 , inspect = require('./inspect') 3778 , inspect = require('chai/lib/chai/utils/inspect.js')
3785 , objDisplay = require('./objDisplay'); 3779 , objDisplay = require('chai/lib/chai/utils/objDisplay.js');
3786 3780
3787 /** 3781 /**
3788 * ### .getMessage(object, message, negateMessage) 3782 * ### .getMessage(object, message, negateMessage)
3789 * 3783 *
3790 * Construct the error message based on flags 3784 * Construct the error message based on flags
3791 * and template tags. Template tags will return 3785 * and template tags. Template tags will return
3792 * a stringified inspection of the object referenced. 3786 * a stringified inspection of the object referenced.
3793 * 3787 *
3794 * Message template tags: 3788 * Message template tags:
3795 * - `#{this}` current asserted object 3789 * - `#{this}` current asserted object
(...skipping 18 matching lines...) Expand all
3814 msg = msg || ''; 3808 msg = msg || '';
3815 msg = msg 3809 msg = msg
3816 .replace(/#{this}/g, objDisplay(val)) 3810 .replace(/#{this}/g, objDisplay(val))
3817 .replace(/#{act}/g, objDisplay(actual)) 3811 .replace(/#{act}/g, objDisplay(actual))
3818 .replace(/#{exp}/g, objDisplay(expected)); 3812 .replace(/#{exp}/g, objDisplay(expected));
3819 3813
3820 return flagMsg ? flagMsg + ': ' + msg : msg; 3814 return flagMsg ? flagMsg + ': ' + msg : msg;
3821 }; 3815 };
3822 3816
3823 }); 3817 });
3824 require.register("chai/lib/chai/utils/getName.js", function(exports, require, mo dule){ 3818
3819 require.register("chai/lib/chai/utils/getName.js", function (exports, module) {
3825 /*! 3820 /*!
3826 * Chai - getName utility 3821 * Chai - getName utility
3827 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> 3822 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
3828 * MIT Licensed 3823 * MIT Licensed
3829 */ 3824 */
3830 3825
3831 /** 3826 /**
3832 * # getName(func) 3827 * # getName(func)
3833 * 3828 *
3834 * Gets the name of a function, in a cross-browser way. 3829 * Gets the name of a function, in a cross-browser way.
3835 * 3830 *
3836 * @param {Function} a function (usually a constructor) 3831 * @param {Function} a function (usually a constructor)
3837 */ 3832 */
3838 3833
3839 module.exports = function (func) { 3834 module.exports = function (func) {
3840 if (func.name) return func.name; 3835 if (func.name) return func.name;
3841 3836
3842 var match = /^\s?function ([^(]*)\(/.exec(func); 3837 var match = /^\s?function ([^(]*)\(/.exec(func);
3843 return match && match[1] ? match[1] : ""; 3838 return match && match[1] ? match[1] : "";
3844 }; 3839 };
3845 3840
3846 }); 3841 });
3847 require.register("chai/lib/chai/utils/getPathValue.js", function(exports, requir e, module){ 3842
3843 require.register("chai/lib/chai/utils/getPathValue.js", function (exports, modul e) {
3848 /*! 3844 /*!
3849 * Chai - getPathValue utility 3845 * Chai - getPathValue utility
3850 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> 3846 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
3851 * @see https://github.com/logicalparadox/filtr 3847 * @see https://github.com/logicalparadox/filtr
3852 * MIT Licensed 3848 * MIT Licensed
3853 */ 3849 */
3854 3850
3855 /** 3851 /**
3856 * ### .getPathValue(path, object) 3852 * ### .getPathValue(path, object)
3857 * 3853 *
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
3942 tmp = tmp[part.i]; 3938 tmp = tmp[part.i];
3943 if (i == (l - 1)) res = tmp; 3939 if (i == (l - 1)) res = tmp;
3944 } else { 3940 } else {
3945 res = undefined; 3941 res = undefined;
3946 } 3942 }
3947 } 3943 }
3948 return res; 3944 return res;
3949 }; 3945 };
3950 3946
3951 }); 3947 });
3952 require.register("chai/lib/chai/utils/getProperties.js", function(exports, requi re, module){ 3948
3949 require.register("chai/lib/chai/utils/getProperties.js", function (exports, modu le) {
3953 /*! 3950 /*!
3954 * Chai - getProperties utility 3951 * Chai - getProperties utility
3955 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> 3952 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
3956 * MIT Licensed 3953 * MIT Licensed
3957 */ 3954 */
3958 3955
3959 /** 3956 /**
3960 * ### .getProperties(object) 3957 * ### .getProperties(object)
3961 * 3958 *
3962 * This allows the retrieval of property names of an object, enumerable or not, 3959 * This allows the retrieval of property names of an object, enumerable or not,
(...skipping 17 matching lines...) Expand all
3980 var proto = Object.getPrototypeOf(subject); 3977 var proto = Object.getPrototypeOf(subject);
3981 while (proto !== null) { 3978 while (proto !== null) {
3982 Object.getOwnPropertyNames(proto).forEach(addProperty); 3979 Object.getOwnPropertyNames(proto).forEach(addProperty);
3983 proto = Object.getPrototypeOf(proto); 3980 proto = Object.getPrototypeOf(proto);
3984 } 3981 }
3985 3982
3986 return result; 3983 return result;
3987 }; 3984 };
3988 3985
3989 }); 3986 });
3990 require.register("chai/lib/chai/utils/index.js", function(exports, require, modu le){ 3987
3988 require.register("chai/lib/chai/utils/index.js", function (exports, module) {
3991 /*! 3989 /*!
3992 * chai 3990 * chai
3993 * Copyright(c) 2011 Jake Luer <jake@alogicalparadox.com> 3991 * Copyright(c) 2011 Jake Luer <jake@alogicalparadox.com>
3994 * MIT Licensed 3992 * MIT Licensed
3995 */ 3993 */
3996 3994
3997 /*! 3995 /*!
3998 * Main exports 3996 * Main exports
3999 */ 3997 */
4000 3998
4001 var exports = module.exports = {}; 3999 var exports = module.exports = {};
4002 4000
4003 /*! 4001 /*!
4004 * test utility 4002 * test utility
4005 */ 4003 */
4006 4004
4007 exports.test = require('./test'); 4005 exports.test = require('chai/lib/chai/utils/test.js');
4008 4006
4009 /*! 4007 /*!
4010 * type utility 4008 * type utility
4011 */ 4009 */
4012 4010
4013 exports.type = require('./type'); 4011 exports.type = require('chai/lib/chai/utils/type.js');
4014 4012
4015 /*! 4013 /*!
4016 * message utility 4014 * message utility
4017 */ 4015 */
4018 4016
4019 exports.getMessage = require('./getMessage'); 4017 exports.getMessage = require('chai/lib/chai/utils/getMessage.js');
4020 4018
4021 /*! 4019 /*!
4022 * actual utility 4020 * actual utility
4023 */ 4021 */
4024 4022
4025 exports.getActual = require('./getActual'); 4023 exports.getActual = require('chai/lib/chai/utils/getActual.js');
4026 4024
4027 /*! 4025 /*!
4028 * Inspect util 4026 * Inspect util
4029 */ 4027 */
4030 4028
4031 exports.inspect = require('./inspect'); 4029 exports.inspect = require('chai/lib/chai/utils/inspect.js');
4032 4030
4033 /*! 4031 /*!
4034 * Object Display util 4032 * Object Display util
4035 */ 4033 */
4036 4034
4037 exports.objDisplay = require('./objDisplay'); 4035 exports.objDisplay = require('chai/lib/chai/utils/objDisplay.js');
4038 4036
4039 /*! 4037 /*!
4040 * Flag utility 4038 * Flag utility
4041 */ 4039 */
4042 4040
4043 exports.flag = require('./flag'); 4041 exports.flag = require('chai/lib/chai/utils/flag.js');
4044 4042
4045 /*! 4043 /*!
4046 * Flag transferring utility 4044 * Flag transferring utility
4047 */ 4045 */
4048 4046
4049 exports.transferFlags = require('./transferFlags'); 4047 exports.transferFlags = require('chai/lib/chai/utils/transferFlags.js');
4050 4048
4051 /*! 4049 /*!
4052 * Deep equal utility 4050 * Deep equal utility
4053 */ 4051 */
4054 4052
4055 exports.eql = require('deep-eql'); 4053 exports.eql = require('chaijs~deep-eql@0.1.3');
4056 4054
4057 /*! 4055 /*!
4058 * Deep path value 4056 * Deep path value
4059 */ 4057 */
4060 4058
4061 exports.getPathValue = require('./getPathValue'); 4059 exports.getPathValue = require('chai/lib/chai/utils/getPathValue.js');
4062 4060
4063 /*! 4061 /*!
4064 * Function name 4062 * Function name
4065 */ 4063 */
4066 4064
4067 exports.getName = require('./getName'); 4065 exports.getName = require('chai/lib/chai/utils/getName.js');
4068 4066
4069 /*! 4067 /*!
4070 * add Property 4068 * add Property
4071 */ 4069 */
4072 4070
4073 exports.addProperty = require('./addProperty'); 4071 exports.addProperty = require('chai/lib/chai/utils/addProperty.js');
4074 4072
4075 /*! 4073 /*!
4076 * add Method 4074 * add Method
4077 */ 4075 */
4078 4076
4079 exports.addMethod = require('./addMethod'); 4077 exports.addMethod = require('chai/lib/chai/utils/addMethod.js');
4080 4078
4081 /*! 4079 /*!
4082 * overwrite Property 4080 * overwrite Property
4083 */ 4081 */
4084 4082
4085 exports.overwriteProperty = require('./overwriteProperty'); 4083 exports.overwriteProperty = require('chai/lib/chai/utils/overwriteProperty.js');
4086 4084
4087 /*! 4085 /*!
4088 * overwrite Method 4086 * overwrite Method
4089 */ 4087 */
4090 4088
4091 exports.overwriteMethod = require('./overwriteMethod'); 4089 exports.overwriteMethod = require('chai/lib/chai/utils/overwriteMethod.js');
4092 4090
4093 /*! 4091 /*!
4094 * Add a chainable method 4092 * Add a chainable method
4095 */ 4093 */
4096 4094
4097 exports.addChainableMethod = require('./addChainableMethod'); 4095 exports.addChainableMethod = require('chai/lib/chai/utils/addChainableMethod.js' );
4098 4096
4099 /*! 4097 /*!
4100 * Overwrite chainable method 4098 * Overwrite chainable method
4101 */ 4099 */
4102 4100
4103 exports.overwriteChainableMethod = require('./overwriteChainableMethod'); 4101 exports.overwriteChainableMethod = require('chai/lib/chai/utils/overwriteChainab leMethod.js');
4104 4102
4105 4103
4106 }); 4104 });
4107 require.register("chai/lib/chai/utils/inspect.js", function(exports, require, mo dule){ 4105
4106 require.register("chai/lib/chai/utils/inspect.js", function (exports, module) {
4108 // This is (almost) directly from Node.js utils 4107 // This is (almost) directly from Node.js utils
4109 // https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/ lib/util.js 4108 // https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/ lib/util.js
4110 4109
4111 var getName = require('./getName'); 4110 var getName = require('chai/lib/chai/utils/getName.js');
4112 var getProperties = require('./getProperties'); 4111 var getProperties = require('chai/lib/chai/utils/getProperties.js');
4113 var getEnumerableProperties = require('./getEnumerableProperties'); 4112 var getEnumerableProperties = require('chai/lib/chai/utils/getEnumerableProperti es.js');
4114 4113
4115 module.exports = inspect; 4114 module.exports = inspect;
4116 4115
4117 /** 4116 /**
4118 * Echos the value of a value. Trys to print the value out 4117 * Echos the value of a value. Trys to print the value out
4119 * in the best way possible given the different types. 4118 * in the best way possible given the different types.
4120 * 4119 *
4121 * @param {Object} obj The object to print out. 4120 * @param {Object} obj The object to print out.
4122 * @param {Boolean} showHidden Flag that shows hidden (not enumerable) 4121 * @param {Boolean} showHidden Flag that shows hidden (not enumerable)
4123 * properties of objects. 4122 * properties of objects.
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
4291 case 'undefined': 4290 case 'undefined':
4292 return ctx.stylize('undefined', 'undefined'); 4291 return ctx.stylize('undefined', 'undefined');
4293 4292
4294 case 'string': 4293 case 'string':
4295 var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') 4294 var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
4296 .replace(/'/g, "\\'") 4295 .replace(/'/g, "\\'")
4297 .replace(/\\"/g, '"') + '\''; 4296 .replace(/\\"/g, '"') + '\'';
4298 return ctx.stylize(simple, 'string'); 4297 return ctx.stylize(simple, 'string');
4299 4298
4300 case 'number': 4299 case 'number':
4300 if (value === 0 && (1/value) === -Infinity) {
4301 return ctx.stylize('-0', 'number');
4302 }
4301 return ctx.stylize('' + value, 'number'); 4303 return ctx.stylize('' + value, 'number');
4302 4304
4303 case 'boolean': 4305 case 'boolean':
4304 return ctx.stylize('' + value, 'boolean'); 4306 return ctx.stylize('' + value, 'boolean');
4305 } 4307 }
4306 // For some reason typeof null is "object", so special case here. 4308 // For some reason typeof null is "object", so special case here.
4307 if (value === null) { 4309 if (value === null) {
4308 return ctx.stylize('null', 'null'); 4310 return ctx.stylize('null', 'null');
4309 } 4311 }
4310 } 4312 }
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
4430 4432
4431 function isError(e) { 4433 function isError(e) {
4432 return typeof e === 'object' && objectToString(e) === '[object Error]'; 4434 return typeof e === 'object' && objectToString(e) === '[object Error]';
4433 } 4435 }
4434 4436
4435 function objectToString(o) { 4437 function objectToString(o) {
4436 return Object.prototype.toString.call(o); 4438 return Object.prototype.toString.call(o);
4437 } 4439 }
4438 4440
4439 }); 4441 });
4440 require.register("chai/lib/chai/utils/objDisplay.js", function(exports, require, module){ 4442
4443 require.register("chai/lib/chai/utils/objDisplay.js", function (exports, module) {
4441 /*! 4444 /*!
4442 * Chai - flag utility 4445 * Chai - flag utility
4443 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> 4446 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
4444 * MIT Licensed 4447 * MIT Licensed
4445 */ 4448 */
4446 4449
4447 /*! 4450 /*!
4448 * Module dependancies 4451 * Module dependancies
4449 */ 4452 */
4450 4453
4451 var inspect = require('./inspect'); 4454 var inspect = require('chai/lib/chai/utils/inspect.js');
4452 var config = require('../config'); 4455 var config = require('chai/lib/chai/config.js');
4453 4456
4454 /** 4457 /**
4455 * ### .objDisplay (object) 4458 * ### .objDisplay (object)
4456 * 4459 *
4457 * Determines if an object or an array matches 4460 * Determines if an object or an array matches
4458 * criteria to be inspected in-line for error 4461 * criteria to be inspected in-line for error
4459 * messages or should be truncated. 4462 * messages or should be truncated.
4460 * 4463 *
4461 * @param {Mixed} javascript object to inspect 4464 * @param {Mixed} javascript object to inspect
4462 * @name objDisplay 4465 * @name objDisplay
(...skipping 19 matching lines...) Expand all
4482 return '{ Object (' + kstr + ') }'; 4485 return '{ Object (' + kstr + ') }';
4483 } else { 4486 } else {
4484 return str; 4487 return str;
4485 } 4488 }
4486 } else { 4489 } else {
4487 return str; 4490 return str;
4488 } 4491 }
4489 }; 4492 };
4490 4493
4491 }); 4494 });
4492 require.register("chai/lib/chai/utils/overwriteMethod.js", function(exports, req uire, module){ 4495
4496 require.register("chai/lib/chai/utils/overwriteMethod.js", function (exports, mo dule) {
4493 /*! 4497 /*!
4494 * Chai - overwriteMethod utility 4498 * Chai - overwriteMethod utility
4495 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> 4499 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
4496 * MIT Licensed 4500 * MIT Licensed
4497 */ 4501 */
4498 4502
4499 /** 4503 /**
4500 * ### overwriteMethod (ctx, name, fn) 4504 * ### overwriteMethod (ctx, name, fn)
4501 * 4505 *
4502 * Overwites an already existing method and provides 4506 * Overwites an already existing method and provides
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
4536 if (_method && 'function' === typeof _method) 4540 if (_method && 'function' === typeof _method)
4537 _super = _method; 4541 _super = _method;
4538 4542
4539 ctx[name] = function () { 4543 ctx[name] = function () {
4540 var result = method(_super).apply(this, arguments); 4544 var result = method(_super).apply(this, arguments);
4541 return result === undefined ? this : result; 4545 return result === undefined ? this : result;
4542 } 4546 }
4543 }; 4547 };
4544 4548
4545 }); 4549 });
4546 require.register("chai/lib/chai/utils/overwriteProperty.js", function(exports, r equire, module){ 4550
4551 require.register("chai/lib/chai/utils/overwriteProperty.js", function (exports, module) {
4547 /*! 4552 /*!
4548 * Chai - overwriteProperty utility 4553 * Chai - overwriteProperty utility
4549 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> 4554 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
4550 * MIT Licensed 4555 * MIT Licensed
4551 */ 4556 */
4552 4557
4553 /** 4558 /**
4554 * ### overwriteProperty (ctx, name, fn) 4559 * ### overwriteProperty (ctx, name, fn)
4555 * 4560 *
4556 * Overwites an already existing property getter and provides 4561 * Overwites an already existing property getter and provides
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
4593 Object.defineProperty(ctx, name, 4598 Object.defineProperty(ctx, name,
4594 { get: function () { 4599 { get: function () {
4595 var result = getter(_super).call(this); 4600 var result = getter(_super).call(this);
4596 return result === undefined ? this : result; 4601 return result === undefined ? this : result;
4597 } 4602 }
4598 , configurable: true 4603 , configurable: true
4599 }); 4604 });
4600 }; 4605 };
4601 4606
4602 }); 4607 });
4603 require.register("chai/lib/chai/utils/overwriteChainableMethod.js", function(exp orts, require, module){ 4608
4609 require.register("chai/lib/chai/utils/overwriteChainableMethod.js", function (ex ports, module) {
4604 /*! 4610 /*!
4605 * Chai - overwriteChainableMethod utility 4611 * Chai - overwriteChainableMethod utility
4606 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> 4612 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
4607 * MIT Licensed 4613 * MIT Licensed
4608 */ 4614 */
4609 4615
4610 /** 4616 /**
4611 * ### overwriteChainableMethod (ctx, name, fn) 4617 * ### overwriteChainableMethod (ctx, name, fn)
4612 * 4618 *
4613 * Overwites an already existing chainable method 4619 * Overwites an already existing chainable method
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
4649 }; 4655 };
4650 4656
4651 var _method = chainableBehavior.method; 4657 var _method = chainableBehavior.method;
4652 chainableBehavior.method = function () { 4658 chainableBehavior.method = function () {
4653 var result = method(_method).apply(this, arguments); 4659 var result = method(_method).apply(this, arguments);
4654 return result === undefined ? this : result; 4660 return result === undefined ? this : result;
4655 }; 4661 };
4656 }; 4662 };
4657 4663
4658 }); 4664 });
4659 require.register("chai/lib/chai/utils/test.js", function(exports, require, modul e){ 4665
4666 require.register("chai/lib/chai/utils/test.js", function (exports, module) {
4660 /*! 4667 /*!
4661 * Chai - test utility 4668 * Chai - test utility
4662 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> 4669 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
4663 * MIT Licensed 4670 * MIT Licensed
4664 */ 4671 */
4665 4672
4666 /*! 4673 /*!
4667 * Module dependancies 4674 * Module dependancies
4668 */ 4675 */
4669 4676
4670 var flag = require('./flag'); 4677 var flag = require('chai/lib/chai/utils/flag.js');
4671 4678
4672 /** 4679 /**
4673 * # test(object, expression) 4680 * # test(object, expression)
4674 * 4681 *
4675 * Test and object for expression. 4682 * Test and object for expression.
4676 * 4683 *
4677 * @param {Object} object (constructed Assertion) 4684 * @param {Object} object (constructed Assertion)
4678 * @param {Arguments} chai.Assertion.prototype.assert arguments 4685 * @param {Arguments} chai.Assertion.prototype.assert arguments
4679 */ 4686 */
4680 4687
4681 module.exports = function (obj, args) { 4688 module.exports = function (obj, args) {
4682 var negate = flag(obj, 'negate') 4689 var negate = flag(obj, 'negate')
4683 , expr = args[0]; 4690 , expr = args[0];
4684 return negate ? !expr : expr; 4691 return negate ? !expr : expr;
4685 }; 4692 };
4686 4693
4687 }); 4694 });
4688 require.register("chai/lib/chai/utils/transferFlags.js", function(exports, requi re, module){ 4695
4696 require.register("chai/lib/chai/utils/transferFlags.js", function (exports, modu le) {
4689 /*! 4697 /*!
4690 * Chai - transferFlags utility 4698 * Chai - transferFlags utility
4691 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> 4699 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
4692 * MIT Licensed 4700 * MIT Licensed
4693 */ 4701 */
4694 4702
4695 /** 4703 /**
4696 * ### transferFlags(assertion, object, includeAll = true) 4704 * ### transferFlags(assertion, object, includeAll = true)
4697 * 4705 *
4698 * Transfer all the flags for `assertion` to `object`. If 4706 * Transfer all the flags for `assertion` to `object`. If
(...skipping 26 matching lines...) Expand all
4725 4733
4726 for (var flag in flags) { 4734 for (var flag in flags) {
4727 if (includeAll || 4735 if (includeAll ||
4728 (flag !== 'object' && flag !== 'ssfi' && flag != 'message')) { 4736 (flag !== 'object' && flag !== 'ssfi' && flag != 'message')) {
4729 object.__flags[flag] = flags[flag]; 4737 object.__flags[flag] = flags[flag];
4730 } 4738 }
4731 } 4739 }
4732 }; 4740 };
4733 4741
4734 }); 4742 });
4735 require.register("chai/lib/chai/utils/type.js", function(exports, require, modul e){ 4743
4744 require.register("chai/lib/chai/utils/type.js", function (exports, module) {
4736 /*! 4745 /*!
4737 * Chai - type utility 4746 * Chai - type utility
4738 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> 4747 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
4739 * MIT Licensed 4748 * MIT Licensed
4740 */ 4749 */
4741 4750
4742 /*! 4751 /*!
4743 * Detectable javascript natives 4752 * Detectable javascript natives
4744 */ 4753 */
4745 4754
(...skipping 28 matching lines...) Expand all
4774 var str = Object.prototype.toString.call(obj); 4783 var str = Object.prototype.toString.call(obj);
4775 if (natives[str]) return natives[str]; 4784 if (natives[str]) return natives[str];
4776 if (obj === null) return 'null'; 4785 if (obj === null) return 'null';
4777 if (obj === undefined) return 'undefined'; 4786 if (obj === undefined) return 'undefined';
4778 if (obj === Object(obj)) return 'object'; 4787 if (obj === Object(obj)) return 'object';
4779 return typeof obj; 4788 return typeof obj;
4780 }; 4789 };
4781 4790
4782 }); 4791 });
4783 4792
4784 4793 if (typeof exports == "object") {
4785
4786
4787 require.alias("chaijs-assertion-error/index.js", "chai/deps/assertion-error/inde x.js");
4788 require.alias("chaijs-assertion-error/index.js", "chai/deps/assertion-error/inde x.js");
4789 require.alias("chaijs-assertion-error/index.js", "assertion-error/index.js");
4790 require.alias("chaijs-assertion-error/index.js", "chaijs-assertion-error/index.j s");
4791 require.alias("chaijs-deep-eql/lib/eql.js", "chai/deps/deep-eql/lib/eql.js");
4792 require.alias("chaijs-deep-eql/lib/eql.js", "chai/deps/deep-eql/index.js");
4793 require.alias("chaijs-deep-eql/lib/eql.js", "deep-eql/index.js");
4794 require.alias("chaijs-type-detect/lib/type.js", "chaijs-deep-eql/deps/type-detec t/lib/type.js");
4795 require.alias("chaijs-type-detect/lib/type.js", "chaijs-deep-eql/deps/type-detec t/index.js");
4796 require.alias("chaijs-type-detect/lib/type.js", "chaijs-type-detect/index.js");
4797 require.alias("chaijs-deep-eql/lib/eql.js", "chaijs-deep-eql/index.js");
4798 require.alias("chai/index.js", "chai/index.js");if (typeof exports == "object") {
4799 module.exports = require("chai"); 4794 module.exports = require("chai");
4800 } else if (typeof define == "function" && define.amd) { 4795 } else if (typeof define == "function" && define.amd) {
4801 define([], function(){ return require("chai"); }); 4796 define("chai", [], function(){ return require("chai"); });
4802 } else { 4797 } else {
4803 this["chai"] = require("chai"); 4798 (this || window)["chai"] = require("chai");
4804 }})(); 4799 }
4800 })()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698