☕️ Classic, reliable, trusted test framework for Node.js and the browser
remove lodash.create; closes #1868
Christopher Hillerc7a8fedd08c1
diff --git a/lib/hook.js b/lib/hook.jsindex 429a60cb..0417e013 100644--- a/lib/hook.js+++ b/lib/hook.js@@ -3,7 +3,7 @@*/var Runnable = require('./runnable');-var create = require('lodash.create');+var inherits = require('./utils').inherits;/*** Expose `Hook`.@@ -26,10 +26,7 @@ function Hook(title, fn) {/*** Inherit from `Runnable.prototype`.*/--Hook.prototype = create(Runnable.prototype, {- constructor: Hook-});+inherits(Hook, Runnable);/*** Get or set the test `err`.diff --git a/lib/reporters/dot.js b/lib/reporters/dot.jsindex 2ecdb5e1..e905dc68 100644--- a/lib/reporters/dot.js+++ b/lib/reporters/dot.js@@ -3,7 +3,7 @@*/var Base = require('./base');-var create = require('lodash.create');+var inherits = require('../utils').inherits;var color = Base.color;/**@@ -63,7 +63,4 @@ function Dot(runner) {/*** Inherit from `Base.prototype`.*/--Dot.prototype = create(Base.prototype, {- constructor: Dot-});+inherits(Dot, Base);diff --git a/lib/reporters/landing.js b/lib/reporters/landing.jsindex a29c2472..b66b2000 100644--- a/lib/reporters/landing.js+++ b/lib/reporters/landing.js@@ -3,7 +3,7 @@*/var Base = require('./base');-var create = require('lodash.create');+var inherits = require('../utils').inherits;var cursor = Base.cursor;var color = Base.color;@@ -89,7 +89,4 @@ function Landing(runner) {/*** Inherit from `Base.prototype`.*/--Landing.prototype = create(Base.prototype, {- constructor: Landing-});+inherits(Landing, Base);diff --git a/lib/reporters/list.js b/lib/reporters/list.jsindex f9b39696..0e5f910d 100644--- a/lib/reporters/list.js+++ b/lib/reporters/list.js@@ -3,7 +3,7 @@*/var Base = require('./base');-var create = require('lodash.create');+var inherits = require('../utils').inherits;var color = Base.color;var cursor = Base.cursor;@@ -58,7 +58,4 @@ function List(runner) {/*** Inherit from `Base.prototype`.*/--List.prototype = create(Base.prototype, {- constructor: List-});+inherits(List, Base);diff --git a/lib/reporters/min.js b/lib/reporters/min.jsindex f9c3a148..2b48212c 100644--- a/lib/reporters/min.js+++ b/lib/reporters/min.js@@ -3,7 +3,7 @@*/var Base = require('./base');-var create = require('lodash.create');+var inherits = require('../utils').inherits;/*** Expose `Min`.@@ -33,7 +33,4 @@ function Min(runner) {/*** Inherit from `Base.prototype`.*/--Min.prototype = create(Base.prototype, {- constructor: Min-});+inherits(Min, Base);diff --git a/lib/reporters/nyan.js b/lib/reporters/nyan.jsindex 2baa9010..ba1b0509 100644--- a/lib/reporters/nyan.js+++ b/lib/reporters/nyan.js@@ -3,7 +3,7 @@*/var Base = require('./base');-var create = require('lodash.create');+var inherits = require('../utils').inherits;/*** Expose `Dot`.@@ -62,10 +62,7 @@ function NyanCat(runner) {/*** Inherit from `Base.prototype`.*/--NyanCat.prototype = create(Base.prototype, {- constructor: NyanCat-});+inherits(NyanCat, Base);/*** Draw the nyan catdiff --git a/lib/reporters/progress.js b/lib/reporters/progress.jsindex 2ea25bda..5349ca89 100644--- a/lib/reporters/progress.js+++ b/lib/reporters/progress.js@@ -3,7 +3,7 @@*/var Base = require('./base');-var create = require('lodash.create');+var inherits = require('../utils').inherits;var color = Base.color;var cursor = Base.cursor;@@ -86,7 +86,4 @@ function Progress(runner, options) {/*** Inherit from `Base.prototype`.*/--Progress.prototype = create(Base.prototype, {- constructor: Progress-});+inherits(Progress, Base);diff --git a/lib/reporters/spec.js b/lib/reporters/spec.jsindex 9fbd805a..77a73c4f 100644--- a/lib/reporters/spec.js+++ b/lib/reporters/spec.js@@ -3,7 +3,7 @@*/var Base = require('./base');-var create = require('lodash.create');+var inherits = require('../utils').inherits;var color = Base.color;var cursor = Base.cursor;@@ -80,7 +80,4 @@ function Spec(runner) {/*** Inherit from `Base.prototype`.*/--Spec.prototype = create(Base.prototype, {- constructor: Spec-});+inherits(Spec, Base);diff --git a/lib/reporters/xunit.js b/lib/reporters/xunit.jsindex 70bfc755..0694681c 100644--- a/lib/reporters/xunit.js+++ b/lib/reporters/xunit.js@@ -3,9 +3,10 @@*/var Base = require('./base');-var create = require('lodash.create');+var utils = require('../utils');+var inherits = utils.inherits;var fs = require('fs');-var escape = require('../utils').escape;+var escape = utils.escape;/*** Save timer references to avoid Sinon interfering (see GH-237).@@ -95,10 +96,7 @@ XUnit.prototype.done = function(failures, fn) {/*** Inherit from `Base.prototype`.*/--XUnit.prototype = create(Base.prototype, {- constructor: XUnit-});+inherits(XUnit, Base);/*** Write out the given line.diff --git a/lib/runnable.js b/lib/runnable.jsindex 01b84ccb..07501785 100644--- a/lib/runnable.js+++ b/lib/runnable.js@@ -4,10 +4,10 @@var EventEmitter = require('events').EventEmitter;var Pending = require('./pending');-var create = require('lodash.create');var debug = require('debug')('mocha:runnable');var milliseconds = require('./ms');var utils = require('./utils');+var inherits = utils.inherits;/*** Save timer references to avoid Sinon interfering (see GH-237).@@ -57,10 +57,7 @@ function Runnable(title, fn) {/*** Inherit from `EventEmitter.prototype`.*/--Runnable.prototype = create(EventEmitter.prototype, {- constructor: Runnable-});+inherits(Runnable, EventEmitter);/*** Set & get timeout `ms`.diff --git a/lib/runner.js b/lib/runner.jsindex 81caa7fa..67ecabe0 100644--- a/lib/runner.js+++ b/lib/runner.js@@ -4,15 +4,16 @@var EventEmitter = require('events').EventEmitter;var Pending = require('./pending');-var create = require('lodash.create');+var utils = require('./utils');+var inherits = utils.inherits;var debug = require('debug')('mocha:runner');-var filter = require('./utils').filter;-var indexOf = require('./utils').indexOf;-var keys = require('./utils').keys;-var stackFilter = require('./utils').stackTraceFilter();-var stringify = require('./utils').stringify;-var type = require('./utils').type;-var undefinedError = require('./utils').undefinedError;+var filter = utils.filter;+var indexOf = utils.indexOf;+var keys = utils.keys;+var stackFilter = utils.stackTraceFilter();+var stringify = utils.stringify;+var type = utils.type;+var undefinedError = utils.undefinedError;/*** Non-enumerable globals.@@ -87,10 +88,7 @@ Runner.immediately = global.setImmediate || process.nextTick;/*** Inherit from `EventEmitter.prototype`.*/--Runner.prototype = create(EventEmitter.prototype, {- constructor: Runner-});+inherits(Runner, EventEmitter);/*** Run tests with full titles matching `re`. Updates runner.totaldiff --git a/lib/suite.js b/lib/suite.jsindex eb89fb34..7834e284 100644--- a/lib/suite.js+++ b/lib/suite.js@@ -4,10 +4,10 @@var EventEmitter = require('events').EventEmitter;var Hook = require('./hook');-var create = require('lodash.create');+var utils = require('./utils');+var inherits = utils.inherits;var debug = require('debug')('mocha:suite');var milliseconds = require('./ms');-var utils = require('./utils');/*** Expose `Suite`.@@ -66,10 +66,7 @@ function Suite(title, parentContext) {/*** Inherit from `EventEmitter.prototype`.*/--Suite.prototype = create(EventEmitter.prototype, {- constructor: Suite-});+inherits(Suite, EventEmitter);/*** Return a clone of this `Suite`.diff --git a/lib/test.js b/lib/test.jsindex 057e7728..bb744e6f 100644--- a/lib/test.js+++ b/lib/test.js@@ -3,7 +3,7 @@*/var Runnable = require('./runnable');-var create = require('lodash.create');+var inherits = require('./utils').inherits;/*** Expose `Test`.@@ -27,7 +27,4 @@ function Test(title, fn) {/*** Inherit from `Runnable.prototype`.*/--Test.prototype = create(Runnable.prototype, {- constructor: Test-});+inherits(Test, Runnable);diff --git a/lib/utils.js b/lib/utils.jsindex e7b9eee9..aa7928b4 100644--- a/lib/utils.js+++ b/lib/utils.js@@ -19,6 +19,8 @@ var watchFile = require('fs').watchFile;var ignore = ['node_modules', '.git'];+exports.inherits = require('util').inherits;+/*** Escape special characters in the given string of html.*diff --git a/mocha.js b/mocha.jsindex 83e091b1..2fdbf16d 100644--- a/mocha.js+++ b/mocha.js@@ -437,7 +437,7 @@ Context.prototype.inspect = function() {*/var Runnable = require('./runnable');-var create = require('lodash.create');+var inherits = require('./utils').inherits;/*** Expose `Hook`.@@ -460,10 +460,7 @@ function Hook(title, fn) {/*** Inherit from `Runnable.prototype`.*/--Hook.prototype = create(Runnable.prototype, {- constructor: Hook-});+inherits(Hook, Runnable);/*** Get or set the test `err`.@@ -482,7 +479,7 @@ Hook.prototype.error = function(err) {this._error = err;};-},{"./runnable":35,"lodash.create":70}],8:[function(require,module,exports){+},{"./runnable":35,"./utils":39}],8:[function(require,module,exports){/*** Module dependencies.*/@@ -2136,7 +2133,7 @@ function Doc(runner) {*/var Base = require('./base');-var create = require('lodash.create');+var inherits = require('../utils').inherits;var color = Base.color;/**@@ -2196,13 +2193,10 @@ function Dot(runner) {/*** Inherit from `Base.prototype`.*/--Dot.prototype = create(Base.prototype, {- constructor: Dot-});+inherits(Dot, Base);}).call(this,require('_process'))-},{"./base":17,"_process":51,"lodash.create":70}],20:[function(require,module,exports){+},{"../utils":39,"./base":17,"_process":51}],20:[function(require,module,exports){(function (process,__dirname){/*** Module dependencies.@@ -2930,7 +2924,7 @@ function errorJSON(err) {*/var Base = require('./base');-var create = require('lodash.create');+var inherits = require('../utils').inherits;var cursor = Base.cursor;var color = Base.color;@@ -3016,20 +3010,17 @@ function Landing(runner) {/*** Inherit from `Base.prototype`.*/--Landing.prototype = create(Base.prototype, {- constructor: Landing-});+inherits(Landing, Base);}).call(this,require('_process'))-},{"./base":17,"_process":51,"lodash.create":70}],27:[function(require,module,exports){+},{"../utils":39,"./base":17,"_process":51}],27:[function(require,module,exports){(function (process){/*** Module dependencies.*/var Base = require('./base');-var create = require('lodash.create');+var inherits = require('../utils').inherits;var color = Base.color;var cursor = Base.cursor;@@ -3084,13 +3075,10 @@ function List(runner) {/*** Inherit from `Base.prototype`.*/--List.prototype = create(Base.prototype, {- constructor: List-});+inherits(List, Base);}).call(this,require('_process'))-},{"./base":17,"_process":51,"lodash.create":70}],28:[function(require,module,exports){+},{"../utils":39,"./base":17,"_process":51}],28:[function(require,module,exports){(function (process){/*** Module dependencies.@@ -3198,7 +3186,7 @@ function Markdown(runner) {*/var Base = require('./base');-var create = require('lodash.create');+var inherits = require('../utils').inherits;/*** Expose `Min`.@@ -3228,20 +3216,17 @@ function Min(runner) {/*** Inherit from `Base.prototype`.*/--Min.prototype = create(Base.prototype, {- constructor: Min-});+inherits(Min, Base);}).call(this,require('_process'))-},{"./base":17,"_process":51,"lodash.create":70}],30:[function(require,module,exports){+},{"../utils":39,"./base":17,"_process":51}],30:[function(require,module,exports){(function (process){/*** Module dependencies.*/var Base = require('./base');-var create = require('lodash.create');+var inherits = require('../utils').inherits;/*** Expose `Dot`.@@ -3300,10 +3285,7 @@ function NyanCat(runner) {/*** Inherit from `Base.prototype`.*/--NyanCat.prototype = create(Base.prototype, {- constructor: NyanCat-});+inherits(NyanCat, Base);/*** Draw the nyan cat@@ -3502,14 +3484,14 @@ function write(string) {}}).call(this,require('_process'))-},{"./base":17,"_process":51,"lodash.create":70}],31:[function(require,module,exports){+},{"../utils":39,"./base":17,"_process":51}],31:[function(require,module,exports){(function (process){/*** Module dependencies.*/var Base = require('./base');-var create = require('lodash.create');+var inherits = require('../utils').inherits;var color = Base.color;var cursor = Base.cursor;@@ -3592,19 +3574,16 @@ function Progress(runner, options) {/*** Inherit from `Base.prototype`.*/--Progress.prototype = create(Base.prototype, {- constructor: Progress-});+inherits(Progress, Base);}).call(this,require('_process'))-},{"./base":17,"_process":51,"lodash.create":70}],32:[function(require,module,exports){+},{"../utils":39,"./base":17,"_process":51}],32:[function(require,module,exports){/*** Module dependencies.*/var Base = require('./base');-var create = require('lodash.create');+var inherits = require('../utils').inherits;var color = Base.color;var cursor = Base.cursor;@@ -3681,12 +3660,9 @@ function Spec(runner) {/*** Inherit from `Base.prototype`.*/+inherits(Spec, Base);-Spec.prototype = create(Base.prototype, {- constructor: Spec-});--},{"./base":17,"lodash.create":70}],33:[function(require,module,exports){+},{"../utils":39,"./base":17}],33:[function(require,module,exports){/*** Module dependencies.*/@@ -3763,9 +3739,10 @@ function title(test) {*/var Base = require('./base');-var create = require('lodash.create');+var utils = require('../utils');+var inherits = utils.inherits;var fs = require('fs');-var escape = require('../utils').escape;+var escape = utils.escape;/*** Save timer references to avoid Sinon interfering (see GH-237).@@ -3855,10 +3832,7 @@ XUnit.prototype.done = function(failures, fn) {/*** Inherit from `Base.prototype`.*/--XUnit.prototype = create(Base.prototype, {- constructor: XUnit-});+inherits(XUnit, Base);/*** Write out the given line.@@ -3931,7 +3905,7 @@ function cdata(str) {}}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})-},{"../utils":39,"./base":17,"fs":41,"lodash.create":70}],35:[function(require,module,exports){+},{"../utils":39,"./base":17,"fs":41}],35:[function(require,module,exports){(function (global){/*** Module dependencies.@@ -3939,10 +3913,10 @@ function cdata(str) {var EventEmitter = require('events').EventEmitter;var Pending = require('./pending');-var create = require('lodash.create');var debug = require('debug')('mocha:runnable');var milliseconds = require('./ms');var utils = require('./utils');+var inherits = utils.inherits;/*** Save timer references to avoid Sinon interfering (see GH-237).@@ -3992,10 +3966,7 @@ function Runnable(title, fn) {/*** Inherit from `EventEmitter.prototype`.*/--Runnable.prototype = create(EventEmitter.prototype, {- constructor: Runnable-});+inherits(Runnable, EventEmitter);/*** Set & get timeout `ms`.@@ -4258,7 +4229,7 @@ Runnable.prototype.run = function(fn) {};}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})-},{"./ms":15,"./pending":16,"./utils":39,"debug":2,"events":3,"lodash.create":70}],36:[function(require,module,exports){+},{"./ms":15,"./pending":16,"./utils":39,"debug":2,"events":3}],36:[function(require,module,exports){(function (process,global){/*** Module dependencies.@@ -4266,15 +4237,16 @@ Runnable.prototype.run = function(fn) {var EventEmitter = require('events').EventEmitter;var Pending = require('./pending');-var create = require('lodash.create');+var utils = require('./utils');+var inherits = utils.inherits;var debug = require('debug')('mocha:runner');-var filter = require('./utils').filter;-var indexOf = require('./utils').indexOf;-var keys = require('./utils').keys;-var stackFilter = require('./utils').stackTraceFilter();-var stringify = require('./utils').stringify;-var type = require('./utils').type;-var undefinedError = require('./utils').undefinedError;+var filter = utils.filter;+var indexOf = utils.indexOf;+var keys = utils.keys;+var stackFilter = utils.stackTraceFilter();+var stringify = utils.stringify;+var type = utils.type;+var undefinedError = utils.undefinedError;/*** Non-enumerable globals.@@ -4349,10 +4321,7 @@ Runner.immediately = global.setImmediate || process.nextTick;/*** Inherit from `EventEmitter.prototype`.*/--Runner.prototype = create(EventEmitter.prototype, {- constructor: Runner-});+inherits(Runner, EventEmitter);/*** Run tests with full titles matching `re`. Updates runner.total@@ -4831,7 +4800,7 @@ Runner.prototype.runSuite = function(suite, fn) {debug('run suite %s', suite.fullTitle());- if (!total) {+ if (!total || (self.failures && suite._bail)) {return fn();}@@ -5085,17 +5054,17 @@ function extraGlobals() {}}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})-},{"./pending":16,"./utils":39,"_process":51,"debug":2,"events":3,"lodash.create":70}],37:[function(require,module,exports){+},{"./pending":16,"./utils":39,"_process":51,"debug":2,"events":3}],37:[function(require,module,exports){/*** Module dependencies.*/var EventEmitter = require('events').EventEmitter;var Hook = require('./hook');-var create = require('lodash.create');+var utils = require('./utils');+var inherits = utils.inherits;var debug = require('debug')('mocha:suite');var milliseconds = require('./ms');-var utils = require('./utils');/*** Expose `Suite`.@@ -5154,10 +5123,7 @@ function Suite(title, parentContext) {/*** Inherit from `EventEmitter.prototype`.*/--Suite.prototype = create(EventEmitter.prototype, {- constructor: Suite-});+inherits(Suite, EventEmitter);/*** Return a clone of this `Suite`.@@ -5455,13 +5421,13 @@ Suite.prototype.run = function run() {}};-},{"./hook":7,"./ms":15,"./utils":39,"debug":2,"events":3,"lodash.create":70}],38:[function(require,module,exports){+},{"./hook":7,"./ms":15,"./utils":39,"debug":2,"events":3}],38:[function(require,module,exports){/*** Module dependencies.*/var Runnable = require('./runnable');-var create = require('lodash.create');+var inherits = require('./utils').inherits;/*** Expose `Test`.@@ -5485,12 +5451,9 @@ function Test(title, fn) {/*** Inherit from `Runnable.prototype`.*/+inherits(Test, Runnable);-Test.prototype = create(Runnable.prototype, {- constructor: Test-});--},{"./runnable":35,"lodash.create":70}],39:[function(require,module,exports){+},{"./runnable":35,"./utils":39}],39:[function(require,module,exports){(function (process,Buffer){/* eslint-env browser */@@ -5513,6 +5476,8 @@ var watchFile = require('fs').watchFile;var ignore = ['node_modules', '.git'];+exports.inherits = require('util').inherits;+/*** Escape special characters in the given string of html.*@@ -6234,7 +6199,7 @@ exports.stackTraceFilter = function() {};}).call(this,require('_process'),require("buffer").Buffer)-},{"_process":51,"buffer":43,"debug":2,"fs":41,"glob":41,"path":41}],40:[function(require,module,exports){+},{"_process":51,"buffer":43,"debug":2,"fs":41,"glob":41,"path":41,"util":66}],40:[function(require,module,exports){(function (process){var WritableStream = require('stream').Writablevar inherits = require('util').inherits@@ -12163,986 +12128,6 @@ function growl(msg, options, fn) {}).call(this,require('_process'))},{"_process":51,"child_process":41,"fs":41,"os":50,"path":41}],70:[function(require,module,exports){-/**- * lodash 3.1.1 (Custom Build) <https://lodash.com/>- * Build: `lodash modern modularize exports="npm" -o ./`- * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors- * Available under MIT license <https://lodash.com/license>- */-var baseAssign = require('lodash._baseassign'),- baseCreate = require('lodash._basecreate'),- isIterateeCall = require('lodash._isiterateecall');--/**- * Creates an object that inherits from the given `prototype` object. If a- * `properties` object is provided its own enumerable properties are assigned- * to the created object.- *- * @static- * @memberOf _- * @category Object- * @param {Object} prototype The object to inherit from.- * @param {Object} [properties] The properties to assign to the object.- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.- * @returns {Object} Returns the new object.- * @example- *- * function Shape() {- * this.x = 0;- * this.y = 0;- * }- *- * function Circle() {- * Shape.call(this);- * }- *- * Circle.prototype = _.create(Shape.prototype, {- * 'constructor': Circle- * });- *- * var circle = new Circle;- * circle instanceof Circle;- * // => true- *- * circle instanceof Shape;- * // => true- */-function create(prototype, properties, guard) {- var result = baseCreate(prototype);- if (guard && isIterateeCall(prototype, properties, guard)) {- properties = undefined;- }- return properties ? baseAssign(result, properties) : result;-}--module.exports = create;--},{"lodash._baseassign":71,"lodash._basecreate":77,"lodash._isiterateecall":78}],71:[function(require,module,exports){-/**- * lodash 3.2.0 (Custom Build) <https://lodash.com/>- * Build: `lodash modern modularize exports="npm" -o ./`- * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors- * Available under MIT license <https://lodash.com/license>- */-var baseCopy = require('lodash._basecopy'),- keys = require('lodash.keys');--/**- * The base implementation of `_.assign` without support for argument juggling,- * multiple sources, and `customizer` functions.- *- * @private- * @param {Object} object The destination object.- * @param {Object} source The source object.- * @returns {Object} Returns `object`.- */-function baseAssign(object, source) {- return source == null- ? object- : baseCopy(source, keys(source), object);-}--module.exports = baseAssign;--},{"lodash._basecopy":72,"lodash.keys":73}],72:[function(require,module,exports){-/**- * lodash 3.0.1 (Custom Build) <https://lodash.com/>- * Build: `lodash modern modularize exports="npm" -o ./`- * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors- * Available under MIT license <https://lodash.com/license>- */--/**- * Copies properties of `source` to `object`.- *- * @private- * @param {Object} source The object to copy properties from.- * @param {Array} props The property names to copy.- * @param {Object} [object={}] The object to copy properties to.- * @returns {Object} Returns `object`.- */-function baseCopy(source, props, object) {- object || (object = {});-- var index = -1,- length = props.length;-- while (++index < length) {- var key = props[index];- object[key] = source[key];- }- return object;-}--module.exports = baseCopy;--},{}],73:[function(require,module,exports){-/**- * lodash 3.1.2 (Custom Build) <https://lodash.com/>- * Build: `lodash modern modularize exports="npm" -o ./`- * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors- * Available under MIT license <https://lodash.com/license>- */-var getNative = require('lodash._getnative'),- isArguments = require('lodash.isarguments'),- isArray = require('lodash.isarray');--/** Used to detect unsigned integer values. */-var reIsUint = /^\d+$/;--/** Used for native method references. */-var objectProto = Object.prototype;--/** Used to check objects for own properties. */-var hasOwnProperty = objectProto.hasOwnProperty;--/* Native method references for those with the same name as other `lodash` methods. */-var nativeKeys = getNative(Object, 'keys');--/**- * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)- * of an array-like value.- */-var MAX_SAFE_INTEGER = 9007199254740991;--/**- * The base implementation of `_.property` without support for deep paths.- *- * @private- * @param {string} key The key of the property to get.- * @returns {Function} Returns the new function.- */-function baseProperty(key) {- return function(object) {- return object == null ? undefined : object[key];- };-}--/**- * Gets the "length" property value of `object`.- *- * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)- * that affects Safari on at least iOS 8.1-8.3 ARM64.- *- * @private- * @param {Object} object The object to query.- * @returns {*} Returns the "length" value.- */-var getLength = baseProperty('length');--/**- * Checks if `value` is array-like.- *- * @private- * @param {*} value The value to check.- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.- */-function isArrayLike(value) {- return value != null && isLength(getLength(value));-}--/**- * Checks if `value` is a valid array-like index.- *- * @private- * @param {*} value The value to check.- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.- */-function isIndex(value, length) {- value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;- length = length == null ? MAX_SAFE_INTEGER : length;- return value > -1 && value % 1 == 0 && value < length;-}--/**- * Checks if `value` is a valid array-like length.- *- * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).- *- * @private- * @param {*} value The value to check.- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.- */-function isLength(value) {- return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;-}--/**- * A fallback implementation of `Object.keys` which creates an array of the- * own enumerable property names of `object`.- *- * @private- * @param {Object} object The object to query.- * @returns {Array} Returns the array of property names.- */-function shimKeys(object) {- var props = keysIn(object),- propsLength = props.length,- length = propsLength && object.length;-- var allowIndexes = !!length && isLength(length) &&- (isArray(object) || isArguments(object));-- var index = -1,- result = [];-- while (++index < propsLength) {- var key = props[index];- if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {- result.push(key);- }- }- return result;-}--/**- * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.- * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)- *- * @static- * @memberOf _- * @category Lang- * @param {*} value The value to check.- * @returns {boolean} Returns `true` if `value` is an object, else `false`.- * @example- *- * _.isObject({});- * // => true- *- * _.isObject([1, 2, 3]);- * // => true- *- * _.isObject(1);- * // => false- */-function isObject(value) {- // Avoid a V8 JIT bug in Chrome 19-20.- // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.- var type = typeof value;- return !!value && (type == 'object' || type == 'function');-}--/**- * Creates an array of the own enumerable property names of `object`.- *- * **Note:** Non-object values are coerced to objects. See the- * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)- * for more details.- *- * @static- * @memberOf _- * @category Object- * @param {Object} object The object to query.- * @returns {Array} Returns the array of property names.- * @example- *- * function Foo() {- * this.a = 1;- * this.b = 2;- * }- *- * Foo.prototype.c = 3;- *- * _.keys(new Foo);- * // => ['a', 'b'] (iteration order is not guaranteed)- *- * _.keys('hi');- * // => ['0', '1']- */-var keys = !nativeKeys ? shimKeys : function(object) {- var Ctor = object == null ? undefined : object.constructor;- if ((typeof Ctor == 'function' && Ctor.prototype === object) ||- (typeof object != 'function' && isArrayLike(object))) {- return shimKeys(object);- }- return isObject(object) ? nativeKeys(object) : [];-};--/**- * Creates an array of the own and inherited enumerable property names of `object`.- *- * **Note:** Non-object values are coerced to objects.- *- * @static- * @memberOf _- * @category Object- * @param {Object} object The object to query.- * @returns {Array} Returns the array of property names.- * @example- *- * function Foo() {- * this.a = 1;- * this.b = 2;- * }- *- * Foo.prototype.c = 3;- *- * _.keysIn(new Foo);- * // => ['a', 'b', 'c'] (iteration order is not guaranteed)- */-function keysIn(object) {- if (object == null) {- return [];- }- if (!isObject(object)) {- object = Object(object);- }- var length = object.length;- length = (length && isLength(length) &&- (isArray(object) || isArguments(object)) && length) || 0;-- var Ctor = object.constructor,- index = -1,- isProto = typeof Ctor == 'function' && Ctor.prototype === object,- result = Array(length),- skipIndexes = length > 0;-- while (++index < length) {- result[index] = (index + '');- }- for (var key in object) {- if (!(skipIndexes && isIndex(key, length)) &&- !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {- result.push(key);- }- }- return result;-}--module.exports = keys;--},{"lodash._getnative":74,"lodash.isarguments":75,"lodash.isarray":76}],74:[function(require,module,exports){-/**- * lodash 3.9.1 (Custom Build) <https://lodash.com/>- * Build: `lodash modern modularize exports="npm" -o ./`- * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors- * Available under MIT license <https://lodash.com/license>- */--/** `Object#toString` result references. */-var funcTag = '[object Function]';--/** Used to detect host constructors (Safari > 5). */-var reIsHostCtor = /^\[object .+?Constructor\]$/;--/**- * Checks if `value` is object-like.- *- * @private- * @param {*} value The value to check.- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.- */-function isObjectLike(value) {- return !!value && typeof value == 'object';-}--/** Used for native method references. */-var objectProto = Object.prototype;--/** Used to resolve the decompiled source of functions. */-var fnToString = Function.prototype.toString;--/** Used to check objects for own properties. */-var hasOwnProperty = objectProto.hasOwnProperty;--/**- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)- * of values.- */-var objToString = objectProto.toString;--/** Used to detect if a method is native. */-var reIsNative = RegExp('^' +- fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'-);--/**- * Gets the native function at `key` of `object`.- *- * @private- * @param {Object} object The object to query.- * @param {string} key The key of the method to get.- * @returns {*} Returns the function if it's native, else `undefined`.- */-function getNative(object, key) {- var value = object == null ? undefined : object[key];- return isNative(value) ? value : undefined;-}--/**- * Checks if `value` is classified as a `Function` object.- *- * @static- * @memberOf _- * @category Lang- * @param {*} value The value to check.- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.- * @example- *- * _.isFunction(_);- * // => true- *- * _.isFunction(/abc/);- * // => false- */-function isFunction(value) {- // The use of `Object#toString` avoids issues with the `typeof` operator- // in older versions of Chrome and Safari which return 'function' for regexes- // and Safari 8 equivalents which return 'object' for typed array constructors.- return isObject(value) && objToString.call(value) == funcTag;-}--/**- * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.- * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)- *- * @static- * @memberOf _- * @category Lang- * @param {*} value The value to check.- * @returns {boolean} Returns `true` if `value` is an object, else `false`.- * @example- *- * _.isObject({});- * // => true- *- * _.isObject([1, 2, 3]);- * // => true- *- * _.isObject(1);- * // => false- */-function isObject(value) {- // Avoid a V8 JIT bug in Chrome 19-20.- // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.- var type = typeof value;- return !!value && (type == 'object' || type == 'function');-}--/**- * Checks if `value` is a native function.- *- * @static- * @memberOf _- * @category Lang- * @param {*} value The value to check.- * @returns {boolean} Returns `true` if `value` is a native function, else `false`.- * @example- *- * _.isNative(Array.prototype.push);- * // => true- *- * _.isNative(_);- * // => false- */-function isNative(value) {- if (value == null) {- return false;- }- if (isFunction(value)) {- return reIsNative.test(fnToString.call(value));- }- return isObjectLike(value) && reIsHostCtor.test(value);-}--module.exports = getNative;--},{}],75:[function(require,module,exports){-/**- * lodash 3.0.4 (Custom Build) <https://lodash.com/>- * Build: `lodash modern modularize exports="npm" -o ./`- * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors- * Available under MIT license <https://lodash.com/license>- */--/**- * Checks if `value` is object-like.- *- * @private- * @param {*} value The value to check.- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.- */-function isObjectLike(value) {- return !!value && typeof value == 'object';-}--/** Used for native method references. */-var objectProto = Object.prototype;--/** Used to check objects for own properties. */-var hasOwnProperty = objectProto.hasOwnProperty;--/** Native method references. */-var propertyIsEnumerable = objectProto.propertyIsEnumerable;--/**- * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)- * of an array-like value.- */-var MAX_SAFE_INTEGER = 9007199254740991;--/**- * The base implementation of `_.property` without support for deep paths.- *- * @private- * @param {string} key The key of the property to get.- * @returns {Function} Returns the new function.- */-function baseProperty(key) {- return function(object) {- return object == null ? undefined : object[key];- };-}--/**- * Gets the "length" property value of `object`.- *- * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)- * that affects Safari on at least iOS 8.1-8.3 ARM64.- *- * @private- * @param {Object} object The object to query.- * @returns {*} Returns the "length" value.- */-var getLength = baseProperty('length');--/**- * Checks if `value` is array-like.- *- * @private- * @param {*} value The value to check.- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.- */-function isArrayLike(value) {- return value != null && isLength(getLength(value));-}--/**- * Checks if `value` is a valid array-like length.- *- * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).- *- * @private- * @param {*} value The value to check.- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.- */-function isLength(value) {- return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;-}--/**- * Checks if `value` is classified as an `arguments` object.- *- * @static- * @memberOf _- * @category Lang- * @param {*} value The value to check.- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.- * @example- *- * _.isArguments(function() { return arguments; }());- * // => true- *- * _.isArguments([1, 2, 3]);- * // => false- */-function isArguments(value) {- return isObjectLike(value) && isArrayLike(value) &&- hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');-}--module.exports = isArguments;--},{}],76:[function(require,module,exports){-/**- * lodash 3.0.4 (Custom Build) <https://lodash.com/>- * Build: `lodash modern modularize exports="npm" -o ./`- * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors- * Available under MIT license <https://lodash.com/license>- */--/** `Object#toString` result references. */-var arrayTag = '[object Array]',- funcTag = '[object Function]';--/** Used to detect host constructors (Safari > 5). */-var reIsHostCtor = /^\[object .+?Constructor\]$/;--/**- * Checks if `value` is object-like.- *- * @private- * @param {*} value The value to check.- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.- */-function isObjectLike(value) {- return !!value && typeof value == 'object';-}--/** Used for native method references. */-var objectProto = Object.prototype;--/** Used to resolve the decompiled source of functions. */-var fnToString = Function.prototype.toString;--/** Used to check objects for own properties. */-var hasOwnProperty = objectProto.hasOwnProperty;--/**- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)- * of values.- */-var objToString = objectProto.toString;--/** Used to detect if a method is native. */-var reIsNative = RegExp('^' +- fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'-);--/* Native method references for those with the same name as other `lodash` methods. */-var nativeIsArray = getNative(Array, 'isArray');--/**- * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)- * of an array-like value.- */-var MAX_SAFE_INTEGER = 9007199254740991;--/**- * Gets the native function at `key` of `object`.- *- * @private- * @param {Object} object The object to query.- * @param {string} key The key of the method to get.- * @returns {*} Returns the function if it's native, else `undefined`.- */-function getNative(object, key) {- var value = object == null ? undefined : object[key];- return isNative(value) ? value : undefined;-}--/**- * Checks if `value` is a valid array-like length.- *- * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).- *- * @private- * @param {*} value The value to check.- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.- */-function isLength(value) {- return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;-}--/**- * Checks if `value` is classified as an `Array` object.- *- * @static- * @memberOf _- * @category Lang- * @param {*} value The value to check.- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.- * @example- *- * _.isArray([1, 2, 3]);- * // => true- *- * _.isArray(function() { return arguments; }());- * // => false- */-var isArray = nativeIsArray || function(value) {- return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;-};--/**- * Checks if `value` is classified as a `Function` object.- *- * @static- * @memberOf _- * @category Lang- * @param {*} value The value to check.- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.- * @example- *- * _.isFunction(_);- * // => true- *- * _.isFunction(/abc/);- * // => false- */-function isFunction(value) {- // The use of `Object#toString` avoids issues with the `typeof` operator- // in older versions of Chrome and Safari which return 'function' for regexes- // and Safari 8 equivalents which return 'object' for typed array constructors.- return isObject(value) && objToString.call(value) == funcTag;-}--/**- * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.- * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)- *- * @static- * @memberOf _- * @category Lang- * @param {*} value The value to check.- * @returns {boolean} Returns `true` if `value` is an object, else `false`.- * @example- *- * _.isObject({});- * // => true- *- * _.isObject([1, 2, 3]);- * // => true- *- * _.isObject(1);- * // => false- */-function isObject(value) {- // Avoid a V8 JIT bug in Chrome 19-20.- // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.- var type = typeof value;- return !!value && (type == 'object' || type == 'function');-}--/**- * Checks if `value` is a native function.- *- * @static- * @memberOf _- * @category Lang- * @param {*} value The value to check.- * @returns {boolean} Returns `true` if `value` is a native function, else `false`.- * @example- *- * _.isNative(Array.prototype.push);- * // => true- *- * _.isNative(_);- * // => false- */-function isNative(value) {- if (value == null) {- return false;- }- if (isFunction(value)) {- return reIsNative.test(fnToString.call(value));- }- return isObjectLike(value) && reIsHostCtor.test(value);-}--module.exports = isArray;--},{}],77:[function(require,module,exports){-/**- * lodash 3.0.3 (Custom Build) <https://lodash.com/>- * Build: `lodash modern modularize exports="npm" -o ./`- * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors- * Available under MIT license <https://lodash.com/license>- */--/**- * The base implementation of `_.create` without support for assigning- * properties to the created object.- *- * @private- * @param {Object} prototype The object to inherit from.- * @returns {Object} Returns the new object.- */-var baseCreate = (function() {- function object() {}- return function(prototype) {- if (isObject(prototype)) {- object.prototype = prototype;- var result = new object;- object.prototype = undefined;- }- return result || {};- };-}());--/**- * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.- * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)- *- * @static- * @memberOf _- * @category Lang- * @param {*} value The value to check.- * @returns {boolean} Returns `true` if `value` is an object, else `false`.- * @example- *- * _.isObject({});- * // => true- *- * _.isObject([1, 2, 3]);- * // => true- *- * _.isObject(1);- * // => false- */-function isObject(value) {- // Avoid a V8 JIT bug in Chrome 19-20.- // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.- var type = typeof value;- return !!value && (type == 'object' || type == 'function');-}--module.exports = baseCreate;--},{}],78:[function(require,module,exports){-/**- * lodash 3.0.9 (Custom Build) <https://lodash.com/>- * Build: `lodash modern modularize exports="npm" -o ./`- * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors- * Available under MIT license <https://lodash.com/license>- */--/** Used to detect unsigned integer values. */-var reIsUint = /^\d+$/;--/**- * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)- * of an array-like value.- */-var MAX_SAFE_INTEGER = 9007199254740991;--/**- * The base implementation of `_.property` without support for deep paths.- *- * @private- * @param {string} key The key of the property to get.- * @returns {Function} Returns the new function.- */-function baseProperty(key) {- return function(object) {- return object == null ? undefined : object[key];- };-}--/**- * Gets the "length" property value of `object`.- *- * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)- * that affects Safari on at least iOS 8.1-8.3 ARM64.- *- * @private- * @param {Object} object The object to query.- * @returns {*} Returns the "length" value.- */-var getLength = baseProperty('length');--/**- * Checks if `value` is array-like.- *- * @private- * @param {*} value The value to check.- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.- */-function isArrayLike(value) {- return value != null && isLength(getLength(value));-}--/**- * Checks if `value` is a valid array-like index.- *- * @private- * @param {*} value The value to check.- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.- */-function isIndex(value, length) {- value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;- length = length == null ? MAX_SAFE_INTEGER : length;- return value > -1 && value % 1 == 0 && value < length;-}--/**- * Checks if the provided arguments are from an iteratee call.- *- * @private- * @param {*} value The potential iteratee value argument.- * @param {*} index The potential iteratee index or key argument.- * @param {*} object The potential iteratee object argument.- * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.- */-function isIterateeCall(value, index, object) {- if (!isObject(object)) {- return false;- }- var type = typeof index;- if (type == 'number'- ? (isArrayLike(object) && isIndex(index, object.length))- : (type == 'string' && index in object)) {- var other = object[index];- return value === value ? (value === other) : (other !== other);- }- return false;-}--/**- * Checks if `value` is a valid array-like length.- *- * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).- *- * @private- * @param {*} value The value to check.- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.- */-function isLength(value) {- return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;-}--/**- * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.- * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)- *- * @static- * @memberOf _- * @category Lang- * @param {*} value The value to check.- * @returns {boolean} Returns `true` if `value` is an object, else `false`.- * @example- *- * _.isObject({});- * // => true- *- * _.isObject([1, 2, 3]);- * // => true- *- * _.isObject(1);- * // => false- */-function isObject(value) {- // Avoid a V8 JIT bug in Chrome 19-20.- // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.- var type = typeof value;- return !!value && (type == 'object' || type == 'function');-}--module.exports = isIterateeCall;--},{}],79:[function(require,module,exports){(function (process,global){/*** Shim process.stdout.@@ -13307,4 +12292,4 @@ window.Mocha = Mocha;window.mocha = mocha;}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})-},{"../":1,"_process":51,"browser-stdout":40}]},{},[79]);+},{"../":1,"_process":51,"browser-stdout":40}]},{},[70]);diff --git a/package.json b/package.jsonindex 3d7c9c74..fe09fe2e 100644--- a/package.json+++ b/package.json@@ -281,7 +281,6 @@"glob": "3.2.3","growl": "1.8.1","jade": "1.11.0",- "lodash.create": "3.1.1","mkdirp": "0.5.0","supports-color": "1.2.0"},