diff --git a/README.md b/README.md
index 9eeb4fbfb..c158507b8 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# lodash v4.0.2
+# lodash v4.0.3
The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method.
diff --git a/lodash._baseisequal/README.md b/lodash._baseisequal/README.md
index 89d7ae4ae..740c6233f 100644
--- a/lodash._baseisequal/README.md
+++ b/lodash._baseisequal/README.md
@@ -1,4 +1,4 @@
-# lodash._baseisequal v4.0.2
+# lodash._baseisequal v4.0.3
The internal [lodash](https://lodash.com/) function `baseIsEqual` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var baseIsEqual = require('lodash._baseisequal');
```
-See the [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash._baseisequal) for more details.
+See the [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash._baseisequal) for more details.
diff --git a/lodash._baseisequal/index.js b/lodash._baseisequal/index.js
index b046b9c7e..5bda3af1b 100644
--- a/lodash._baseisequal/index.js
+++ b/lodash._baseisequal/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -65,6 +65,38 @@ typedArrayTags[numberTag] = typedArrayTags[objectTag] =
typedArrayTags[regexpTag] = typedArrayTags[setTag] =
typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
+/** Used to determine if values are of the language type `Object`. */
+var objectTypes = {
+ 'function': true,
+ 'object': true
+};
+
+/** Detect free variable `exports`. */
+var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;
+
+/** Detect free variable `module`. */
+var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;
+
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
+
+/** Detect free variable `self`. */
+var freeSelf = checkGlobal(objectTypes[typeof self] && self);
+
+/** Detect free variable `window`. */
+var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+
+/** Detect `this` as the global object. */
+var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
+
+/**
+ * Used as a reference to the global object.
+ *
+ * The `this` value is used if it's the global object to avoid Greasemonkey's
+ * restricted `window` object, otherwise the `window` object is used.
+ */
+var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
+
/**
* A specialized version of `_.some` for arrays without support for iteratee
* shorthands.
@@ -86,6 +118,17 @@ function arraySome(array, predicate) {
return false;
}
+/**
+ * Checks if `value` is a global object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {null|Object} Returns `value` if it's a global object, else `null`.
+ */
+function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
+}
+
/**
* Checks if `value` is a host object in IE < 9.
*
@@ -140,10 +183,10 @@ function setToArray(set) {
}
/** Used for built-in method references. */
-var objectProto = global.Object.prototype;
+var objectProto = Object.prototype;
/** Used to resolve the decompiled source of functions. */
-var funcToString = global.Function.prototype.toString;
+var funcToString = Function.prototype.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
@@ -161,13 +204,13 @@ var reIsNative = RegExp('^' +
);
/** Built-in value references. */
-var Symbol = global.Symbol,
- Uint8Array = global.Uint8Array,
+var Symbol = root.Symbol,
+ Uint8Array = root.Uint8Array,
getPrototypeOf = Object.getPrototypeOf;
/* Built-in method references that are verified to be native. */
-var Map = getNative(global, 'Map'),
- Set = getNative(global, 'Set');
+var Map = getNative(root, 'Map'),
+ Set = getNative(root, 'Set');
/** Used to detect maps and sets. */
var mapCtorString = Map ? funcToString.call(Map) : '',
diff --git a/lodash._baseisequal/package.json b/lodash._baseisequal/package.json
index 8cb62e50f..2d920fa99 100644
--- a/lodash._baseisequal/package.json
+++ b/lodash._baseisequal/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash._baseisequal",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The internal lodash function `baseIsEqual` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash._createset/README.md b/lodash._createset/README.md
index 4d2ffbf21..6486d7e85 100644
--- a/lodash._createset/README.md
+++ b/lodash._createset/README.md
@@ -1,4 +1,4 @@
-# lodash._createset v4.0.2
+# lodash._createset v4.0.3
The internal [lodash](https://lodash.com/) function `createSet` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var createSet = require('lodash._createset');
```
-See the [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash._createset) for more details.
+See the [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash._createset) for more details.
diff --git a/lodash._createset/index.js b/lodash._createset/index.js
index a4dcacb9b..9cadd2eee 100644
--- a/lodash._createset/index.js
+++ b/lodash._createset/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors
* Released under MIT license
@@ -7,6 +7,9 @@
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
/** `Object#toString` result references. */
var funcTag = '[object Function]',
genTag = '[object GeneratorFunction]';
@@ -88,6 +91,23 @@ function isHostObject(value) {
return result;
}
+/**
+ * Converts `set` to an array of its values.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the values.
+ */
+function setToArray(set) {
+ var index = -1,
+ result = Array(set.size);
+
+ set.forEach(function(value) {
+ result[++index] = value;
+ });
+ return result;
+}
+
/** Used for built-in method references. */
var objectProto = Object.prototype;
@@ -120,7 +140,7 @@ var Set = getNative(root, 'Set');
* @param {Array} values The values to add to the set.
* @returns {Object} Returns the new set.
*/
-var createSet = !(Set && new Set([1, 2]).size === 2) ? noop : function(values) {
+var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
return new Set(values);
};
diff --git a/lodash._createset/package.json b/lodash._createset/package.json
index c51c8714f..ca7e01780 100644
--- a/lodash._createset/package.json
+++ b/lodash._createset/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash._createset",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The internal lodash function `createSet` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash._createwrapper/LICENSE b/lodash._createwrapper/LICENSE
index bcbe13d67..e0c69d560 100644
--- a/lodash._createwrapper/LICENSE
+++ b/lodash._createwrapper/LICENSE
@@ -1,23 +1,47 @@
-The MIT License (MIT)
+Copyright jQuery Foundation and other contributors
-Copyright 2012-2016 The Dojo Foundation
-Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
+Based on Underscore.js, copyright Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
+The following license applies to all parts of this software except as
+documented below:
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/lodash._createwrapper/README.md b/lodash._createwrapper/README.md
index 4670f181b..1aaa72128 100644
--- a/lodash._createwrapper/README.md
+++ b/lodash._createwrapper/README.md
@@ -1,4 +1,4 @@
-# lodash._createwrapper v4.0.2
+# lodash._createwrapper v4.0.3
The internal [lodash](https://lodash.com/) function `createWrapper` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var createWrapper = require('lodash._createwrapper');
```
-See the [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash._createwrapper) for more details.
+See the [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash._createwrapper) for more details.
diff --git a/lodash._createwrapper/index.js b/lodash._createwrapper/index.js
index dba9d6e0f..a93864e6f 100644
--- a/lodash._createwrapper/index.js
+++ b/lodash._createwrapper/index.js
@@ -1,10 +1,10 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
- * Copyright 2012-2016 The Dojo Foundation
+ * Copyright jQuery Foundation and other contributors
+ * Released under MIT license
* Based on Underscore.js 1.8.3
- * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
/** Used as the `TypeError` message for "Functions" methods. */
@@ -32,7 +32,8 @@ var INFINITY = 1 / 0,
/** `Object#toString` result references. */
var funcTag = '[object Function]',
- genTag = '[object GeneratorFunction]';
+ genTag = '[object GeneratorFunction]',
+ symbolTag = '[object Symbol]';
/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g;
@@ -97,7 +98,7 @@ var root = freeGlobal ||
* @private
* @param {Function} func The function to invoke.
* @param {*} thisArg The `this` binding of `func`.
- * @param {...*} args The arguments to invoke `func` with.
+ * @param {Array} args The arguments to invoke `func` with.
* @returns {*} Returns the result of `func`.
*/
function apply(func, thisArg, args) {
@@ -185,7 +186,8 @@ function replaceHolders(array, placeholder) {
var objectProto = Object.prototype;
/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
@@ -306,7 +308,8 @@ function copyArray(source, array) {
*
* @private
* @param {Function} func The function to wrap.
- * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.
+ * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper`
+ * for more details.
* @param {*} [thisArg] The `this` binding of `func`.
* @returns {Function} Returns the new wrapped function.
*/
@@ -331,8 +334,8 @@ function createBaseWrapper(func, bitmask, thisArg) {
*/
function createCtorWrapper(Ctor) {
return function() {
- // Use a `switch` statement to work with class constructors.
- // See http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
+ // Use a `switch` statement to work with class constructors. See
+ // http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
// for more details.
var args = arguments;
switch (args.length) {
@@ -359,7 +362,8 @@ function createCtorWrapper(Ctor) {
*
* @private
* @param {Function} func The function to wrap.
- * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.
+ * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper`
+ * for more details.
* @param {number} arity The arity of `func`.
* @returns {Function} Returns the new wrapped function.
*/
@@ -397,11 +401,14 @@ function createCurryWrapper(func, bitmask, arity) {
*
* @private
* @param {Function|string} func The function or method name to wrap.
- * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.
+ * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper`
+ * for more details.
* @param {*} [thisArg] The `this` binding of `func`.
- * @param {Array} [partials] The arguments to prepend to those provided to the new function.
+ * @param {Array} [partials] The arguments to prepend to those provided to
+ * the new function.
* @param {Array} [holders] The `partials` placeholder indexes.
- * @param {Array} [partialsRight] The arguments to append to those provided to the new function.
+ * @param {Array} [partialsRight] The arguments to append to those provided
+ * to the new function.
* @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
* @param {Array} [argPos] The argument positions of the new function.
* @param {number} [ary] The arity cap of `func`.
@@ -463,15 +470,16 @@ function createHybridWrapper(func, bitmask, thisArg, partials, holders, partials
}
/**
- * Creates a function that wraps `func` to invoke it with the optional `this`
- * binding of `thisArg` and the `partials` prepended to those provided to
- * the wrapper.
+ * Creates a function that wraps `func` to invoke it with the `this` binding
+ * of `thisArg` and `partials` prepended to the arguments it receives.
*
* @private
* @param {Function} func The function to wrap.
- * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.
+ * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper`
+ * for more details.
* @param {*} thisArg The `this` binding of `func`.
- * @param {Array} partials The arguments to prepend to those provided to the new function.
+ * @param {Array} partials The arguments to prepend to those provided to
+ * the new function.
* @returns {Function} Returns the new wrapped function.
*/
function createPartialWrapper(func, bitmask, thisArg, partials) {
@@ -502,11 +510,13 @@ function createPartialWrapper(func, bitmask, thisArg, partials) {
*
* @private
* @param {Function} func The function to wrap.
- * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.
+ * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper`
+ * for more details.
* @param {Function} wrapFunc The function to create the `func` wrapper.
* @param {*} placeholder The placeholder value.
* @param {*} [thisArg] The `this` binding of `func`.
- * @param {Array} [partials] The arguments to prepend to those provided to the new function.
+ * @param {Array} [partials] The arguments to prepend to those provided to
+ * the new function.
* @param {Array} [holders] The `partials` placeholder indexes.
* @param {Array} [argPos] The argument positions of the new function.
* @param {number} [ary] The arity cap of `func`.
@@ -647,9 +657,11 @@ function reorder(array, indexes) {
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
* @example
*
* _.isFunction(_);
@@ -667,11 +679,13 @@ function isFunction(value) {
}
/**
- * 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('')`)
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
@@ -695,12 +709,65 @@ function isObject(value) {
}
/**
- * Converts `value` to an integer.
- *
- * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
*
* @static
* @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+}
+
+/**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This function is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted integer.
@@ -736,6 +803,7 @@ function toInteger(value) {
*
* @static
* @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to process.
* @returns {number} Returns the number.
@@ -754,6 +822,12 @@ function toInteger(value) {
* // => 3
*/
function toNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
if (isObject(value)) {
var other = isFunction(value.valueOf) ? value.valueOf() : value;
value = isObject(other) ? (other + '') : other;
diff --git a/lodash._createwrapper/package.json b/lodash._createwrapper/package.json
index 446ba5bee..c6264f759 100644
--- a/lodash._createwrapper/package.json
+++ b/lodash._createwrapper/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash._createwrapper",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The internal lodash function `createWrapper` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.after/README.md b/lodash.after/README.md
index 3e34ac6cd..5968c014d 100644
--- a/lodash.after/README.md
+++ b/lodash.after/README.md
@@ -1,4 +1,4 @@
-# lodash.after v4.0.2
+# lodash.after v4.0.3
The [lodash](https://lodash.com/) method `_.after` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var after = require('lodash.after');
```
-See the [documentation](https://lodash.com/docs#after) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.after) for more details.
+See the [documentation](https://lodash.com/docs#after) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.after) for more details.
diff --git a/lodash.after/index.js b/lodash.after/index.js
index fc6ba8dc3..c2fd5e787 100644
--- a/lodash.after/index.js
+++ b/lodash.after/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors
* Released under MIT license
@@ -89,8 +89,7 @@ function after(n, func) {
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
* @example
*
* _.isFunction(_);
@@ -173,8 +172,7 @@ function isObjectLike(value) {
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
* @example
*
* _.isSymbol(Symbol.iterator);
@@ -188,10 +186,45 @@ function isSymbol(value) {
(isObjectLike(value) && objectToString.call(value) == symbolTag);
}
+/**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+}
+
/**
* Converts `value` to an integer.
*
- * **Note:** This function is loosely based on
+ * **Note:** This method is loosely based on
* [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
*
* @static
@@ -202,7 +235,7 @@ function isSymbol(value) {
* @returns {number} Returns the converted integer.
* @example
*
- * _.toInteger(3);
+ * _.toInteger(3.2);
* // => 3
*
* _.toInteger(Number.MIN_VALUE);
@@ -211,20 +244,14 @@ function isSymbol(value) {
* _.toInteger(Infinity);
* // => 1.7976931348623157e+308
*
- * _.toInteger('3');
+ * _.toInteger('3.2');
* // => 3
*/
function toInteger(value) {
- if (!value) {
- return value === 0 ? value : 0;
- }
- value = toNumber(value);
- if (value === INFINITY || value === -INFINITY) {
- var sign = (value < 0 ? -1 : 1);
- return sign * MAX_INTEGER;
- }
- var remainder = value % 1;
- return value === value ? (remainder ? value - remainder : value) : 0;
+ var result = toFinite(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
}
/**
@@ -238,8 +265,8 @@ function toInteger(value) {
* @returns {number} Returns the number.
* @example
*
- * _.toNumber(3);
- * // => 3
+ * _.toNumber(3.2);
+ * // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
@@ -247,8 +274,8 @@ function toInteger(value) {
* _.toNumber(Infinity);
* // => Infinity
*
- * _.toNumber('3');
- * // => 3
+ * _.toNumber('3.2');
+ * // => 3.2
*/
function toNumber(value) {
if (typeof value == 'number') {
diff --git a/lodash.after/package.json b/lodash.after/package.json
index d6f5254e1..3645f90c2 100644
--- a/lodash.after/package.json
+++ b/lodash.after/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.after",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.after` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.assign/LICENSE b/lodash.assign/LICENSE
index b054ca5a3..bcbe13d67 100644
--- a/lodash.assign/LICENSE
+++ b/lodash.assign/LICENSE
@@ -1,22 +1,23 @@
+The MIT License (MIT)
+
Copyright 2012-2016 The Dojo Foundation
Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/lodash.assign/README.md b/lodash.assign/README.md
index aeb8657f8..7a7051c36 100644
--- a/lodash.assign/README.md
+++ b/lodash.assign/README.md
@@ -1,4 +1,4 @@
-# lodash.assign v4.0.2
+# lodash.assign v4.0.3
The [lodash](https://lodash.com/) method `_.assign` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var assign = require('lodash.assign');
```
-See the [documentation](https://lodash.com/docs#assign) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.assign) for more details.
+See the [documentation](https://lodash.com/docs#assign) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.assign) for more details.
diff --git a/lodash.assign/index.js b/lodash.assign/index.js
index 9b1588541..0320e0977 100644
--- a/lodash.assign/index.js
+++ b/lodash.assign/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -108,8 +108,11 @@ function copyObjectWith(source, props, object, customizer) {
length = props.length;
while (++index < length) {
- var key = props[index],
- newValue = customizer ? customizer(object[key], source[key], key, object, source) : source[key];
+ var key = props[index];
+
+ var newValue = customizer
+ ? customizer(object[key], source[key], key, object, source)
+ : source[key];
assignValue(object, key, newValue);
}
@@ -130,7 +133,10 @@ function createAssigner(assigner) {
customizer = length > 1 ? sources[length - 1] : undefined,
guard = length > 2 ? sources[2] : undefined;
- customizer = typeof customizer == 'function' ? (length--, customizer) : undefined;
+ customizer = typeof customizer == 'function'
+ ? (length--, customizer)
+ : undefined;
+
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
customizer = length < 3 ? undefined : customizer;
length = 1;
@@ -221,7 +227,6 @@ function eq(value, other) {
*
* @static
* @memberOf _
- * @type Function
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
@@ -293,7 +298,8 @@ function isFunction(value) {
* // => false
*/
function isLength(value) {
- return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
/**
diff --git a/lodash.assign/package.json b/lodash.assign/package.json
index 09073b716..633f31e75 100644
--- a/lodash.assign/package.json
+++ b/lodash.assign/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.assign",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.assign` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.assignin/LICENSE b/lodash.assignin/LICENSE
index b054ca5a3..bcbe13d67 100644
--- a/lodash.assignin/LICENSE
+++ b/lodash.assignin/LICENSE
@@ -1,22 +1,23 @@
+The MIT License (MIT)
+
Copyright 2012-2016 The Dojo Foundation
Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/lodash.assignin/README.md b/lodash.assignin/README.md
index dd083ad6b..93b1f17bb 100644
--- a/lodash.assignin/README.md
+++ b/lodash.assignin/README.md
@@ -1,4 +1,4 @@
-# lodash.assignin v4.0.2
+# lodash.assignin v4.0.3
The [lodash](https://lodash.com/) method `_.assignIn` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var assignIn = require('lodash.assignin');
```
-See the [documentation](https://lodash.com/docs#assignIn) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.assignin) for more details.
+See the [documentation](https://lodash.com/docs#assignIn) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.assignin) for more details.
diff --git a/lodash.assignin/index.js b/lodash.assignin/index.js
index 82f9e9a95..1b145250e 100644
--- a/lodash.assignin/index.js
+++ b/lodash.assignin/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -108,8 +108,11 @@ function copyObjectWith(source, props, object, customizer) {
length = props.length;
while (++index < length) {
- var key = props[index],
- newValue = customizer ? customizer(object[key], source[key], key, object, source) : source[key];
+ var key = props[index];
+
+ var newValue = customizer
+ ? customizer(object[key], source[key], key, object, source)
+ : source[key];
assignValue(object, key, newValue);
}
@@ -130,7 +133,10 @@ function createAssigner(assigner) {
customizer = length > 1 ? sources[length - 1] : undefined,
guard = length > 2 ? sources[2] : undefined;
- customizer = typeof customizer == 'function' ? (length--, customizer) : undefined;
+ customizer = typeof customizer == 'function'
+ ? (length--, customizer)
+ : undefined;
+
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
customizer = length < 3 ? undefined : customizer;
length = 1;
@@ -221,7 +227,6 @@ function eq(value, other) {
*
* @static
* @memberOf _
- * @type Function
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
@@ -293,7 +298,8 @@ function isFunction(value) {
* // => false
*/
function isLength(value) {
- return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
/**
diff --git a/lodash.assignin/package.json b/lodash.assignin/package.json
index a4c671dd5..752bab4ba 100644
--- a/lodash.assignin/package.json
+++ b/lodash.assignin/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.assignin",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.assignIn` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.assigninwith/LICENSE b/lodash.assigninwith/LICENSE
index b054ca5a3..bcbe13d67 100644
--- a/lodash.assigninwith/LICENSE
+++ b/lodash.assigninwith/LICENSE
@@ -1,22 +1,23 @@
+The MIT License (MIT)
+
Copyright 2012-2016 The Dojo Foundation
Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/lodash.assigninwith/README.md b/lodash.assigninwith/README.md
index cd2d595b9..19109d127 100644
--- a/lodash.assigninwith/README.md
+++ b/lodash.assigninwith/README.md
@@ -1,4 +1,4 @@
-# lodash.assigninwith v4.0.2
+# lodash.assigninwith v4.0.3
The [lodash](https://lodash.com/) method `_.assignInWith` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var assignInWith = require('lodash.assigninwith');
```
-See the [documentation](https://lodash.com/docs#assignInWith) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.assigninwith) for more details.
+See the [documentation](https://lodash.com/docs#assignInWith) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.assigninwith) for more details.
diff --git a/lodash.assigninwith/index.js b/lodash.assigninwith/index.js
index a6c436aa9..118a9c415 100644
--- a/lodash.assigninwith/index.js
+++ b/lodash.assigninwith/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -95,8 +95,11 @@ function copyObjectWith(source, props, object, customizer) {
length = props.length;
while (++index < length) {
- var key = props[index],
- newValue = customizer ? customizer(object[key], source[key], key, object, source) : source[key];
+ var key = props[index];
+
+ var newValue = customizer
+ ? customizer(object[key], source[key], key, object, source)
+ : source[key];
assignValue(object, key, newValue);
}
@@ -117,7 +120,10 @@ function createAssigner(assigner) {
customizer = length > 1 ? sources[length - 1] : undefined,
guard = length > 2 ? sources[2] : undefined;
- customizer = typeof customizer == 'function' ? (length--, customizer) : undefined;
+ customizer = typeof customizer == 'function'
+ ? (length--, customizer)
+ : undefined;
+
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
customizer = length < 3 ? undefined : customizer;
length = 1;
@@ -208,7 +214,6 @@ function eq(value, other) {
*
* @static
* @memberOf _
- * @type Function
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
@@ -280,7 +285,8 @@ function isFunction(value) {
* // => false
*/
function isLength(value) {
- return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
/**
diff --git a/lodash.assigninwith/package.json b/lodash.assigninwith/package.json
index 46020ae5e..a93dc8fbc 100644
--- a/lodash.assigninwith/package.json
+++ b/lodash.assigninwith/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.assigninwith",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.assignInWith` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.assignwith/LICENSE b/lodash.assignwith/LICENSE
index b054ca5a3..bcbe13d67 100644
--- a/lodash.assignwith/LICENSE
+++ b/lodash.assignwith/LICENSE
@@ -1,22 +1,23 @@
+The MIT License (MIT)
+
Copyright 2012-2016 The Dojo Foundation
Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/lodash.assignwith/README.md b/lodash.assignwith/README.md
index 106ddb6e5..6062fe7c7 100644
--- a/lodash.assignwith/README.md
+++ b/lodash.assignwith/README.md
@@ -1,4 +1,4 @@
-# lodash.assignwith v4.0.2
+# lodash.assignwith v4.0.3
The [lodash](https://lodash.com/) method `_.assignWith` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var assignWith = require('lodash.assignwith');
```
-See the [documentation](https://lodash.com/docs#assignWith) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.assignwith) for more details.
+See the [documentation](https://lodash.com/docs#assignWith) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.assignwith) for more details.
diff --git a/lodash.assignwith/index.js b/lodash.assignwith/index.js
index cfc032f5b..ce07bc7dd 100644
--- a/lodash.assignwith/index.js
+++ b/lodash.assignwith/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -95,8 +95,11 @@ function copyObjectWith(source, props, object, customizer) {
length = props.length;
while (++index < length) {
- var key = props[index],
- newValue = customizer ? customizer(object[key], source[key], key, object, source) : source[key];
+ var key = props[index];
+
+ var newValue = customizer
+ ? customizer(object[key], source[key], key, object, source)
+ : source[key];
assignValue(object, key, newValue);
}
@@ -117,7 +120,10 @@ function createAssigner(assigner) {
customizer = length > 1 ? sources[length - 1] : undefined,
guard = length > 2 ? sources[2] : undefined;
- customizer = typeof customizer == 'function' ? (length--, customizer) : undefined;
+ customizer = typeof customizer == 'function'
+ ? (length--, customizer)
+ : undefined;
+
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
customizer = length < 3 ? undefined : customizer;
length = 1;
@@ -208,7 +214,6 @@ function eq(value, other) {
*
* @static
* @memberOf _
- * @type Function
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
@@ -280,7 +285,8 @@ function isFunction(value) {
* // => false
*/
function isLength(value) {
- return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
/**
diff --git a/lodash.assignwith/package.json b/lodash.assignwith/package.json
index bfadd7cb8..e90198bbf 100644
--- a/lodash.assignwith/package.json
+++ b/lodash.assignwith/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.assignwith",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.assignWith` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.before/README.md b/lodash.before/README.md
index 488ad90e2..e50d8cd4f 100644
--- a/lodash.before/README.md
+++ b/lodash.before/README.md
@@ -1,4 +1,4 @@
-# lodash.before v4.0.2
+# lodash.before v4.0.3
The [lodash](https://lodash.com/) method `_.before` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var before = require('lodash.before');
```
-See the [documentation](https://lodash.com/docs#before) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.before) for more details.
+See the [documentation](https://lodash.com/docs#before) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.before) for more details.
diff --git a/lodash.before/index.js b/lodash.before/index.js
index 767793478..783d3c571 100644
--- a/lodash.before/index.js
+++ b/lodash.before/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors
* Released under MIT license
@@ -60,7 +60,7 @@ var objectToString = objectProto.toString;
* @example
*
* jQuery(element).on('click', _.before(5, addContactToList));
- * // => allows adding up to 4 contacts to the list
+ * // => Allows adding up to 4 contacts to the list.
*/
function before(n, func) {
var result;
@@ -87,8 +87,7 @@ function before(n, func) {
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
* @example
*
* _.isFunction(_);
@@ -171,8 +170,7 @@ function isObjectLike(value) {
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
* @example
*
* _.isSymbol(Symbol.iterator);
@@ -186,10 +184,45 @@ function isSymbol(value) {
(isObjectLike(value) && objectToString.call(value) == symbolTag);
}
+/**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+}
+
/**
* Converts `value` to an integer.
*
- * **Note:** This function is loosely based on
+ * **Note:** This method is loosely based on
* [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
*
* @static
@@ -200,7 +233,7 @@ function isSymbol(value) {
* @returns {number} Returns the converted integer.
* @example
*
- * _.toInteger(3);
+ * _.toInteger(3.2);
* // => 3
*
* _.toInteger(Number.MIN_VALUE);
@@ -209,20 +242,14 @@ function isSymbol(value) {
* _.toInteger(Infinity);
* // => 1.7976931348623157e+308
*
- * _.toInteger('3');
+ * _.toInteger('3.2');
* // => 3
*/
function toInteger(value) {
- if (!value) {
- return value === 0 ? value : 0;
- }
- value = toNumber(value);
- if (value === INFINITY || value === -INFINITY) {
- var sign = (value < 0 ? -1 : 1);
- return sign * MAX_INTEGER;
- }
- var remainder = value % 1;
- return value === value ? (remainder ? value - remainder : value) : 0;
+ var result = toFinite(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
}
/**
@@ -236,8 +263,8 @@ function toInteger(value) {
* @returns {number} Returns the number.
* @example
*
- * _.toNumber(3);
- * // => 3
+ * _.toNumber(3.2);
+ * // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
@@ -245,8 +272,8 @@ function toInteger(value) {
* _.toNumber(Infinity);
* // => Infinity
*
- * _.toNumber('3');
- * // => 3
+ * _.toNumber('3.2');
+ * // => 3.2
*/
function toNumber(value) {
if (typeof value == 'number') {
diff --git a/lodash.before/package.json b/lodash.before/package.json
index 0265318d7..badcc69a3 100644
--- a/lodash.before/package.json
+++ b/lodash.before/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.before",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.before` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.capitalize/README.md b/lodash.capitalize/README.md
index 7a94d219e..1fa5365af 100644
--- a/lodash.capitalize/README.md
+++ b/lodash.capitalize/README.md
@@ -1,4 +1,4 @@
-# lodash.capitalize v4.0.2
+# lodash.capitalize v4.0.3
The [lodash](https://lodash.com/) method `_.capitalize` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var capitalize = require('lodash.capitalize');
```
-See the [documentation](https://lodash.com/docs#capitalize) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.capitalize) for more details.
+See the [documentation](https://lodash.com/docs#capitalize) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.capitalize) for more details.
diff --git a/lodash.capitalize/index.js b/lodash.capitalize/index.js
index 546394c12..5c4abb1ce 100644
--- a/lodash.capitalize/index.js
+++ b/lodash.capitalize/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -14,8 +14,51 @@ var INFINITY = 1 / 0;
/** `Object#toString` result references. */
var symbolTag = '[object Symbol]';
+/** Used to determine if values are of the language type `Object`. */
+var objectTypes = {
+ 'function': true,
+ 'object': true
+};
+
+/** Detect free variable `exports`. */
+var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;
+
+/** Detect free variable `module`. */
+var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;
+
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
+
+/** Detect free variable `self`. */
+var freeSelf = checkGlobal(objectTypes[typeof self] && self);
+
+/** Detect free variable `window`. */
+var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+
+/** Detect `this` as the global object. */
+var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
+
+/**
+ * Used as a reference to the global object.
+ *
+ * The `this` value is used if it's the global object to avoid Greasemonkey's
+ * restricted `window` object, otherwise the `window` object is used.
+ */
+var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
+
+/**
+ * Checks if `value` is a global object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {null|Object} Returns `value` if it's a global object, else `null`.
+ */
+function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
+}
+
/** Used for built-in method references. */
-var objectProto = global.Object.prototype;
+var objectProto = Object.prototype;
/**
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
@@ -24,7 +67,7 @@ var objectProto = global.Object.prototype;
var objectToString = objectProto.toString;
/** Built-in value references. */
-var Symbol = global.Symbol;
+var Symbol = root.Symbol;
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
diff --git a/lodash.capitalize/package.json b/lodash.capitalize/package.json
index 6d245ae96..0ac35834a 100644
--- a/lodash.capitalize/package.json
+++ b/lodash.capitalize/package.json
@@ -1,11 +1,11 @@
{
"name": "lodash.capitalize",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.capitalize` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util, capitalize",
+ "keywords": "lodash-modularized, capitalize",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
diff --git a/lodash.ceil/README.md b/lodash.ceil/README.md
index 8339d6ee0..0635b8223 100644
--- a/lodash.ceil/README.md
+++ b/lodash.ceil/README.md
@@ -1,4 +1,4 @@
-# lodash.ceil v4.0.2
+# lodash.ceil v4.0.3
The [lodash](https://lodash.com/) method `_.ceil` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var ceil = require('lodash.ceil');
```
-See the [documentation](https://lodash.com/docs#ceil) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.ceil) for more details.
+See the [documentation](https://lodash.com/docs#ceil) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.ceil) for more details.
diff --git a/lodash.ceil/index.js b/lodash.ceil/index.js
index bf840fed7..930386a0e 100644
--- a/lodash.ceil/index.js
+++ b/lodash.ceil/index.js
@@ -6,7 +6,6 @@
* Based on Underscore.js 1.8.3
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
-var toString = require('lodash.tostring');
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0,
@@ -33,6 +32,15 @@ var reIsOctal = /^0o[0-7]+$/i;
/** Built-in method references without a dependency on `root`. */
var freeParseInt = parseInt;
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+
+/** Detect free variable `self`. */
+var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
+
+/** Used as a reference to the global object. */
+var root = freeGlobal || freeSelf || Function('return this')();
+
/** Used for built-in method references. */
var objectProto = Object.prototype;
@@ -43,6 +51,36 @@ var objectProto = Object.prototype;
*/
var objectToString = objectProto.toString;
+/** Built-in value references. */
+var Symbol = root.Symbol;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min;
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
+
+/**
+ * The base implementation of `_.toString` which doesn't convert nullish
+ * values to empty strings.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ */
+function baseToString(value) {
+ // Exit early for strings to avoid a performance hit in some environments.
+ if (typeof value == 'string') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return symbolToString ? symbolToString.call(value) : '';
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+}
+
/**
* Creates a function like `_.round`.
*
@@ -54,7 +92,7 @@ function createRound(methodName) {
var func = Math[methodName];
return function(number, precision) {
number = toNumber(number);
- precision = toInteger(precision);
+ precision = nativeMin(toInteger(precision), 292);
if (precision) {
// Shift with exponential notation to avoid floating-point issues.
// See [MDN](https://mdn.io/round#Examples) for more details.
@@ -76,8 +114,7 @@ function createRound(methodName) {
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
* @example
*
* _.isFunction(_);
@@ -160,8 +197,7 @@ function isObjectLike(value) {
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
* @example
*
* _.isSymbol(Symbol.iterator);
@@ -213,7 +249,7 @@ function toFinite(value) {
/**
* Converts `value` to an integer.
*
- * **Note:** This function is loosely based on
+ * **Note:** This method is loosely based on
* [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
*
* @static
@@ -287,6 +323,31 @@ function toNumber(value) {
: (reIsBadHex.test(value) ? NAN : +value);
}
+/**
+ * Converts `value` to a string. An empty string is returned for `null`
+ * and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+function toString(value) {
+ return value == null ? '' : baseToString(value);
+}
+
/**
* Computes `number` rounded up to `precision`.
*
diff --git a/lodash.ceil/package.json b/lodash.ceil/package.json
index 308cc5316..f1c0e9830 100644
--- a/lodash.ceil/package.json
+++ b/lodash.ceil/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.ceil",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.ceil` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -13,8 +13,5 @@
"Mathias Bynens (https://mathiasbynens.be/)"
],
"repository": "lodash/lodash",
- "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
- "dependencies": {
- "lodash.tostring": "^4.0.0"
- }
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
}
diff --git a/lodash.chunk/README.md b/lodash.chunk/README.md
index 6f507ab3e..94287c73b 100644
--- a/lodash.chunk/README.md
+++ b/lodash.chunk/README.md
@@ -1,4 +1,4 @@
-# lodash.chunk v4.0.2
+# lodash.chunk v4.0.3
The [lodash](https://lodash.com/) method `_.chunk` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var chunk = require('lodash.chunk');
```
-See the [documentation](https://lodash.com/docs#chunk) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.chunk) for more details.
+See the [documentation](https://lodash.com/docs#chunk) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.chunk) for more details.
diff --git a/lodash.chunk/index.js b/lodash.chunk/index.js
index 76703ed28..ddbe724d5 100644
--- a/lodash.chunk/index.js
+++ b/lodash.chunk/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
diff --git a/lodash.chunk/package.json b/lodash.chunk/package.json
index 54ff6e4fa..3afdd5c32 100644
--- a/lodash.chunk/package.json
+++ b/lodash.chunk/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.chunk",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.chunk` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -15,6 +15,6 @@
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
- "lodash._baseslice": "^4.0.0"
+ "lodash._baseslice": "~4.0.0"
}
}
diff --git a/lodash.clamp/README.md b/lodash.clamp/README.md
index ef52ed756..a4a27fffd 100644
--- a/lodash.clamp/README.md
+++ b/lodash.clamp/README.md
@@ -1,4 +1,4 @@
-# lodash.clamp v4.0.2
+# lodash.clamp v4.0.3
The [lodash](https://lodash.com/) method `_.clamp` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var clamp = require('lodash.clamp');
```
-See the [documentation](https://lodash.com/docs#clamp) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.clamp) for more details.
+See the [documentation](https://lodash.com/docs#clamp) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.clamp) for more details.
diff --git a/lodash.clamp/index.js b/lodash.clamp/index.js
index b8879d8ca..c54eec6be 100644
--- a/lodash.clamp/index.js
+++ b/lodash.clamp/index.js
@@ -11,9 +11,7 @@
var NAN = 0 / 0;
/** `Object#toString` result references. */
-var funcTag = '[object Function]',
- genTag = '[object GeneratorFunction]',
- symbolTag = '[object Symbol]';
+var symbolTag = '[object Symbol]';
/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g;
@@ -35,7 +33,7 @@ var objectProto = Object.prototype;
/**
* Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
@@ -61,34 +59,9 @@ function baseClamp(number, lower, upper) {
return number;
}
-/**
- * Checks if `value` is classified as a `Function` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
- * @example
- *
- * _.isFunction(_);
- * // => true
- *
- * _.isFunction(/abc/);
- * // => false
- */
-function isFunction(value) {
- // The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 8 which returns 'object' for typed array and weak map constructors,
- // and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
- var tag = isObject(value) ? objectToString.call(value) : '';
- return tag == funcTag || tag == genTag;
-}
-
/**
* Checks if `value` is the
- * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
@@ -197,7 +170,7 @@ function toNumber(value) {
return NAN;
}
if (isObject(value)) {
- var other = isFunction(value.valueOf) ? value.valueOf() : value;
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
value = isObject(other) ? (other + '') : other;
}
if (typeof value != 'string') {
diff --git a/lodash.clamp/package.json b/lodash.clamp/package.json
index f77d22e03..33cff1078 100644
--- a/lodash.clamp/package.json
+++ b/lodash.clamp/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.clamp",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.clamp` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.clone/README.md b/lodash.clone/README.md
index 80f8818f8..7a4078808 100644
--- a/lodash.clone/README.md
+++ b/lodash.clone/README.md
@@ -1,4 +1,4 @@
-# lodash.clone v4.0.2
+# lodash.clone v4.0.3
The [lodash](https://lodash.com/) method `_.clone` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var clone = require('lodash.clone');
```
-See the [documentation](https://lodash.com/docs#clone) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.clone) for more details.
+See the [documentation](https://lodash.com/docs#clone) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.clone) for more details.
diff --git a/lodash.clone/index.js b/lodash.clone/index.js
index 6d634162d..43a16446d 100644
--- a/lodash.clone/index.js
+++ b/lodash.clone/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -564,6 +564,9 @@ function initCloneArray(array) {
* @returns {Object} Returns the initialized clone.
*/
function initCloneObject(object) {
+ if (isPrototype(object)) {
+ return {};
+ }
var Ctor = object.constructor;
return baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);
}
@@ -613,6 +616,20 @@ function initCloneByTag(object, tag, isDeep) {
}
}
+/**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+ return value === proto;
+}
+
/**
* Creates a shallow clone of `value`.
*
@@ -748,8 +765,6 @@ function isFunction(value) {
* // => 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');
}
diff --git a/lodash.clone/package.json b/lodash.clone/package.json
index 51530816b..27a50ba05 100644
--- a/lodash.clone/package.json
+++ b/lodash.clone/package.json
@@ -1,11 +1,11 @@
{
"name": "lodash.clone",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.clone` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util, clone",
+ "keywords": "lodash-modularized, clone",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
diff --git a/lodash.clonedeep/README.md b/lodash.clonedeep/README.md
index 63dbb3fbb..93f076556 100644
--- a/lodash.clonedeep/README.md
+++ b/lodash.clonedeep/README.md
@@ -1,4 +1,4 @@
-# lodash.clonedeep v4.0.2
+# lodash.clonedeep v4.0.3
The [lodash](https://lodash.com/) method `_.cloneDeep` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var cloneDeep = require('lodash.clonedeep');
```
-See the [documentation](https://lodash.com/docs#cloneDeep) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.clonedeep) for more details.
+See the [documentation](https://lodash.com/docs#cloneDeep) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.clonedeep) for more details.
diff --git a/lodash.clonedeep/index.js b/lodash.clonedeep/index.js
index c50c62dcd..aac5ad170 100644
--- a/lodash.clonedeep/index.js
+++ b/lodash.clonedeep/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -564,6 +564,9 @@ function initCloneArray(array) {
* @returns {Object} Returns the initialized clone.
*/
function initCloneObject(object) {
+ if (isPrototype(object)) {
+ return {};
+ }
var Ctor = object.constructor;
return baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);
}
@@ -613,6 +616,20 @@ function initCloneByTag(object, tag, isDeep) {
}
}
+/**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+ return value === proto;
+}
+
/**
* This method is like `_.clone` except that it recursively clones `value`.
*
@@ -740,8 +757,6 @@ function isFunction(value) {
* // => 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');
}
diff --git a/lodash.clonedeep/package.json b/lodash.clonedeep/package.json
index 82688f78c..57c11e291 100644
--- a/lodash.clonedeep/package.json
+++ b/lodash.clonedeep/package.json
@@ -1,11 +1,11 @@
{
"name": "lodash.clonedeep",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.cloneDeep` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util, clonedeep",
+ "keywords": "lodash-modularized, clonedeep",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
diff --git a/lodash.clonedeepwith/README.md b/lodash.clonedeepwith/README.md
index 1ca65ab79..b4edf5ba7 100644
--- a/lodash.clonedeepwith/README.md
+++ b/lodash.clonedeepwith/README.md
@@ -1,4 +1,4 @@
-# lodash.clonedeepwith v4.0.2
+# lodash.clonedeepwith v4.0.3
The [lodash](https://lodash.com/) method `_.cloneDeepWith` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var cloneDeepWith = require('lodash.clonedeepwith');
```
-See the [documentation](https://lodash.com/docs#cloneDeepWith) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.clonedeepwith) for more details.
+See the [documentation](https://lodash.com/docs#cloneDeepWith) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.clonedeepwith) for more details.
diff --git a/lodash.clonedeepwith/index.js b/lodash.clonedeepwith/index.js
index c19db250b..308b77b8e 100644
--- a/lodash.clonedeepwith/index.js
+++ b/lodash.clonedeepwith/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -564,6 +564,9 @@ function initCloneArray(array) {
* @returns {Object} Returns the initialized clone.
*/
function initCloneObject(object) {
+ if (isPrototype(object)) {
+ return {};
+ }
var Ctor = object.constructor;
return baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);
}
@@ -613,6 +616,20 @@ function initCloneByTag(object, tag, isDeep) {
}
}
+/**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+ return value === proto;
+}
+
/**
* This method is like `_.cloneWith` except that it recursively clones `value`.
*
@@ -750,8 +767,6 @@ function isFunction(value) {
* // => 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');
}
diff --git a/lodash.clonedeepwith/package.json b/lodash.clonedeepwith/package.json
index 1835069bd..9a520fd2c 100644
--- a/lodash.clonedeepwith/package.json
+++ b/lodash.clonedeepwith/package.json
@@ -1,11 +1,11 @@
{
"name": "lodash.clonedeepwith",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.cloneDeepWith` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util, clonedeepwith",
+ "keywords": "lodash-modularized, clonedeepwith",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
diff --git a/lodash.clonewith/README.md b/lodash.clonewith/README.md
index e0d0dd404..671d5fb52 100644
--- a/lodash.clonewith/README.md
+++ b/lodash.clonewith/README.md
@@ -1,4 +1,4 @@
-# lodash.clonewith v4.0.2
+# lodash.clonewith v4.0.3
The [lodash](https://lodash.com/) method `_.cloneWith` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var cloneWith = require('lodash.clonewith');
```
-See the [documentation](https://lodash.com/docs#cloneWith) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.clonewith) for more details.
+See the [documentation](https://lodash.com/docs#cloneWith) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.clonewith) for more details.
diff --git a/lodash.clonewith/index.js b/lodash.clonewith/index.js
index a01d0c76d..3f7c4962d 100644
--- a/lodash.clonewith/index.js
+++ b/lodash.clonewith/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -564,6 +564,9 @@ function initCloneArray(array) {
* @returns {Object} Returns the initialized clone.
*/
function initCloneObject(object) {
+ if (isPrototype(object)) {
+ return {};
+ }
var Ctor = object.constructor;
return baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);
}
@@ -613,6 +616,20 @@ function initCloneByTag(object, tag, isDeep) {
}
}
+/**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+ return value === proto;
+}
+
/**
* This method is like `_.clone` except that it accepts `customizer` which
* is invoked to produce the cloned value. If `customizer` returns `undefined`
@@ -753,8 +770,6 @@ function isFunction(value) {
* // => 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');
}
diff --git a/lodash.clonewith/package.json b/lodash.clonewith/package.json
index d76e0d31f..a9ef4264c 100644
--- a/lodash.clonewith/package.json
+++ b/lodash.clonewith/package.json
@@ -1,11 +1,11 @@
{
"name": "lodash.clonewith",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.cloneWith` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util, clonewith",
+ "keywords": "lodash-modularized, clonewith",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
diff --git a/lodash.conforms/README.md b/lodash.conforms/README.md
index 128b46198..4dcd82e3f 100644
--- a/lodash.conforms/README.md
+++ b/lodash.conforms/README.md
@@ -1,4 +1,4 @@
-# lodash.conforms v4.0.2
+# lodash.conforms v4.0.3
The [lodash](https://lodash.com/) method `_.conforms` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var conforms = require('lodash.conforms');
```
-See the [documentation](https://lodash.com/docs#conforms) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.conforms) for more details.
+See the [documentation](https://lodash.com/docs#conforms) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.conforms) for more details.
diff --git a/lodash.conforms/index.js b/lodash.conforms/index.js
index efffd5e3d..d78a22274 100644
--- a/lodash.conforms/index.js
+++ b/lodash.conforms/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -593,6 +593,9 @@ function initCloneArray(array) {
* @returns {Object} Returns the initialized clone.
*/
function initCloneObject(object) {
+ if (isPrototype(object)) {
+ return {};
+ }
var Ctor = object.constructor;
return baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);
}
@@ -642,6 +645,20 @@ function initCloneByTag(object, tag, isDeep) {
}
}
+/**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+ return value === proto;
+}
+
/**
* Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* comparison between two values to determine if they are equivalent.
@@ -749,8 +766,6 @@ function isFunction(value) {
* // => 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');
}
diff --git a/lodash.conforms/package.json b/lodash.conforms/package.json
index 865e74028..19116830e 100644
--- a/lodash.conforms/package.json
+++ b/lodash.conforms/package.json
@@ -1,11 +1,11 @@
{
"name": "lodash.conforms",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.conforms` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util, conforms",
+ "keywords": "lodash-modularized, conforms",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
diff --git a/lodash.countby/README.md b/lodash.countby/README.md
index ad27b0fbe..e6fd61da2 100644
--- a/lodash.countby/README.md
+++ b/lodash.countby/README.md
@@ -1,4 +1,4 @@
-# lodash.countby v4.0.2
+# lodash.countby v4.0.3
The [lodash](https://lodash.com/) method `_.countBy` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var countBy = require('lodash.countby');
```
-See the [documentation](https://lodash.com/docs#countBy) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.countby) for more details.
+See the [documentation](https://lodash.com/docs#countBy) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.countby) for more details.
diff --git a/lodash.countby/index.js b/lodash.countby/index.js
index 471aeb466..8f09c5d58 100644
--- a/lodash.countby/index.js
+++ b/lodash.countby/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -31,6 +31,38 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
/** Used to match backslashes in property paths. */
var reEscapeChar = /\\(\\)?/g;
+/** Used to determine if values are of the language type `Object`. */
+var objectTypes = {
+ 'function': true,
+ 'object': true
+};
+
+/** Detect free variable `exports`. */
+var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;
+
+/** Detect free variable `module`. */
+var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;
+
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
+
+/** Detect free variable `self`. */
+var freeSelf = checkGlobal(objectTypes[typeof self] && self);
+
+/** Detect free variable `window`. */
+var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+
+/** Detect `this` as the global object. */
+var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
+
+/**
+ * Used as a reference to the global object.
+ *
+ * The `this` value is used if it's the global object to avoid Greasemonkey's
+ * restricted `window` object, otherwise the `window` object is used.
+ */
+var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
+
/**
* A specialized version of `baseAggregator` for arrays.
*
@@ -52,8 +84,19 @@ function arrayAggregator(array, setter, iteratee, accumulator) {
return accumulator;
}
+/**
+ * Checks if `value` is a global object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {null|Object} Returns `value` if it's a global object, else `null`.
+ */
+function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
+}
+
/** Used for built-in method references. */
-var objectProto = global.Object.prototype;
+var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
@@ -65,7 +108,7 @@ var hasOwnProperty = objectProto.hasOwnProperty;
var objectToString = objectProto.toString;
/** Built-in value references. */
-var Symbol = global.Symbol;
+var Symbol = root.Symbol;
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
diff --git a/lodash.countby/package.json b/lodash.countby/package.json
index 5d422c98a..4d3763c71 100644
--- a/lodash.countby/package.json
+++ b/lodash.countby/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.countby",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.countBy` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.create/README.md b/lodash.create/README.md
index 7c7f372fd..364366603 100644
--- a/lodash.create/README.md
+++ b/lodash.create/README.md
@@ -1,4 +1,4 @@
-# lodash.create v4.0.2
+# lodash.create v4.0.3
The [lodash](https://lodash.com/) method `_.create` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var create = require('lodash.create');
```
-See the [documentation](https://lodash.com/docs#create) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.create) for more details.
+See the [documentation](https://lodash.com/docs#create) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.create) for more details.
diff --git a/lodash.create/index.js b/lodash.create/index.js
index 17513125a..d3d7b3106 100644
--- a/lodash.create/index.js
+++ b/lodash.create/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -29,8 +29,7 @@ var objectCreate = Object.create;
*/
function assignValue(object, key, value) {
var objValue = object[key];
- if ((!eq(objValue, value) ||
- (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) ||
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
(value === undefined && !(key in object))) {
object[key] = value;
}
@@ -66,7 +65,7 @@ function baseCreate(proto) {
*
* @private
* @param {Object} source The object to copy properties from.
- * @param {Array} props The property names to copy.
+ * @param {Array} props The property identifiers to copy.
* @param {Object} [object={}] The object to copy properties to.
* @returns {Object} Returns `object`.
*/
@@ -80,7 +79,7 @@ function copyObject(source, props, object) {
*
* @private
* @param {Object} source The object to copy properties from.
- * @param {Array} props The property names to copy.
+ * @param {Array} props The property identifiers to copy.
* @param {Object} [object={}] The object to copy properties to.
* @param {Function} [customizer] The function to customize copied values.
* @returns {Object} Returns `object`.
@@ -104,11 +103,13 @@ function copyObjectWith(source, props, object, customizer) {
}
/**
- * Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* comparison between two values to determine if they are equivalent.
*
* @static
* @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
@@ -138,11 +139,13 @@ function eq(value, other) {
}
/**
- * 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('')`)
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
@@ -166,11 +169,13 @@ function isObject(value) {
}
/**
- * Creates an object that inherits from the `prototype` object. If a `properties`
- * object is given its own enumerable properties are assigned to the created object.
+ * Creates an object that inherits from the `prototype` object. If a
+ * `properties` object is given, its own enumerable string keyed properties
+ * are assigned to the created object.
*
* @static
* @memberOf _
+ * @since 2.3.0
* @category Object
* @param {Object} prototype The object to inherit from.
* @param {Object} [properties] The properties to assign to the object.
diff --git a/lodash.create/package.json b/lodash.create/package.json
index 5ff406fe1..398e608a1 100644
--- a/lodash.create/package.json
+++ b/lodash.create/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.create",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.create` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.debounce/README.md b/lodash.debounce/README.md
index 8871340b4..1fb4fc7db 100644
--- a/lodash.debounce/README.md
+++ b/lodash.debounce/README.md
@@ -1,4 +1,4 @@
-# lodash.debounce v4.0.2
+# lodash.debounce v4.0.3
The [lodash](https://lodash.com/) method `_.debounce` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var debounce = require('lodash.debounce');
```
-See the [documentation](https://lodash.com/docs#debounce) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.debounce) for more details.
+See the [documentation](https://lodash.com/docs#debounce) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.debounce) for more details.
diff --git a/lodash.debounce/index.js b/lodash.debounce/index.js
index dac419f4b..519c627d7 100644
--- a/lodash.debounce/index.js
+++ b/lodash.debounce/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -50,7 +50,7 @@ var nativeMax = Math.max;
*
* @static
* @memberOf _
- * @type Function
+ * @type {Function}
* @category Date
* @returns {number} Returns the timestamp.
* @example
@@ -192,8 +192,10 @@ function debounce(func, wait, options) {
if (!lastCalled && !maxTimeoutId && !leading) {
lastCalled = stamp;
}
- var remaining = maxWait - (stamp - lastCalled),
- isCalled = remaining <= 0 || remaining > maxWait;
+ var remaining = maxWait - (stamp - lastCalled);
+
+ var isCalled = (remaining <= 0 || remaining > maxWait) &&
+ (leading || maxTimeoutId);
if (isCalled) {
if (maxTimeoutId) {
@@ -244,8 +246,8 @@ function debounce(func, wait, options) {
*/
function isFunction(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 8 which returns 'object' for typed array constructors, and
- // PhantomJS 1.9 which returns 'function' for `NodeList` instances.
+ // in Safari 8 which returns 'object' for typed array and weak map constructors,
+ // and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
var tag = isObject(value) ? objectToString.call(value) : '';
return tag == funcTag || tag == genTag;
}
diff --git a/lodash.debounce/package.json b/lodash.debounce/package.json
index dbb8d375e..4294be7eb 100644
--- a/lodash.debounce/package.json
+++ b/lodash.debounce/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.debounce",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.debounce` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.defaultsdeep/README.md b/lodash.defaultsdeep/README.md
index b3972ba0f..c9a2abfb6 100644
--- a/lodash.defaultsdeep/README.md
+++ b/lodash.defaultsdeep/README.md
@@ -1,4 +1,4 @@
-# lodash.defaultsdeep v4.0.2
+# lodash.defaultsdeep v4.0.3
The [lodash](https://lodash.com/) method `_.defaultsDeep` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var defaultsDeep = require('lodash.defaultsdeep');
```
-See the [documentation](https://lodash.com/docs#defaultsDeep) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.defaultsdeep) for more details.
+See the [documentation](https://lodash.com/docs#defaultsDeep) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.defaultsdeep) for more details.
diff --git a/lodash.defaultsdeep/index.js b/lodash.defaultsdeep/index.js
index 2721dd130..317233279 100644
--- a/lodash.defaultsdeep/index.js
+++ b/lodash.defaultsdeep/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -442,7 +442,7 @@ function baseMerge(object, source, srcIndex, customizer, stack) {
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
var objValue = object[key],
srcValue = source[key],
- stacked = stack.get(srcValue) || stack.get(objValue);
+ stacked = stack.get(srcValue);
if (stacked) {
assignMergeValue(object, key, stacked);
@@ -461,6 +461,7 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta
newValue = copyArray(objValue);
}
else {
+ isCommon = false;
newValue = baseClone(srcValue);
}
}
@@ -469,6 +470,7 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta
newValue = toPlainObject(objValue);
}
else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
+ isCommon = false;
newValue = baseClone(srcValue);
}
else {
@@ -745,6 +747,9 @@ function initCloneArray(array) {
* @returns {Object} Returns the initialized clone.
*/
function initCloneObject(object) {
+ if (isPrototype(object)) {
+ return {};
+ }
var Ctor = object.constructor;
return baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);
}
@@ -794,6 +799,20 @@ function initCloneByTag(object, tag, isDeep) {
}
}
+/**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+ return value === proto;
+}
+
/**
* Used by `_.defaultsDeep` to customize its `_.merge` use.
*
@@ -1029,8 +1048,6 @@ function isLength(value) {
* // => 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');
}
diff --git a/lodash.defaultsdeep/package.json b/lodash.defaultsdeep/package.json
index 66c4e4a9a..d177bf439 100644
--- a/lodash.defaultsdeep/package.json
+++ b/lodash.defaultsdeep/package.json
@@ -1,11 +1,11 @@
{
"name": "lodash.defaultsdeep",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.defaultsDeep` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util, defaultsdeep",
+ "keywords": "lodash-modularized, defaultsdeep",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
diff --git a/lodash.differenceby/README.md b/lodash.differenceby/README.md
index 2c4e58dcd..708a1e8a1 100644
--- a/lodash.differenceby/README.md
+++ b/lodash.differenceby/README.md
@@ -1,4 +1,4 @@
-# lodash.differenceby v4.0.2
+# lodash.differenceby v4.0.3
The [lodash](https://lodash.com/) method `_.differenceBy` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var differenceBy = require('lodash.differenceby');
```
-See the [documentation](https://lodash.com/docs#differenceBy) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.differenceby) for more details.
+See the [documentation](https://lodash.com/docs#differenceBy) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.differenceby) for more details.
diff --git a/lodash.differenceby/index.js b/lodash.differenceby/index.js
index 6a25b7484..d74a7eb04 100644
--- a/lodash.differenceby/index.js
+++ b/lodash.differenceby/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -43,6 +43,38 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
/** Used to match backslashes in property paths. */
var reEscapeChar = /\\(\\)?/g;
+/** Used to determine if values are of the language type `Object`. */
+var objectTypes = {
+ 'function': true,
+ 'object': true
+};
+
+/** Detect free variable `exports`. */
+var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;
+
+/** Detect free variable `module`. */
+var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;
+
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
+
+/** Detect free variable `self`. */
+var freeSelf = checkGlobal(objectTypes[typeof self] && self);
+
+/** Detect free variable `window`. */
+var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+
+/** Detect `this` as the global object. */
+var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
+
+/**
+ * Used as a reference to the global object.
+ *
+ * The `this` value is used if it's the global object to avoid Greasemonkey's
+ * restricted `window` object, otherwise the `window` object is used.
+ */
+var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
+
/**
* The base implementation of `_.unary` without support for storing wrapper metadata.
*
@@ -56,8 +88,19 @@ function baseUnary(func) {
};
}
+/**
+ * Checks if `value` is a global object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {null|Object} Returns `value` if it's a global object, else `null`.
+ */
+function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
+}
+
/** Used for built-in method references. */
-var objectProto = global.Object.prototype;
+var objectProto = Object.prototype;
/**
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
@@ -66,7 +109,7 @@ var objectProto = global.Object.prototype;
var objectToString = objectProto.toString;
/** Built-in value references. */
-var Symbol = global.Symbol;
+var Symbol = root.Symbol;
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
@@ -341,7 +384,7 @@ function stringToPath(string) {
* _.differenceBy([3.1, 2.2, 1.3], [4.4, 2.5], Math.floor);
* // => [3.1, 1.3]
*
- * // using the `_.property` iteratee shorthand
+ * // The `_.property` iteratee shorthand.
* _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
* // => [{ 'x': 2 }]
*/
diff --git a/lodash.differenceby/package.json b/lodash.differenceby/package.json
index 6029d0e26..8d63af91b 100644
--- a/lodash.differenceby/package.json
+++ b/lodash.differenceby/package.json
@@ -1,11 +1,11 @@
{
"name": "lodash.differenceby",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.differenceBy` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util, differenceby",
+ "keywords": "lodash-modularized, differenceby",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
diff --git a/lodash.drop/LICENSE b/lodash.drop/LICENSE
index bcbe13d67..e0c69d560 100644
--- a/lodash.drop/LICENSE
+++ b/lodash.drop/LICENSE
@@ -1,23 +1,47 @@
-The MIT License (MIT)
+Copyright jQuery Foundation and other contributors
-Copyright 2012-2016 The Dojo Foundation
-Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
+Based on Underscore.js, copyright Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
+The following license applies to all parts of this software except as
+documented below:
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/lodash.drop/README.md b/lodash.drop/README.md
index 48ffe0bbd..55bb57156 100644
--- a/lodash.drop/README.md
+++ b/lodash.drop/README.md
@@ -1,4 +1,4 @@
-# lodash.drop v4.0.2
+# lodash.drop v4.0.3
The [lodash](https://lodash.com/) method `_.drop` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var drop = require('lodash.drop');
```
-See the [documentation](https://lodash.com/docs#drop) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.drop) for more details.
+See the [documentation](https://lodash.com/docs#drop) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.drop) for more details.
diff --git a/lodash.drop/index.js b/lodash.drop/index.js
index 3090346ce..21a790f07 100644
--- a/lodash.drop/index.js
+++ b/lodash.drop/index.js
@@ -1,10 +1,10 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
- * Copyright 2012-2016 The Dojo Foundation
+ * Copyright jQuery Foundation and other contributors
+ * Released under MIT license
* Based on Underscore.js 1.8.3
- * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
var baseSlice = require('lodash._baseslice');
@@ -15,7 +15,8 @@ var INFINITY = 1 / 0,
/** `Object#toString` result references. */
var funcTag = '[object Function]',
- genTag = '[object GeneratorFunction]';
+ genTag = '[object GeneratorFunction]',
+ symbolTag = '[object Symbol]';
/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g;
@@ -36,7 +37,8 @@ var freeParseInt = parseInt;
var objectProto = Object.prototype;
/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
@@ -46,10 +48,11 @@ var objectToString = objectProto.toString;
*
* @static
* @memberOf _
+ * @since 0.5.0
* @category Array
* @param {Array} array The array to query.
* @param {number} [n=1] The number of elements to drop.
- * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Array} Returns the slice of `array`.
* @example
*
@@ -79,9 +82,11 @@ function drop(array, n, guard) {
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
* @example
*
* _.isFunction(_);
@@ -99,11 +104,13 @@ function isFunction(value) {
}
/**
- * 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('')`)
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
@@ -127,12 +134,65 @@ function isObject(value) {
}
/**
- * Converts `value` to an integer.
- *
- * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
*
* @static
* @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+}
+
+/**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This function is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted integer.
@@ -168,6 +228,7 @@ function toInteger(value) {
*
* @static
* @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to process.
* @returns {number} Returns the number.
@@ -186,6 +247,12 @@ function toInteger(value) {
* // => 3
*/
function toNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
if (isObject(value)) {
var other = isFunction(value.valueOf) ? value.valueOf() : value;
value = isObject(other) ? (other + '') : other;
diff --git a/lodash.drop/package.json b/lodash.drop/package.json
index cda1a5b60..7abb46024 100644
--- a/lodash.drop/package.json
+++ b/lodash.drop/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.drop",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.drop` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.dropright/LICENSE b/lodash.dropright/LICENSE
index bcbe13d67..e0c69d560 100644
--- a/lodash.dropright/LICENSE
+++ b/lodash.dropright/LICENSE
@@ -1,23 +1,47 @@
-The MIT License (MIT)
+Copyright jQuery Foundation and other contributors
-Copyright 2012-2016 The Dojo Foundation
-Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
+Based on Underscore.js, copyright Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
+The following license applies to all parts of this software except as
+documented below:
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/lodash.dropright/README.md b/lodash.dropright/README.md
index de9433d39..9998df849 100644
--- a/lodash.dropright/README.md
+++ b/lodash.dropright/README.md
@@ -1,4 +1,4 @@
-# lodash.dropright v4.0.2
+# lodash.dropright v4.0.3
The [lodash](https://lodash.com/) method `_.dropRight` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var dropRight = require('lodash.dropright');
```
-See the [documentation](https://lodash.com/docs#dropRight) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.dropright) for more details.
+See the [documentation](https://lodash.com/docs#dropRight) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.dropright) for more details.
diff --git a/lodash.dropright/index.js b/lodash.dropright/index.js
index 63da366ce..60ba018f2 100644
--- a/lodash.dropright/index.js
+++ b/lodash.dropright/index.js
@@ -1,10 +1,10 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
- * Copyright 2012-2016 The Dojo Foundation
+ * Copyright jQuery Foundation and other contributors
+ * Released under MIT license
* Based on Underscore.js 1.8.3
- * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
var baseSlice = require('lodash._baseslice');
@@ -15,7 +15,8 @@ var INFINITY = 1 / 0,
/** `Object#toString` result references. */
var funcTag = '[object Function]',
- genTag = '[object GeneratorFunction]';
+ genTag = '[object GeneratorFunction]',
+ symbolTag = '[object Symbol]';
/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g;
@@ -36,7 +37,8 @@ var freeParseInt = parseInt;
var objectProto = Object.prototype;
/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
@@ -46,10 +48,11 @@ var objectToString = objectProto.toString;
*
* @static
* @memberOf _
+ * @since 3.0.0
* @category Array
* @param {Array} array The array to query.
* @param {number} [n=1] The number of elements to drop.
- * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Array} Returns the slice of `array`.
* @example
*
@@ -80,9 +83,11 @@ function dropRight(array, n, guard) {
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
* @example
*
* _.isFunction(_);
@@ -100,11 +105,13 @@ function isFunction(value) {
}
/**
- * 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('')`)
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
@@ -128,12 +135,65 @@ function isObject(value) {
}
/**
- * Converts `value` to an integer.
- *
- * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
*
* @static
* @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+}
+
+/**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This function is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted integer.
@@ -169,6 +229,7 @@ function toInteger(value) {
*
* @static
* @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to process.
* @returns {number} Returns the number.
@@ -187,6 +248,12 @@ function toInteger(value) {
* // => 3
*/
function toNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
if (isObject(value)) {
var other = isFunction(value.valueOf) ? value.valueOf() : value;
value = isObject(other) ? (other + '') : other;
diff --git a/lodash.dropright/package.json b/lodash.dropright/package.json
index e7b5e967c..8f97266cc 100644
--- a/lodash.dropright/package.json
+++ b/lodash.dropright/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.dropright",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.dropRight` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.floor/README.md b/lodash.floor/README.md
index f8b1d26d5..b9889684a 100644
--- a/lodash.floor/README.md
+++ b/lodash.floor/README.md
@@ -1,4 +1,4 @@
-# lodash.floor v4.0.2
+# lodash.floor v4.0.3
The [lodash](https://lodash.com/) method `_.floor` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var floor = require('lodash.floor');
```
-See the [documentation](https://lodash.com/docs#floor) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.floor) for more details.
+See the [documentation](https://lodash.com/docs#floor) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.floor) for more details.
diff --git a/lodash.floor/index.js b/lodash.floor/index.js
index b25bbe951..4d9144439 100644
--- a/lodash.floor/index.js
+++ b/lodash.floor/index.js
@@ -6,7 +6,6 @@
* Based on Underscore.js 1.8.3
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
-var toString = require('lodash.tostring');
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0,
@@ -33,6 +32,15 @@ var reIsOctal = /^0o[0-7]+$/i;
/** Built-in method references without a dependency on `root`. */
var freeParseInt = parseInt;
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+
+/** Detect free variable `self`. */
+var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
+
+/** Used as a reference to the global object. */
+var root = freeGlobal || freeSelf || Function('return this')();
+
/** Used for built-in method references. */
var objectProto = Object.prototype;
@@ -43,6 +51,36 @@ var objectProto = Object.prototype;
*/
var objectToString = objectProto.toString;
+/** Built-in value references. */
+var Symbol = root.Symbol;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min;
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
+
+/**
+ * The base implementation of `_.toString` which doesn't convert nullish
+ * values to empty strings.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ */
+function baseToString(value) {
+ // Exit early for strings to avoid a performance hit in some environments.
+ if (typeof value == 'string') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return symbolToString ? symbolToString.call(value) : '';
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+}
+
/**
* Creates a function like `_.round`.
*
@@ -54,7 +92,7 @@ function createRound(methodName) {
var func = Math[methodName];
return function(number, precision) {
number = toNumber(number);
- precision = toInteger(precision);
+ precision = nativeMin(toInteger(precision), 292);
if (precision) {
// Shift with exponential notation to avoid floating-point issues.
// See [MDN](https://mdn.io/round#Examples) for more details.
@@ -76,8 +114,7 @@ function createRound(methodName) {
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
* @example
*
* _.isFunction(_);
@@ -160,8 +197,7 @@ function isObjectLike(value) {
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
* @example
*
* _.isSymbol(Symbol.iterator);
@@ -213,7 +249,7 @@ function toFinite(value) {
/**
* Converts `value` to an integer.
*
- * **Note:** This function is loosely based on
+ * **Note:** This method is loosely based on
* [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
*
* @static
@@ -287,6 +323,31 @@ function toNumber(value) {
: (reIsBadHex.test(value) ? NAN : +value);
}
+/**
+ * Converts `value` to a string. An empty string is returned for `null`
+ * and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+function toString(value) {
+ return value == null ? '' : baseToString(value);
+}
+
/**
* Computes `number` rounded down to `precision`.
*
diff --git a/lodash.floor/package.json b/lodash.floor/package.json
index 2c60f5ecc..6277a5418 100644
--- a/lodash.floor/package.json
+++ b/lodash.floor/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.floor",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.floor` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -13,8 +13,5 @@
"Mathias Bynens (https://mathiasbynens.be/)"
],
"repository": "lodash/lodash",
- "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
- "dependencies": {
- "lodash.tostring": "^4.0.0"
- }
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
}
diff --git a/lodash.groupby/README.md b/lodash.groupby/README.md
index 54e0136ae..9962aea25 100644
--- a/lodash.groupby/README.md
+++ b/lodash.groupby/README.md
@@ -1,4 +1,4 @@
-# lodash.groupby v4.0.2
+# lodash.groupby v4.0.3
The [lodash](https://lodash.com/) method `_.groupBy` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var groupBy = require('lodash.groupby');
```
-See the [documentation](https://lodash.com/docs#groupBy) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.groupby) for more details.
+See the [documentation](https://lodash.com/docs#groupBy) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.groupby) for more details.
diff --git a/lodash.groupby/index.js b/lodash.groupby/index.js
index cfb2e512b..13b06e3e7 100644
--- a/lodash.groupby/index.js
+++ b/lodash.groupby/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -31,6 +31,38 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
/** Used to match backslashes in property paths. */
var reEscapeChar = /\\(\\)?/g;
+/** Used to determine if values are of the language type `Object`. */
+var objectTypes = {
+ 'function': true,
+ 'object': true
+};
+
+/** Detect free variable `exports`. */
+var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;
+
+/** Detect free variable `module`. */
+var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;
+
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
+
+/** Detect free variable `self`. */
+var freeSelf = checkGlobal(objectTypes[typeof self] && self);
+
+/** Detect free variable `window`. */
+var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+
+/** Detect `this` as the global object. */
+var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
+
+/**
+ * Used as a reference to the global object.
+ *
+ * The `this` value is used if it's the global object to avoid Greasemonkey's
+ * restricted `window` object, otherwise the `window` object is used.
+ */
+var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
+
/**
* A specialized version of `baseAggregator` for arrays.
*
@@ -52,8 +84,19 @@ function arrayAggregator(array, setter, iteratee, accumulator) {
return accumulator;
}
+/**
+ * Checks if `value` is a global object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {null|Object} Returns `value` if it's a global object, else `null`.
+ */
+function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
+}
+
/** Used for built-in method references. */
-var objectProto = global.Object.prototype;
+var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
@@ -65,7 +108,7 @@ var hasOwnProperty = objectProto.hasOwnProperty;
var objectToString = objectProto.toString;
/** Built-in value references. */
-var Symbol = global.Symbol;
+var Symbol = root.Symbol;
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
@@ -308,7 +351,7 @@ function stringToPath(string) {
* _.groupBy([6.1, 4.2, 6.3], Math.floor);
* // => { '4': [4.2], '6': [6.1, 6.3] }
*
- * // using the `_.property` iteratee shorthand
+ * // The `_.property` iteratee shorthand.
* _.groupBy(['one', 'two', 'three'], 'length');
* // => { '3': ['one', 'two'], '5': ['three'] }
*/
diff --git a/lodash.groupby/package.json b/lodash.groupby/package.json
index d8a441943..0cc6332bd 100644
--- a/lodash.groupby/package.json
+++ b/lodash.groupby/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.groupby",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.groupBy` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.has/README.md b/lodash.has/README.md
index 80a37dca2..8f1dab0ed 100644
--- a/lodash.has/README.md
+++ b/lodash.has/README.md
@@ -1,4 +1,4 @@
-# lodash.has v4.0.2
+# lodash.has v4.0.3
The [lodash](https://lodash.com/) method `_.has` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var has = require('lodash.has');
```
-See the [documentation](https://lodash.com/docs#has) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.has) for more details.
+See the [documentation](https://lodash.com/docs#has) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.has) for more details.
diff --git a/lodash.has/index.js b/lodash.has/index.js
index 83b6c8de9..3369b7721 100644
--- a/lodash.has/index.js
+++ b/lodash.has/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -31,6 +31,49 @@ var reEscapeChar = /\\(\\)?/g;
/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;
+/** Used to determine if values are of the language type `Object`. */
+var objectTypes = {
+ 'function': true,
+ 'object': true
+};
+
+/** Detect free variable `exports`. */
+var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;
+
+/** Detect free variable `module`. */
+var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;
+
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
+
+/** Detect free variable `self`. */
+var freeSelf = checkGlobal(objectTypes[typeof self] && self);
+
+/** Detect free variable `window`. */
+var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+
+/** Detect `this` as the global object. */
+var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
+
+/**
+ * Used as a reference to the global object.
+ *
+ * The `this` value is used if it's the global object to avoid Greasemonkey's
+ * restricted `window` object, otherwise the `window` object is used.
+ */
+var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
+
+/**
+ * Checks if `value` is a global object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {null|Object} Returns `value` if it's a global object, else `null`.
+ */
+function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
+}
+
/**
* Checks if `value` is a valid array-like index.
*
@@ -46,7 +89,7 @@ function isIndex(value, length) {
}
/** Used for built-in method references. */
-var objectProto = global.Object.prototype;
+var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
@@ -58,7 +101,7 @@ var hasOwnProperty = objectProto.hasOwnProperty;
var objectToString = objectProto.toString;
/** Built-in value references. */
-var Symbol = global.Symbol,
+var Symbol = root.Symbol,
getPrototypeOf = Object.getPrototypeOf,
propertyIsEnumerable = objectProto.propertyIsEnumerable;
diff --git a/lodash.has/package.json b/lodash.has/package.json
index 156df15a6..d36a562f4 100644
--- a/lodash.has/package.json
+++ b/lodash.has/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.has",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.has` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.hasin/README.md b/lodash.hasin/README.md
index 8a636893a..f7de4d4e5 100644
--- a/lodash.hasin/README.md
+++ b/lodash.hasin/README.md
@@ -1,4 +1,4 @@
-# lodash.hasin v4.0.2
+# lodash.hasin v4.0.3
The [lodash](https://lodash.com/) method `_.hasIn` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var hasIn = require('lodash.hasin');
```
-See the [documentation](https://lodash.com/docs#hasIn) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.hasin) for more details.
+See the [documentation](https://lodash.com/docs#hasIn) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.hasin) for more details.
diff --git a/lodash.hasin/index.js b/lodash.hasin/index.js
index 8e76f62d8..b8edcd248 100644
--- a/lodash.hasin/index.js
+++ b/lodash.hasin/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -31,6 +31,49 @@ var reEscapeChar = /\\(\\)?/g;
/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;
+/** Used to determine if values are of the language type `Object`. */
+var objectTypes = {
+ 'function': true,
+ 'object': true
+};
+
+/** Detect free variable `exports`. */
+var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;
+
+/** Detect free variable `module`. */
+var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;
+
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
+
+/** Detect free variable `self`. */
+var freeSelf = checkGlobal(objectTypes[typeof self] && self);
+
+/** Detect free variable `window`. */
+var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+
+/** Detect `this` as the global object. */
+var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
+
+/**
+ * Used as a reference to the global object.
+ *
+ * The `this` value is used if it's the global object to avoid Greasemonkey's
+ * restricted `window` object, otherwise the `window` object is used.
+ */
+var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
+
+/**
+ * Checks if `value` is a global object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {null|Object} Returns `value` if it's a global object, else `null`.
+ */
+function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
+}
+
/**
* Checks if `value` is a valid array-like index.
*
@@ -46,7 +89,7 @@ function isIndex(value, length) {
}
/** Used for built-in method references. */
-var objectProto = global.Object.prototype;
+var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
@@ -58,7 +101,7 @@ var hasOwnProperty = objectProto.hasOwnProperty;
var objectToString = objectProto.toString;
/** Built-in value references. */
-var Symbol = global.Symbol,
+var Symbol = root.Symbol,
propertyIsEnumerable = objectProto.propertyIsEnumerable;
/** Used to convert symbols to primitives and strings. */
diff --git a/lodash.hasin/package.json b/lodash.hasin/package.json
index aedd880b9..8fa9995a2 100644
--- a/lodash.hasin/package.json
+++ b/lodash.hasin/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.hasin",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.hasIn` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.indexof/README.md b/lodash.indexof/README.md
index 09320557e..c288cd85c 100644
--- a/lodash.indexof/README.md
+++ b/lodash.indexof/README.md
@@ -1,4 +1,4 @@
-# lodash.indexof v4.0.2
+# lodash.indexof v4.0.3
The [lodash](https://lodash.com/) method `_.indexOf` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var indexOf = require('lodash.indexof');
```
-See the [documentation](https://lodash.com/docs#indexOf) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.indexof) for more details.
+See the [documentation](https://lodash.com/docs#indexOf) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.indexof) for more details.
diff --git a/lodash.indexof/index.js b/lodash.indexof/index.js
index 80e8119e8..1decfde88 100644
--- a/lodash.indexof/index.js
+++ b/lodash.indexof/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors
* Released under MIT license
@@ -233,6 +233,41 @@ function isSymbol(value) {
(isObjectLike(value) && objectToString.call(value) == symbolTag);
}
+/**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+}
+
/**
* Converts `value` to an integer.
*
@@ -247,7 +282,7 @@ function isSymbol(value) {
* @returns {number} Returns the converted integer.
* @example
*
- * _.toInteger(3);
+ * _.toInteger(3.2);
* // => 3
*
* _.toInteger(Number.MIN_VALUE);
@@ -256,20 +291,14 @@ function isSymbol(value) {
* _.toInteger(Infinity);
* // => 1.7976931348623157e+308
*
- * _.toInteger('3');
+ * _.toInteger('3.2');
* // => 3
*/
function toInteger(value) {
- if (!value) {
- return value === 0 ? value : 0;
- }
- value = toNumber(value);
- if (value === INFINITY || value === -INFINITY) {
- var sign = (value < 0 ? -1 : 1);
- return sign * MAX_INTEGER;
- }
- var remainder = value % 1;
- return value === value ? (remainder ? value - remainder : value) : 0;
+ var result = toFinite(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
}
/**
@@ -283,8 +312,8 @@ function toInteger(value) {
* @returns {number} Returns the number.
* @example
*
- * _.toNumber(3);
- * // => 3
+ * _.toNumber(3.2);
+ * // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
@@ -292,8 +321,8 @@ function toInteger(value) {
* _.toNumber(Infinity);
* // => Infinity
*
- * _.toNumber('3');
- * // => 3
+ * _.toNumber('3.2');
+ * // => 3.2
*/
function toNumber(value) {
if (typeof value == 'number') {
diff --git a/lodash.indexof/package.json b/lodash.indexof/package.json
index 51087789a..1afc51d2e 100644
--- a/lodash.indexof/package.json
+++ b/lodash.indexof/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.indexof",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.indexOf` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.initial/LICENSE b/lodash.initial/LICENSE
index bcbe13d67..e0c69d560 100644
--- a/lodash.initial/LICENSE
+++ b/lodash.initial/LICENSE
@@ -1,23 +1,47 @@
-The MIT License (MIT)
+Copyright jQuery Foundation and other contributors
-Copyright 2012-2016 The Dojo Foundation
-Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
+Based on Underscore.js, copyright Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
+The following license applies to all parts of this software except as
+documented below:
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/lodash.initial/README.md b/lodash.initial/README.md
index 3259c9de0..44a83c00d 100644
--- a/lodash.initial/README.md
+++ b/lodash.initial/README.md
@@ -1,4 +1,4 @@
-# lodash.initial v4.0.2
+# lodash.initial v4.0.3
The [lodash](https://lodash.com/) method `_.initial` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var initial = require('lodash.initial');
```
-See the [documentation](https://lodash.com/docs#initial) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.initial) for more details.
+See the [documentation](https://lodash.com/docs#initial) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.initial) for more details.
diff --git a/lodash.initial/index.js b/lodash.initial/index.js
index 9cce0a544..afaa58c9a 100644
--- a/lodash.initial/index.js
+++ b/lodash.initial/index.js
@@ -1,10 +1,10 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
- * Copyright 2012-2016 The Dojo Foundation
+ * Copyright jQuery Foundation and other contributors
+ * Released under MIT license
* Based on Underscore.js 1.8.3
- * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
var baseSlice = require('lodash._baseslice');
@@ -15,7 +15,8 @@ var INFINITY = 1 / 0,
/** `Object#toString` result references. */
var funcTag = '[object Function]',
- genTag = '[object GeneratorFunction]';
+ genTag = '[object GeneratorFunction]',
+ symbolTag = '[object Symbol]';
/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g;
@@ -36,7 +37,8 @@ var freeParseInt = parseInt;
var objectProto = Object.prototype;
/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
@@ -46,10 +48,11 @@ var objectToString = objectProto.toString;
*
* @static
* @memberOf _
+ * @since 3.0.0
* @category Array
* @param {Array} array The array to query.
* @param {number} [n=1] The number of elements to drop.
- * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Array} Returns the slice of `array`.
* @example
*
@@ -80,6 +83,7 @@ function dropRight(array, n, guard) {
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Array
* @param {Array} array The array to query.
* @returns {Array} Returns the slice of `array`.
@@ -97,9 +101,11 @@ function initial(array) {
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
* @example
*
* _.isFunction(_);
@@ -117,11 +123,13 @@ function isFunction(value) {
}
/**
- * 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('')`)
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
@@ -145,12 +153,65 @@ function isObject(value) {
}
/**
- * Converts `value` to an integer.
- *
- * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
*
* @static
* @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+}
+
+/**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This function is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted integer.
@@ -186,6 +247,7 @@ function toInteger(value) {
*
* @static
* @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to process.
* @returns {number} Returns the number.
@@ -204,6 +266,12 @@ function toInteger(value) {
* // => 3
*/
function toNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
if (isObject(value)) {
var other = isFunction(value.valueOf) ? value.valueOf() : value;
value = isObject(other) ? (other + '') : other;
diff --git a/lodash.initial/package.json b/lodash.initial/package.json
index 1412b466c..85ed37b4a 100644
--- a/lodash.initial/package.json
+++ b/lodash.initial/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.initial",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.initial` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.intersectionby/README.md b/lodash.intersectionby/README.md
index 12c39315b..383b1a57b 100644
--- a/lodash.intersectionby/README.md
+++ b/lodash.intersectionby/README.md
@@ -1,4 +1,4 @@
-# lodash.intersectionby v4.0.2
+# lodash.intersectionby v4.0.3
The [lodash](https://lodash.com/) method `_.intersectionBy` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var intersectionBy = require('lodash.intersectionby');
```
-See the [documentation](https://lodash.com/docs#intersectionBy) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.intersectionby) for more details.
+See the [documentation](https://lodash.com/docs#intersectionBy) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.intersectionby) for more details.
diff --git a/lodash.intersectionby/index.js b/lodash.intersectionby/index.js
index 78f638110..10a80df2c 100644
--- a/lodash.intersectionby/index.js
+++ b/lodash.intersectionby/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -39,6 +39,38 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
/** Used to match backslashes in property paths. */
var reEscapeChar = /\\(\\)?/g;
+/** Used to determine if values are of the language type `Object`. */
+var objectTypes = {
+ 'function': true,
+ 'object': true
+};
+
+/** Detect free variable `exports`. */
+var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;
+
+/** Detect free variable `module`. */
+var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;
+
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
+
+/** Detect free variable `self`. */
+var freeSelf = checkGlobal(objectTypes[typeof self] && self);
+
+/** Detect free variable `window`. */
+var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+
+/** Detect `this` as the global object. */
+var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
+
+/**
+ * Used as a reference to the global object.
+ *
+ * The `this` value is used if it's the global object to avoid Greasemonkey's
+ * restricted `window` object, otherwise the `window` object is used.
+ */
+var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
+
/**
* The base implementation of `_.unary` without support for storing wrapper metadata.
*
@@ -52,8 +84,19 @@ function baseUnary(func) {
};
}
+/**
+ * Checks if `value` is a global object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {null|Object} Returns `value` if it's a global object, else `null`.
+ */
+function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
+}
+
/** Used for built-in method references. */
-var objectProto = global.Object.prototype;
+var objectProto = Object.prototype;
/**
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
@@ -62,7 +105,7 @@ var objectProto = global.Object.prototype;
var objectToString = objectProto.toString;
/** Built-in value references. */
-var Symbol = global.Symbol;
+var Symbol = root.Symbol;
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
@@ -346,7 +389,7 @@ function toArrayLikeObject(value) {
* _.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor);
* // => [2.1]
*
- * // using the `_.property` iteratee shorthand
+ * // The `_.property` iteratee shorthand.
* _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
* // => [{ 'x': 1 }]
*/
diff --git a/lodash.intersectionby/package.json b/lodash.intersectionby/package.json
index ca320e685..cd0596bd5 100644
--- a/lodash.intersectionby/package.json
+++ b/lodash.intersectionby/package.json
@@ -1,11 +1,11 @@
{
"name": "lodash.intersectionby",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.intersectionBy` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util, intersectionby",
+ "keywords": "lodash-modularized, intersectionby",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
diff --git a/lodash.isarraylike/README.md b/lodash.isarraylike/README.md
index 104944987..2ba375fee 100644
--- a/lodash.isarraylike/README.md
+++ b/lodash.isarraylike/README.md
@@ -1,4 +1,4 @@
-# lodash.isarraylike v4.0.2
+# lodash.isarraylike v4.0.3
The [lodash](https://lodash.com/) method `_.isArrayLike` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var isArrayLike = require('lodash.isarraylike');
```
-See the [documentation](https://lodash.com/docs#isArrayLike) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.isarraylike) for more details.
+See the [documentation](https://lodash.com/docs#isArrayLike) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.isarraylike) for more details.
diff --git a/lodash.isarraylike/index.js b/lodash.isarraylike/index.js
index 156512fbe..8a383770d 100644
--- a/lodash.isarraylike/index.js
+++ b/lodash.isarraylike/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -18,7 +18,8 @@ var funcTag = '[object Function]',
var objectProto = Object.prototype;
/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
@@ -28,7 +29,7 @@ var objectToString = objectProto.toString;
*
* @private
* @param {string} key The key of the property to get.
- * @returns {Function} Returns the new function.
+ * @returns {Function} Returns the new accessor function.
*/
function baseProperty(key) {
return function(object) {
@@ -39,8 +40,9 @@ function baseProperty(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.
+ * **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.
@@ -55,6 +57,7 @@ var getLength = baseProperty('length');
*
* @static
* @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
@@ -73,8 +76,7 @@ var getLength = baseProperty('length');
* // => false
*/
function isArrayLike(value) {
- return value != null &&
- !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value));
+ return value != null && isLength(getLength(value)) && !isFunction(value);
}
/**
@@ -82,9 +84,11 @@ function isArrayLike(value) {
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
* @example
*
* _.isFunction(_);
@@ -95,8 +99,8 @@ function isArrayLike(value) {
*/
function isFunction(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 8 which returns 'object' for typed array constructors, and
- // PhantomJS 1.9 which returns 'function' for `NodeList` instances.
+ // in Safari 8 which returns 'object' for typed array and weak map constructors,
+ // and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
var tag = isObject(value) ? objectToString.call(value) : '';
return tag == funcTag || tag == genTag;
}
@@ -104,13 +108,16 @@ function isFunction(value) {
/**
* Checks if `value` is a valid array-like length.
*
- * **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
+ * **Note:** This function is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
*
* @static
* @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @returns {boolean} Returns `true` if `value` is a valid length,
+ * else `false`.
* @example
*
* _.isLength(3);
@@ -131,11 +138,13 @@ function isLength(value) {
}
/**
- * 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('')`)
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
diff --git a/lodash.isarraylike/package.json b/lodash.isarraylike/package.json
index 119f7c3ce..2e0ef63dd 100644
--- a/lodash.isarraylike/package.json
+++ b/lodash.isarraylike/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.isarraylike",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.isArrayLike` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -9,7 +9,7 @@
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
- "Blaine Bublitz (https://github.com/phated)",
+ "Blaine Bublitz (https://github.com/phated)",
"Mathias Bynens (https://mathiasbynens.be/)"
],
"repository": "lodash/lodash",
diff --git a/lodash.isarraylikeobject/README.md b/lodash.isarraylikeobject/README.md
index 4b5938958..3ed8ebfaf 100644
--- a/lodash.isarraylikeobject/README.md
+++ b/lodash.isarraylikeobject/README.md
@@ -1,4 +1,4 @@
-# lodash.isarraylikeobject v4.0.2
+# lodash.isarraylikeobject v4.0.3
The [lodash](https://lodash.com/) method `_.isArrayLikeObject` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var isArrayLikeObject = require('lodash.isarraylikeobject');
```
-See the [documentation](https://lodash.com/docs#isArrayLikeObject) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.isarraylikeobject) for more details.
+See the [documentation](https://lodash.com/docs#isArrayLikeObject) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.isarraylikeobject) for more details.
diff --git a/lodash.isarraylikeobject/index.js b/lodash.isarraylikeobject/index.js
index 0b8fcf09e..912c70292 100644
--- a/lodash.isarraylikeobject/index.js
+++ b/lodash.isarraylikeobject/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -18,7 +18,8 @@ var funcTag = '[object Function]',
var objectProto = Object.prototype;
/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
@@ -28,7 +29,7 @@ var objectToString = objectProto.toString;
*
* @private
* @param {string} key The key of the property to get.
- * @returns {Function} Returns the new function.
+ * @returns {Function} Returns the new accessor function.
*/
function baseProperty(key) {
return function(object) {
@@ -39,8 +40,9 @@ function baseProperty(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.
+ * **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.
@@ -55,6 +57,7 @@ var getLength = baseProperty('length');
*
* @static
* @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
@@ -73,8 +76,7 @@ var getLength = baseProperty('length');
* // => false
*/
function isArrayLike(value) {
- return value != null &&
- !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value));
+ return value != null && isLength(getLength(value)) && !isFunction(value);
}
/**
@@ -83,9 +85,11 @@ function isArrayLike(value) {
*
* @static
* @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array-like object, else `false`.
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
+ * else `false`.
* @example
*
* _.isArrayLikeObject([1, 2, 3]);
@@ -109,9 +113,11 @@ function isArrayLikeObject(value) {
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
* @example
*
* _.isFunction(_);
@@ -122,8 +128,8 @@ function isArrayLikeObject(value) {
*/
function isFunction(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 8 which returns 'object' for typed array constructors, and
- // PhantomJS 1.9 which returns 'function' for `NodeList` instances.
+ // in Safari 8 which returns 'object' for typed array and weak map constructors,
+ // and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
var tag = isObject(value) ? objectToString.call(value) : '';
return tag == funcTag || tag == genTag;
}
@@ -131,13 +137,16 @@ function isFunction(value) {
/**
* Checks if `value` is a valid array-like length.
*
- * **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
+ * **Note:** This function is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
*
* @static
* @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @returns {boolean} Returns `true` if `value` is a valid length,
+ * else `false`.
* @example
*
* _.isLength(3);
@@ -158,11 +167,13 @@ function isLength(value) {
}
/**
- * 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('')`)
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
@@ -191,6 +202,7 @@ function isObject(value) {
*
* @static
* @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
diff --git a/lodash.isarraylikeobject/package.json b/lodash.isarraylikeobject/package.json
index fb2447b16..02ff7f1ec 100644
--- a/lodash.isarraylikeobject/package.json
+++ b/lodash.isarraylikeobject/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.isarraylikeobject",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.isArrayLikeObject` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -9,7 +9,7 @@
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
- "Blaine Bublitz (https://github.com/phated)",
+ "Blaine Bublitz (https://github.com/phated)",
"Mathias Bynens (https://mathiasbynens.be/)"
],
"repository": "lodash/lodash",
diff --git a/lodash.isinteger/README.md b/lodash.isinteger/README.md
index f1f7703af..e6f1c4e92 100644
--- a/lodash.isinteger/README.md
+++ b/lodash.isinteger/README.md
@@ -1,4 +1,4 @@
-# lodash.isinteger v4.0.2
+# lodash.isinteger v4.0.3
The [lodash](https://lodash.com/) method `_.isInteger` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var isInteger = require('lodash.isinteger');
```
-See the [documentation](https://lodash.com/docs#isInteger) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.isinteger) for more details.
+See the [documentation](https://lodash.com/docs#isInteger) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.isinteger) for more details.
diff --git a/lodash.isinteger/index.js b/lodash.isinteger/index.js
index dcd674e31..94575f6dc 100644
--- a/lodash.isinteger/index.js
+++ b/lodash.isinteger/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors
* Released under MIT license
@@ -50,8 +50,7 @@ var objectToString = objectProto.toString;
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
* @example
*
* _.isFunction(_);
@@ -164,8 +163,7 @@ function isObjectLike(value) {
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
* @example
*
* _.isSymbol(Symbol.iterator);
@@ -179,10 +177,45 @@ function isSymbol(value) {
(isObjectLike(value) && objectToString.call(value) == symbolTag);
}
+/**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+}
+
/**
* Converts `value` to an integer.
*
- * **Note:** This function is loosely based on
+ * **Note:** This method is loosely based on
* [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
*
* @static
@@ -193,7 +226,7 @@ function isSymbol(value) {
* @returns {number} Returns the converted integer.
* @example
*
- * _.toInteger(3);
+ * _.toInteger(3.2);
* // => 3
*
* _.toInteger(Number.MIN_VALUE);
@@ -202,20 +235,14 @@ function isSymbol(value) {
* _.toInteger(Infinity);
* // => 1.7976931348623157e+308
*
- * _.toInteger('3');
+ * _.toInteger('3.2');
* // => 3
*/
function toInteger(value) {
- if (!value) {
- return value === 0 ? value : 0;
- }
- value = toNumber(value);
- if (value === INFINITY || value === -INFINITY) {
- var sign = (value < 0 ? -1 : 1);
- return sign * MAX_INTEGER;
- }
- var remainder = value % 1;
- return value === value ? (remainder ? value - remainder : value) : 0;
+ var result = toFinite(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
}
/**
@@ -229,8 +256,8 @@ function toInteger(value) {
* @returns {number} Returns the number.
* @example
*
- * _.toNumber(3);
- * // => 3
+ * _.toNumber(3.2);
+ * // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
@@ -238,8 +265,8 @@ function toInteger(value) {
* _.toNumber(Infinity);
* // => Infinity
*
- * _.toNumber('3');
- * // => 3
+ * _.toNumber('3.2');
+ * // => 3.2
*/
function toNumber(value) {
if (typeof value == 'number') {
diff --git a/lodash.isinteger/package.json b/lodash.isinteger/package.json
index 828f7e38f..049ed11b9 100644
--- a/lodash.isinteger/package.json
+++ b/lodash.isinteger/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.isinteger",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.isInteger` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.isplainobject/README.md b/lodash.isplainobject/README.md
index b23d81afa..8fdcf647b 100644
--- a/lodash.isplainobject/README.md
+++ b/lodash.isplainobject/README.md
@@ -1,4 +1,4 @@
-# lodash.isplainobject v4.0.2
+# lodash.isplainobject v4.0.3
The [lodash](https://lodash.com/) method `_.isPlainObject` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var isPlainObject = require('lodash.isplainobject');
```
-See the [documentation](https://lodash.com/docs#isPlainObject) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.isplainobject) for more details.
+See the [documentation](https://lodash.com/docs#isPlainObject) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.isplainobject) for more details.
diff --git a/lodash.isplainobject/index.js b/lodash.isplainobject/index.js
index d7361d492..6d7fcddea 100644
--- a/lodash.isplainobject/index.js
+++ b/lodash.isplainobject/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -106,10 +106,7 @@ function isPlainObject(value) {
objectToString.call(value) != objectTag || isHostObject(value)) {
return false;
}
- var proto = objectProto;
- if (typeof value.constructor == 'function') {
- proto = getPrototypeOf(value);
- }
+ var proto = getPrototypeOf(value);
if (proto === null) {
return true;
}
diff --git a/lodash.isplainobject/package.json b/lodash.isplainobject/package.json
index 093101f3c..0a821ae7f 100644
--- a/lodash.isplainobject/package.json
+++ b/lodash.isplainobject/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.isplainobject",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.isPlainObject` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.issafeinteger/README.md b/lodash.issafeinteger/README.md
index 479092d6d..dd2479382 100644
--- a/lodash.issafeinteger/README.md
+++ b/lodash.issafeinteger/README.md
@@ -1,4 +1,4 @@
-# lodash.issafeinteger v4.0.2
+# lodash.issafeinteger v4.0.3
The [lodash](https://lodash.com/) method `_.isSafeInteger` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var isSafeInteger = require('lodash.issafeinteger');
```
-See the [documentation](https://lodash.com/docs#isSafeInteger) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.issafeinteger) for more details.
+See the [documentation](https://lodash.com/docs#isSafeInteger) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.issafeinteger) for more details.
diff --git a/lodash.issafeinteger/index.js b/lodash.issafeinteger/index.js
index 2628c0d32..eb30f6697 100644
--- a/lodash.issafeinteger/index.js
+++ b/lodash.issafeinteger/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors
* Released under MIT license
@@ -51,8 +51,7 @@ var objectToString = objectProto.toString;
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
* @example
*
* _.isFunction(_);
@@ -197,8 +196,7 @@ function isSafeInteger(value) {
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
* @example
*
* _.isSymbol(Symbol.iterator);
@@ -212,10 +210,45 @@ function isSymbol(value) {
(isObjectLike(value) && objectToString.call(value) == symbolTag);
}
+/**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+}
+
/**
* Converts `value` to an integer.
*
- * **Note:** This function is loosely based on
+ * **Note:** This method is loosely based on
* [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
*
* @static
@@ -226,7 +259,7 @@ function isSymbol(value) {
* @returns {number} Returns the converted integer.
* @example
*
- * _.toInteger(3);
+ * _.toInteger(3.2);
* // => 3
*
* _.toInteger(Number.MIN_VALUE);
@@ -235,20 +268,14 @@ function isSymbol(value) {
* _.toInteger(Infinity);
* // => 1.7976931348623157e+308
*
- * _.toInteger('3');
+ * _.toInteger('3.2');
* // => 3
*/
function toInteger(value) {
- if (!value) {
- return value === 0 ? value : 0;
- }
- value = toNumber(value);
- if (value === INFINITY || value === -INFINITY) {
- var sign = (value < 0 ? -1 : 1);
- return sign * MAX_INTEGER;
- }
- var remainder = value % 1;
- return value === value ? (remainder ? value - remainder : value) : 0;
+ var result = toFinite(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
}
/**
@@ -262,8 +289,8 @@ function toInteger(value) {
* @returns {number} Returns the number.
* @example
*
- * _.toNumber(3);
- * // => 3
+ * _.toNumber(3.2);
+ * // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
@@ -271,8 +298,8 @@ function toInteger(value) {
* _.toNumber(Infinity);
* // => Infinity
*
- * _.toNumber('3');
- * // => 3
+ * _.toNumber('3.2');
+ * // => 3.2
*/
function toNumber(value) {
if (typeof value == 'number') {
diff --git a/lodash.issafeinteger/package.json b/lodash.issafeinteger/package.json
index 73dbf5009..19d1ebe45 100644
--- a/lodash.issafeinteger/package.json
+++ b/lodash.issafeinteger/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.issafeinteger",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.isSafeInteger` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.iteratee/README.md b/lodash.iteratee/README.md
index 133155690..097182c31 100644
--- a/lodash.iteratee/README.md
+++ b/lodash.iteratee/README.md
@@ -1,4 +1,4 @@
-# lodash.iteratee v4.0.2
+# lodash.iteratee v4.0.3
The [lodash](https://lodash.com/) method `_.iteratee` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var iteratee = require('lodash.iteratee');
```
-See the [documentation](https://lodash.com/docs#iteratee) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.iteratee) for more details.
+See the [documentation](https://lodash.com/docs#iteratee) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.iteratee) for more details.
diff --git a/lodash.iteratee/index.js b/lodash.iteratee/index.js
index a24f75d02..4db6d385d 100644
--- a/lodash.iteratee/index.js
+++ b/lodash.iteratee/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -726,6 +726,9 @@ function initCloneArray(array) {
* @returns {Object} Returns the initialized clone.
*/
function initCloneObject(object) {
+ if (isPrototype(object)) {
+ return {};
+ }
var Ctor = object.constructor;
return baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);
}
@@ -792,6 +795,20 @@ function isKey(value, object) {
(object != null && value in Object(object)));
}
+/**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+ return value === proto;
+}
+
/**
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
*
@@ -926,8 +943,6 @@ function isFunction(value) {
* // => 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');
}
diff --git a/lodash.iteratee/package.json b/lodash.iteratee/package.json
index 2db823b55..8c479dd23 100644
--- a/lodash.iteratee/package.json
+++ b/lodash.iteratee/package.json
@@ -1,11 +1,11 @@
{
"name": "lodash.iteratee",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.iteratee` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util, iteratee",
+ "keywords": "lodash-modularized, iteratee",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
diff --git a/lodash.keyby/README.md b/lodash.keyby/README.md
index e3fcd236f..7fd552e9e 100644
--- a/lodash.keyby/README.md
+++ b/lodash.keyby/README.md
@@ -1,4 +1,4 @@
-# lodash.keyby v4.0.2
+# lodash.keyby v4.0.3
The [lodash](https://lodash.com/) method `_.keyBy` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var keyBy = require('lodash.keyby');
```
-See the [documentation](https://lodash.com/docs#keyBy) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.keyby) for more details.
+See the [documentation](https://lodash.com/docs#keyBy) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.keyby) for more details.
diff --git a/lodash.keyby/index.js b/lodash.keyby/index.js
index 4ad20071a..90b98454b 100644
--- a/lodash.keyby/index.js
+++ b/lodash.keyby/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -31,6 +31,38 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
/** Used to match backslashes in property paths. */
var reEscapeChar = /\\(\\)?/g;
+/** Used to determine if values are of the language type `Object`. */
+var objectTypes = {
+ 'function': true,
+ 'object': true
+};
+
+/** Detect free variable `exports`. */
+var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;
+
+/** Detect free variable `module`. */
+var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;
+
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
+
+/** Detect free variable `self`. */
+var freeSelf = checkGlobal(objectTypes[typeof self] && self);
+
+/** Detect free variable `window`. */
+var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+
+/** Detect `this` as the global object. */
+var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
+
+/**
+ * Used as a reference to the global object.
+ *
+ * The `this` value is used if it's the global object to avoid Greasemonkey's
+ * restricted `window` object, otherwise the `window` object is used.
+ */
+var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
+
/**
* A specialized version of `baseAggregator` for arrays.
*
@@ -52,8 +84,19 @@ function arrayAggregator(array, setter, iteratee, accumulator) {
return accumulator;
}
+/**
+ * Checks if `value` is a global object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {null|Object} Returns `value` if it's a global object, else `null`.
+ */
+function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
+}
+
/** Used for built-in method references. */
-var objectProto = global.Object.prototype;
+var objectProto = Object.prototype;
/**
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
@@ -62,7 +105,7 @@ var objectProto = global.Object.prototype;
var objectToString = objectProto.toString;
/** Built-in value references. */
-var Symbol = global.Symbol;
+var Symbol = root.Symbol;
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
diff --git a/lodash.keyby/package.json b/lodash.keyby/package.json
index bb837abef..d32f85a64 100644
--- a/lodash.keyby/package.json
+++ b/lodash.keyby/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.keyby",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.keyBy` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.keys/LICENSE b/lodash.keys/LICENSE
index b054ca5a3..bcbe13d67 100644
--- a/lodash.keys/LICENSE
+++ b/lodash.keys/LICENSE
@@ -1,22 +1,23 @@
+The MIT License (MIT)
+
Copyright 2012-2016 The Dojo Foundation
Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/lodash.keys/README.md b/lodash.keys/README.md
index 2b36548a6..810f42e30 100644
--- a/lodash.keys/README.md
+++ b/lodash.keys/README.md
@@ -1,4 +1,4 @@
-# lodash.keys v4.0.2
+# lodash.keys v4.0.3
The [lodash](https://lodash.com/) method `_.keys` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var keys = require('lodash.keys');
```
-See the [documentation](https://lodash.com/docs#keys) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.keys) for more details.
+See the [documentation](https://lodash.com/docs#keys) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.keys) for more details.
diff --git a/lodash.keys/index.js b/lodash.keys/index.js
index 00ef3c302..02302b8c9 100644
--- a/lodash.keys/index.js
+++ b/lodash.keys/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -92,7 +92,6 @@ function baseHas(object, key) {
* property of prototypes or treat sparse arrays as dense.
*
* @private
- * @type Function
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
@@ -183,7 +182,7 @@ function isArguments(value) {
*
* @static
* @memberOf _
- * @type Function
+ * @type {Function}
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
@@ -210,7 +209,6 @@ var isArray = Array.isArray;
*
* @static
* @memberOf _
- * @type Function
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
@@ -239,7 +237,6 @@ function isArrayLike(value) {
*
* @static
* @memberOf _
- * @type Function
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array-like object, else `false`.
@@ -310,7 +307,8 @@ function isFunction(value) {
* // => false
*/
function isLength(value) {
- return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
/**
diff --git a/lodash.keys/package.json b/lodash.keys/package.json
index d4ade9884..c450597b2 100644
--- a/lodash.keys/package.json
+++ b/lodash.keys/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.keys",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.keys` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.lastindexof/README.md b/lodash.lastindexof/README.md
index c8c6e4d08..500ce6c72 100644
--- a/lodash.lastindexof/README.md
+++ b/lodash.lastindexof/README.md
@@ -1,4 +1,4 @@
-# lodash.lastindexof v4.0.2
+# lodash.lastindexof v4.0.3
The [lodash](https://lodash.com/) method `_.lastIndexOf` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var lastIndexOf = require('lodash.lastindexof');
```
-See the [documentation](https://lodash.com/docs#lastIndexOf) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.lastindexof) for more details.
+See the [documentation](https://lodash.com/docs#lastIndexOf) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.lastindexof) for more details.
diff --git a/lodash.lastindexof/index.js b/lodash.lastindexof/index.js
index b5e4ef1a5..603ea61bf 100644
--- a/lodash.lastindexof/index.js
+++ b/lodash.lastindexof/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors
* Released under MIT license
@@ -221,6 +221,41 @@ function isSymbol(value) {
(isObjectLike(value) && objectToString.call(value) == symbolTag);
}
+/**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+}
+
/**
* Converts `value` to an integer.
*
@@ -235,7 +270,7 @@ function isSymbol(value) {
* @returns {number} Returns the converted integer.
* @example
*
- * _.toInteger(3);
+ * _.toInteger(3.2);
* // => 3
*
* _.toInteger(Number.MIN_VALUE);
@@ -244,20 +279,14 @@ function isSymbol(value) {
* _.toInteger(Infinity);
* // => 1.7976931348623157e+308
*
- * _.toInteger('3');
+ * _.toInteger('3.2');
* // => 3
*/
function toInteger(value) {
- if (!value) {
- return value === 0 ? value : 0;
- }
- value = toNumber(value);
- if (value === INFINITY || value === -INFINITY) {
- var sign = (value < 0 ? -1 : 1);
- return sign * MAX_INTEGER;
- }
- var remainder = value % 1;
- return value === value ? (remainder ? value - remainder : value) : 0;
+ var result = toFinite(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
}
/**
@@ -271,8 +300,8 @@ function toInteger(value) {
* @returns {number} Returns the number.
* @example
*
- * _.toNumber(3);
- * // => 3
+ * _.toNumber(3.2);
+ * // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
@@ -280,8 +309,8 @@ function toInteger(value) {
* _.toNumber(Infinity);
* // => Infinity
*
- * _.toNumber('3');
- * // => 3
+ * _.toNumber('3.2');
+ * // => 3.2
*/
function toNumber(value) {
if (typeof value == 'number') {
diff --git a/lodash.lastindexof/package.json b/lodash.lastindexof/package.json
index 638cfc169..ae31ac4f4 100644
--- a/lodash.lastindexof/package.json
+++ b/lodash.lastindexof/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.lastindexof",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.lastIndexOf` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.matches/README.md b/lodash.matches/README.md
index 95eae2117..1191f199b 100644
--- a/lodash.matches/README.md
+++ b/lodash.matches/README.md
@@ -1,4 +1,4 @@
-# lodash.matches v4.0.2
+# lodash.matches v4.0.3
The [lodash](https://lodash.com/) method `_.matches` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var matches = require('lodash.matches');
```
-See the [documentation](https://lodash.com/docs#matches) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.matches) for more details.
+See the [documentation](https://lodash.com/docs#matches) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.matches) for more details.
diff --git a/lodash.matches/index.js b/lodash.matches/index.js
index 5fd8f8672..799c7d1d4 100644
--- a/lodash.matches/index.js
+++ b/lodash.matches/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -609,6 +609,9 @@ function initCloneArray(array) {
* @returns {Object} Returns the initialized clone.
*/
function initCloneObject(object) {
+ if (isPrototype(object)) {
+ return {};
+ }
var Ctor = object.constructor;
return baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);
}
@@ -658,6 +661,20 @@ function initCloneByTag(object, tag, isDeep) {
}
}
+/**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+ return value === proto;
+}
+
/**
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
*
@@ -777,8 +794,6 @@ function isFunction(value) {
* // => 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');
}
diff --git a/lodash.matches/package.json b/lodash.matches/package.json
index e04ed6fb4..2e59e92ba 100644
--- a/lodash.matches/package.json
+++ b/lodash.matches/package.json
@@ -1,11 +1,11 @@
{
"name": "lodash.matches",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.matches` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util, matches",
+ "keywords": "lodash-modularized, matches",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
diff --git a/lodash.matchesproperty/README.md b/lodash.matchesproperty/README.md
index 83d6a6a6f..6cbc07168 100644
--- a/lodash.matchesproperty/README.md
+++ b/lodash.matchesproperty/README.md
@@ -1,4 +1,4 @@
-# lodash.matchesproperty v4.0.2
+# lodash.matchesproperty v4.0.3
The [lodash](https://lodash.com/) method `_.matchesProperty` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var matchesProperty = require('lodash.matchesproperty');
```
-See the [documentation](https://lodash.com/docs#matchesProperty) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.matchesproperty) for more details.
+See the [documentation](https://lodash.com/docs#matchesProperty) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.matchesproperty) for more details.
diff --git a/lodash.matchesproperty/index.js b/lodash.matchesproperty/index.js
index eb9704169..e5f727c43 100644
--- a/lodash.matchesproperty/index.js
+++ b/lodash.matchesproperty/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -588,6 +588,9 @@ function initCloneArray(array) {
* @returns {Object} Returns the initialized clone.
*/
function initCloneObject(object) {
+ if (isPrototype(object)) {
+ return {};
+ }
var Ctor = object.constructor;
return baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);
}
@@ -637,6 +640,20 @@ function initCloneByTag(object, tag, isDeep) {
}
}
+/**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+ return value === proto;
+}
+
/**
* Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* comparison between two values to determine if they are equivalent.
@@ -744,8 +761,6 @@ function isFunction(value) {
* // => 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');
}
diff --git a/lodash.matchesproperty/package.json b/lodash.matchesproperty/package.json
index af3a13bf4..eb7e81f42 100644
--- a/lodash.matchesproperty/package.json
+++ b/lodash.matchesproperty/package.json
@@ -1,11 +1,11 @@
{
"name": "lodash.matchesproperty",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.matchesProperty` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util, matchesproperty",
+ "keywords": "lodash-modularized, matchesproperty",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
diff --git a/lodash.memoize/LICENSE b/lodash.memoize/LICENSE
index bcbe13d67..e0c69d560 100644
--- a/lodash.memoize/LICENSE
+++ b/lodash.memoize/LICENSE
@@ -1,23 +1,47 @@
-The MIT License (MIT)
+Copyright jQuery Foundation and other contributors
-Copyright 2012-2016 The Dojo Foundation
-Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
+Based on Underscore.js, copyright Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
+The following license applies to all parts of this software except as
+documented below:
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/lodash.memoize/README.md b/lodash.memoize/README.md
index fca6c0c5c..ce3ff82bc 100644
--- a/lodash.memoize/README.md
+++ b/lodash.memoize/README.md
@@ -1,4 +1,4 @@
-# lodash.memoize v4.0.2
+# lodash.memoize v4.0.3
The [lodash](https://lodash.com/) method `_.memoize` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var memoize = require('lodash.memoize');
```
-See the [documentation](https://lodash.com/docs#memoize) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.memoize) for more details.
+See the [documentation](https://lodash.com/docs#memoize) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.memoize) for more details.
diff --git a/lodash.memoize/index.js b/lodash.memoize/index.js
index f7ae9c5ab..9b41ad89e 100644
--- a/lodash.memoize/index.js
+++ b/lodash.memoize/index.js
@@ -1,10 +1,10 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
- * Copyright 2012-2016 The Dojo Foundation
+ * Copyright jQuery Foundation and other contributors
+ * Released under MIT license
* Based on Underscore.js 1.8.3
- * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
var MapCache = require('lodash._mapcache');
@@ -13,18 +13,20 @@ var FUNC_ERROR_TEXT = 'Expected a function';
/**
* Creates a function that memoizes the result of `func`. If `resolver` is
- * provided it determines the cache key for storing the result based on the
+ * provided, it determines the cache key for storing the result based on the
* arguments provided to the memoized function. By default, the first argument
* provided to the memoized function is used as the map cache key. The `func`
* is invoked with the `this` binding of the memoized function.
*
* **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache`
- * constructor with one whose instances implement the [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
+ * constructor with one whose instances implement the
+ * [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
* method interface of `delete`, `get`, `has`, and `set`.
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Function
* @param {Function} func The function to have its output memoized.
* @param {Function} [resolver] The function to resolve the cache key.
@@ -69,7 +71,7 @@ function memoize(func, resolver) {
memoized.cache = cache.set(key, result);
return result;
};
- memoized.cache = new memoize.Cache;
+ memoized.cache = new (memoize.Cache || MapCache);
return memoized;
}
diff --git a/lodash.memoize/package.json b/lodash.memoize/package.json
index 4733dba42..24d1277d7 100644
--- a/lodash.memoize/package.json
+++ b/lodash.memoize/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.memoize",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.memoize` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.merge/README.md b/lodash.merge/README.md
index 4453551da..833188cc9 100644
--- a/lodash.merge/README.md
+++ b/lodash.merge/README.md
@@ -1,4 +1,4 @@
-# lodash.merge v4.0.2
+# lodash.merge v4.0.3
The [lodash](https://lodash.com/) method `_.merge` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var merge = require('lodash.merge');
```
-See the [documentation](https://lodash.com/docs#merge) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.merge) for more details.
+See the [documentation](https://lodash.com/docs#merge) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.merge) for more details.
diff --git a/lodash.merge/index.js b/lodash.merge/index.js
index b0389bbf3..dd6e75c07 100644
--- a/lodash.merge/index.js
+++ b/lodash.merge/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -437,7 +437,7 @@ function baseMerge(object, source, srcIndex, customizer, stack) {
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
var objValue = object[key],
srcValue = source[key],
- stacked = stack.get(srcValue) || stack.get(objValue);
+ stacked = stack.get(srcValue);
if (stacked) {
assignMergeValue(object, key, stacked);
@@ -456,6 +456,7 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta
newValue = copyArray(objValue);
}
else {
+ isCommon = false;
newValue = baseClone(srcValue);
}
}
@@ -464,6 +465,7 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta
newValue = toPlainObject(objValue);
}
else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
+ isCommon = false;
newValue = baseClone(srcValue);
}
else {
@@ -770,6 +772,9 @@ function initCloneArray(array) {
* @returns {Object} Returns the initialized clone.
*/
function initCloneObject(object) {
+ if (isPrototype(object)) {
+ return {};
+ }
var Ctor = object.constructor;
return baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);
}
@@ -841,6 +846,20 @@ function isIterateeCall(value, index, object) {
return false;
}
+/**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+ return value === proto;
+}
+
/**
* Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* comparison between two values to determine if they are equivalent.
@@ -1056,8 +1075,6 @@ function isLength(value) {
* // => 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');
}
diff --git a/lodash.merge/package.json b/lodash.merge/package.json
index 2ab70fb4e..19368d70c 100644
--- a/lodash.merge/package.json
+++ b/lodash.merge/package.json
@@ -1,11 +1,11 @@
{
"name": "lodash.merge",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.merge` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util, merge",
+ "keywords": "lodash-modularized, merge",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
diff --git a/lodash.mergewith/README.md b/lodash.mergewith/README.md
index 92d8e7b48..6b4346abc 100644
--- a/lodash.mergewith/README.md
+++ b/lodash.mergewith/README.md
@@ -1,4 +1,4 @@
-# lodash.mergewith v4.0.2
+# lodash.mergewith v4.0.3
The [lodash](https://lodash.com/) method `_.mergeWith` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var mergeWith = require('lodash.mergewith');
```
-See the [documentation](https://lodash.com/docs#mergeWith) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.mergewith) for more details.
+See the [documentation](https://lodash.com/docs#mergeWith) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.mergewith) for more details.
diff --git a/lodash.mergewith/index.js b/lodash.mergewith/index.js
index d981c4045..d4f285841 100644
--- a/lodash.mergewith/index.js
+++ b/lodash.mergewith/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -437,7 +437,7 @@ function baseMerge(object, source, srcIndex, customizer, stack) {
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
var objValue = object[key],
srcValue = source[key],
- stacked = stack.get(srcValue) || stack.get(objValue);
+ stacked = stack.get(srcValue);
if (stacked) {
assignMergeValue(object, key, stacked);
@@ -456,6 +456,7 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta
newValue = copyArray(objValue);
}
else {
+ isCommon = false;
newValue = baseClone(srcValue);
}
}
@@ -464,6 +465,7 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta
newValue = toPlainObject(objValue);
}
else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
+ isCommon = false;
newValue = baseClone(srcValue);
}
else {
@@ -770,6 +772,9 @@ function initCloneArray(array) {
* @returns {Object} Returns the initialized clone.
*/
function initCloneObject(object) {
+ if (isPrototype(object)) {
+ return {};
+ }
var Ctor = object.constructor;
return baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);
}
@@ -841,6 +846,20 @@ function isIterateeCall(value, index, object) {
return false;
}
+/**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+ return value === proto;
+}
+
/**
* Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* comparison between two values to determine if they are equivalent.
@@ -1056,8 +1075,6 @@ function isLength(value) {
* // => 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');
}
diff --git a/lodash.mergewith/package.json b/lodash.mergewith/package.json
index 3db4ee574..b74e20e46 100644
--- a/lodash.mergewith/package.json
+++ b/lodash.mergewith/package.json
@@ -1,11 +1,11 @@
{
"name": "lodash.mergewith",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.mergeWith` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util, mergewith",
+ "keywords": "lodash-modularized, mergewith",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
diff --git a/lodash.partition/README.md b/lodash.partition/README.md
index 0754ebb6b..75ca241e2 100644
--- a/lodash.partition/README.md
+++ b/lodash.partition/README.md
@@ -1,4 +1,4 @@
-# lodash.partition v4.0.2
+# lodash.partition v4.0.3
The [lodash](https://lodash.com/) method `_.partition` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var partition = require('lodash.partition');
```
-See the [documentation](https://lodash.com/docs#partition) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.partition) for more details.
+See the [documentation](https://lodash.com/docs#partition) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.partition) for more details.
diff --git a/lodash.partition/index.js b/lodash.partition/index.js
index ab81c4969..1c6c9310b 100644
--- a/lodash.partition/index.js
+++ b/lodash.partition/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -31,6 +31,38 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
/** Used to match backslashes in property paths. */
var reEscapeChar = /\\(\\)?/g;
+/** Used to determine if values are of the language type `Object`. */
+var objectTypes = {
+ 'function': true,
+ 'object': true
+};
+
+/** Detect free variable `exports`. */
+var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;
+
+/** Detect free variable `module`. */
+var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;
+
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
+
+/** Detect free variable `self`. */
+var freeSelf = checkGlobal(objectTypes[typeof self] && self);
+
+/** Detect free variable `window`. */
+var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+
+/** Detect `this` as the global object. */
+var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
+
+/**
+ * Used as a reference to the global object.
+ *
+ * The `this` value is used if it's the global object to avoid Greasemonkey's
+ * restricted `window` object, otherwise the `window` object is used.
+ */
+var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
+
/**
* A specialized version of `baseAggregator` for arrays.
*
@@ -52,8 +84,19 @@ function arrayAggregator(array, setter, iteratee, accumulator) {
return accumulator;
}
+/**
+ * Checks if `value` is a global object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {null|Object} Returns `value` if it's a global object, else `null`.
+ */
+function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
+}
+
/** Used for built-in method references. */
-var objectProto = global.Object.prototype;
+var objectProto = Object.prototype;
/**
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
@@ -62,7 +105,7 @@ var objectProto = global.Object.prototype;
var objectToString = objectProto.toString;
/** Built-in value references. */
-var Symbol = global.Symbol;
+var Symbol = root.Symbol;
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
@@ -311,15 +354,15 @@ function stringToPath(string) {
* _.partition(users, function(o) { return o.active; });
* // => objects for [['fred'], ['barney', 'pebbles']]
*
- * // using the `_.matches` iteratee shorthand
+ * // The `_.matches` iteratee shorthand.
* _.partition(users, { 'age': 1, 'active': false });
* // => objects for [['pebbles'], ['barney', 'fred']]
*
- * // using the `_.matchesProperty` iteratee shorthand
+ * // The `_.matchesProperty` iteratee shorthand.
* _.partition(users, ['active', false]);
* // => objects for [['barney', 'pebbles'], ['fred']]
*
- * // using the `_.property` iteratee shorthand
+ * // The `_.property` iteratee shorthand.
* _.partition(users, 'active');
* // => objects for [['fred'], ['barney', 'pebbles']]
*/
diff --git a/lodash.partition/package.json b/lodash.partition/package.json
index ef672f062..c53b7e79a 100644
--- a/lodash.partition/package.json
+++ b/lodash.partition/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.partition",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.partition` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.pullallby/README.md b/lodash.pullallby/README.md
index b38997c01..25106e0e5 100644
--- a/lodash.pullallby/README.md
+++ b/lodash.pullallby/README.md
@@ -1,4 +1,4 @@
-# lodash.pullallby v4.0.2
+# lodash.pullallby v4.0.3
The [lodash](https://lodash.com/) method `_.pullAllBy` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var pullAllBy = require('lodash.pullallby');
```
-See the [documentation](https://lodash.com/docs#pullAllBy) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.pullallby) for more details.
+See the [documentation](https://lodash.com/docs#pullAllBy) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.pullallby) for more details.
diff --git a/lodash.pullallby/index.js b/lodash.pullallby/index.js
index 9f14d3709..016b32c8b 100644
--- a/lodash.pullallby/index.js
+++ b/lodash.pullallby/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -31,8 +31,51 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
/** Used to match backslashes in property paths. */
var reEscapeChar = /\\(\\)?/g;
+/** Used to determine if values are of the language type `Object`. */
+var objectTypes = {
+ 'function': true,
+ 'object': true
+};
+
+/** Detect free variable `exports`. */
+var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;
+
+/** Detect free variable `module`. */
+var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;
+
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
+
+/** Detect free variable `self`. */
+var freeSelf = checkGlobal(objectTypes[typeof self] && self);
+
+/** Detect free variable `window`. */
+var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+
+/** Detect `this` as the global object. */
+var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
+
+/**
+ * Used as a reference to the global object.
+ *
+ * The `this` value is used if it's the global object to avoid Greasemonkey's
+ * restricted `window` object, otherwise the `window` object is used.
+ */
+var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
+
+/**
+ * Checks if `value` is a global object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {null|Object} Returns `value` if it's a global object, else `null`.
+ */
+function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
+}
+
/** Used for built-in method references. */
-var objectProto = global.Object.prototype;
+var objectProto = Object.prototype;
/**
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
@@ -41,7 +84,7 @@ var objectProto = global.Object.prototype;
var objectToString = objectProto.toString;
/** Built-in value references. */
-var Symbol = global.Symbol;
+var Symbol = root.Symbol;
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
diff --git a/lodash.pullallby/package.json b/lodash.pullallby/package.json
index 98e93d052..c92f33aed 100644
--- a/lodash.pullallby/package.json
+++ b/lodash.pullallby/package.json
@@ -1,11 +1,11 @@
{
"name": "lodash.pullallby",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.pullAllBy` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util, pullallby",
+ "keywords": "lodash-modularized, pullallby",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
diff --git a/lodash.rangeright/README.md b/lodash.rangeright/README.md
index ac8eabcd4..abf42a6bc 100644
--- a/lodash.rangeright/README.md
+++ b/lodash.rangeright/README.md
@@ -1,4 +1,4 @@
-# lodash.rangeright v4.0.2
+# lodash.rangeright v4.0.3
The [lodash](https://lodash.com/) method `_.rangeRight` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var rangeRight = require('lodash.rangeright');
```
-See the [documentation](https://lodash.com/docs#rangeRight) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.rangeright) for more details.
+See the [documentation](https://lodash.com/docs#rangeRight) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.rangeright) for more details.
diff --git a/lodash.rangeright/index.js b/lodash.rangeright/index.js
index 1043db237..51b374857 100644
--- a/lodash.rangeright/index.js
+++ b/lodash.rangeright/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -215,8 +215,7 @@ function eq(value, other) {
* // => false
*/
function isArrayLike(value) {
- return value != null &&
- !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value));
+ return value != null && isLength(getLength(value)) && !isFunction(value);
}
/**
@@ -237,8 +236,8 @@ function isArrayLike(value) {
*/
function isFunction(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 8 which returns 'object' for typed array constructors, and
- // PhantomJS 1.9 which returns 'function' for `NodeList` instances.
+ // in Safari 8 which returns 'object' for typed array and weak map constructors,
+ // and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
var tag = isObject(value) ? objectToString.call(value) : '';
return tag == funcTag || tag == genTag;
}
diff --git a/lodash.rangeright/package.json b/lodash.rangeright/package.json
index 0f851ece3..10f7364d5 100644
--- a/lodash.rangeright/package.json
+++ b/lodash.rangeright/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.rangeright",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.rangeRight` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -9,7 +9,7 @@
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
- "Blaine Bublitz (https://github.com/phated)",
+ "Blaine Bublitz (https://github.com/phated)",
"Mathias Bynens (https://mathiasbynens.be/)"
],
"repository": "lodash/lodash",
diff --git a/lodash.repeat/README.md b/lodash.repeat/README.md
index 9d626e83f..0bf4b8169 100644
--- a/lodash.repeat/README.md
+++ b/lodash.repeat/README.md
@@ -1,4 +1,4 @@
-# lodash.repeat v4.0.2
+# lodash.repeat v4.0.3
The [lodash](https://lodash.com/) method `_.repeat` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var repeat = require('lodash.repeat');
```
-See the [documentation](https://lodash.com/docs#repeat) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.repeat) for more details.
+See the [documentation](https://lodash.com/docs#repeat) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.repeat) for more details.
diff --git a/lodash.repeat/index.js b/lodash.repeat/index.js
index 5c2909731..812d4c8db 100644
--- a/lodash.repeat/index.js
+++ b/lodash.repeat/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors
* Released under MIT license
@@ -37,20 +37,6 @@ var reIsUint = /^(?:0|[1-9]\d*)$/;
/** Built-in method references without a dependency on `root`. */
var freeParseInt = parseInt;
-/**
- * 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;
-}
-
/** Used for built-in method references. */
var objectProto = Object.prototype;
@@ -69,7 +55,7 @@ var nativeFloor = Math.floor;
*
* @private
* @param {string} key The key of the property to get.
- * @returns {Function} Returns the new function.
+ * @returns {Function} Returns the new accessor function.
*/
function baseProperty(key) {
return function(object) {
@@ -118,6 +104,21 @@ function baseRepeat(string, n) {
*/
var getLength = baseProperty('length');
+/**
+ * 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) {
+ length = length == null ? MAX_SAFE_INTEGER : length;
+ return !!length &&
+ (typeof value == 'number' || reIsUint.test(value)) &&
+ (value > -1 && value % 1 == 0 && value < length);
+}
+
/**
* Checks if the given arguments are from an iteratee call.
*
@@ -346,6 +347,41 @@ function isSymbol(value) {
(isObjectLike(value) && objectToString.call(value) == symbolTag);
}
+/**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+}
+
/**
* Converts `value` to an integer.
*
@@ -360,7 +396,7 @@ function isSymbol(value) {
* @returns {number} Returns the converted integer.
* @example
*
- * _.toInteger(3);
+ * _.toInteger(3.2);
* // => 3
*
* _.toInteger(Number.MIN_VALUE);
@@ -369,20 +405,14 @@ function isSymbol(value) {
* _.toInteger(Infinity);
* // => 1.7976931348623157e+308
*
- * _.toInteger('3');
+ * _.toInteger('3.2');
* // => 3
*/
function toInteger(value) {
- if (!value) {
- return value === 0 ? value : 0;
- }
- value = toNumber(value);
- if (value === INFINITY || value === -INFINITY) {
- var sign = (value < 0 ? -1 : 1);
- return sign * MAX_INTEGER;
- }
- var remainder = value % 1;
- return value === value ? (remainder ? value - remainder : value) : 0;
+ var result = toFinite(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
}
/**
@@ -396,8 +426,8 @@ function toInteger(value) {
* @returns {number} Returns the number.
* @example
*
- * _.toNumber(3);
- * // => 3
+ * _.toNumber(3.2);
+ * // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
@@ -405,8 +435,8 @@ function toInteger(value) {
* _.toNumber(Infinity);
* // => Infinity
*
- * _.toNumber('3');
- * // => 3
+ * _.toNumber('3.2');
+ * // => 3.2
*/
function toNumber(value) {
if (typeof value == 'number') {
diff --git a/lodash.repeat/package.json b/lodash.repeat/package.json
index 9d947d7d2..63d71c9dd 100644
--- a/lodash.repeat/package.json
+++ b/lodash.repeat/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.repeat",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.repeat` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.rest/README.md b/lodash.rest/README.md
index 5f1febeff..5342ca445 100644
--- a/lodash.rest/README.md
+++ b/lodash.rest/README.md
@@ -1,4 +1,4 @@
-# lodash.rest v4.0.2
+# lodash.rest v4.0.3
The [lodash](https://lodash.com/) method `_.rest` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var rest = require('lodash.rest');
```
-See the [documentation](https://lodash.com/docs#rest) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.rest) for more details.
+See the [documentation](https://lodash.com/docs#rest) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.rest) for more details.
diff --git a/lodash.rest/index.js b/lodash.rest/index.js
index cd5831b84..231578641 100644
--- a/lodash.rest/index.js
+++ b/lodash.rest/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors
* Released under MIT license
@@ -230,6 +230,41 @@ function isSymbol(value) {
(isObjectLike(value) && objectToString.call(value) == symbolTag);
}
+/**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+}
+
/**
* Converts `value` to an integer.
*
@@ -244,7 +279,7 @@ function isSymbol(value) {
* @returns {number} Returns the converted integer.
* @example
*
- * _.toInteger(3);
+ * _.toInteger(3.2);
* // => 3
*
* _.toInteger(Number.MIN_VALUE);
@@ -253,20 +288,14 @@ function isSymbol(value) {
* _.toInteger(Infinity);
* // => 1.7976931348623157e+308
*
- * _.toInteger('3');
+ * _.toInteger('3.2');
* // => 3
*/
function toInteger(value) {
- if (!value) {
- return value === 0 ? value : 0;
- }
- value = toNumber(value);
- if (value === INFINITY || value === -INFINITY) {
- var sign = (value < 0 ? -1 : 1);
- return sign * MAX_INTEGER;
- }
- var remainder = value % 1;
- return value === value ? (remainder ? value - remainder : value) : 0;
+ var result = toFinite(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
}
/**
@@ -280,8 +309,8 @@ function toInteger(value) {
* @returns {number} Returns the number.
* @example
*
- * _.toNumber(3);
- * // => 3
+ * _.toNumber(3.2);
+ * // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
@@ -289,8 +318,8 @@ function toInteger(value) {
* _.toNumber(Infinity);
* // => Infinity
*
- * _.toNumber('3');
- * // => 3
+ * _.toNumber('3.2');
+ * // => 3.2
*/
function toNumber(value) {
if (typeof value == 'number') {
diff --git a/lodash.rest/package.json b/lodash.rest/package.json
index 8a3b2eb90..50193acb2 100644
--- a/lodash.rest/package.json
+++ b/lodash.rest/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.rest",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.rest` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.round/README.md b/lodash.round/README.md
index eb40f7697..606d00aec 100644
--- a/lodash.round/README.md
+++ b/lodash.round/README.md
@@ -1,4 +1,4 @@
-# lodash.round v4.0.2
+# lodash.round v4.0.3
The [lodash](https://lodash.com/) method `_.round` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var round = require('lodash.round');
```
-See the [documentation](https://lodash.com/docs#round) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.round) for more details.
+See the [documentation](https://lodash.com/docs#round) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.round) for more details.
diff --git a/lodash.round/index.js b/lodash.round/index.js
index 157d31641..095433e21 100644
--- a/lodash.round/index.js
+++ b/lodash.round/index.js
@@ -6,7 +6,6 @@
* Based on Underscore.js 1.8.3
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
-var toString = require('lodash.tostring');
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0,
@@ -33,6 +32,15 @@ var reIsOctal = /^0o[0-7]+$/i;
/** Built-in method references without a dependency on `root`. */
var freeParseInt = parseInt;
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+
+/** Detect free variable `self`. */
+var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
+
+/** Used as a reference to the global object. */
+var root = freeGlobal || freeSelf || Function('return this')();
+
/** Used for built-in method references. */
var objectProto = Object.prototype;
@@ -43,6 +51,36 @@ var objectProto = Object.prototype;
*/
var objectToString = objectProto.toString;
+/** Built-in value references. */
+var Symbol = root.Symbol;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min;
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
+
+/**
+ * The base implementation of `_.toString` which doesn't convert nullish
+ * values to empty strings.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ */
+function baseToString(value) {
+ // Exit early for strings to avoid a performance hit in some environments.
+ if (typeof value == 'string') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return symbolToString ? symbolToString.call(value) : '';
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+}
+
/**
* Creates a function like `_.round`.
*
@@ -54,7 +92,7 @@ function createRound(methodName) {
var func = Math[methodName];
return function(number, precision) {
number = toNumber(number);
- precision = toInteger(precision);
+ precision = nativeMin(toInteger(precision), 292);
if (precision) {
// Shift with exponential notation to avoid floating-point issues.
// See [MDN](https://mdn.io/round#Examples) for more details.
@@ -76,8 +114,7 @@ function createRound(methodName) {
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
* @example
*
* _.isFunction(_);
@@ -160,8 +197,7 @@ function isObjectLike(value) {
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
* @example
*
* _.isSymbol(Symbol.iterator);
@@ -213,7 +249,7 @@ function toFinite(value) {
/**
* Converts `value` to an integer.
*
- * **Note:** This function is loosely based on
+ * **Note:** This method is loosely based on
* [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
*
* @static
@@ -287,6 +323,31 @@ function toNumber(value) {
: (reIsBadHex.test(value) ? NAN : +value);
}
+/**
+ * Converts `value` to a string. An empty string is returned for `null`
+ * and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+function toString(value) {
+ return value == null ? '' : baseToString(value);
+}
+
/**
* Computes `number` rounded to `precision`.
*
diff --git a/lodash.round/package.json b/lodash.round/package.json
index 70f9e4bcc..231c9fbfd 100644
--- a/lodash.round/package.json
+++ b/lodash.round/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.round",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.round` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -13,8 +13,5 @@
"Mathias Bynens (https://mathiasbynens.be/)"
],
"repository": "lodash/lodash",
- "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
- "dependencies": {
- "lodash.tostring": "^4.0.0"
- }
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
}
diff --git a/lodash.samplesize/README.md b/lodash.samplesize/README.md
index e4d772a52..ce181d537 100644
--- a/lodash.samplesize/README.md
+++ b/lodash.samplesize/README.md
@@ -1,4 +1,4 @@
-# lodash.samplesize v4.0.2
+# lodash.samplesize v4.0.3
The [lodash](https://lodash.com/) method `_.sampleSize` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var sampleSize = require('lodash.samplesize');
```
-See the [documentation](https://lodash.com/docs#sampleSize) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.samplesize) for more details.
+See the [documentation](https://lodash.com/docs#sampleSize) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.samplesize) for more details.
diff --git a/lodash.samplesize/index.js b/lodash.samplesize/index.js
index bc965fbc2..230aab7eb 100644
--- a/lodash.samplesize/index.js
+++ b/lodash.samplesize/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors
* Released under MIT license
@@ -10,6 +10,7 @@ var toArray = require('lodash.toarray');
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0,
+ MAX_SAFE_INTEGER = 9007199254740991,
MAX_INTEGER = 1.7976931348623157e+308,
NAN = 0 / 0;
@@ -30,14 +31,32 @@ var reIsBinary = /^0b[01]+$/i;
/** Used to detect octal string values. */
var reIsOctal = /^0o[0-7]+$/i;
+/** Used to detect unsigned integer values. */
+var reIsUint = /^(?:0|[1-9]\d*)$/;
+
/** Built-in method references without a dependency on `root`. */
var freeParseInt = parseInt;
+/**
+ * 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;
+}
+
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
@@ -67,6 +86,19 @@ function baseClamp(number, lower, upper) {
return number;
}
+/**
+ * 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];
+ };
+}
+
/**
* The base implementation of `_.random` without support for returning
* floating-point numbers.
@@ -80,6 +112,43 @@ function baseRandom(lower, upper) {
return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
}
+/**
+ * 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 the given 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)
+ ) {
+ return eq(object[index], value);
+ }
+ return false;
+}
+
/**
* Gets `n` random elements at unique keys from `collection` up to the
* size of `collection`.
@@ -89,7 +158,8 @@ function baseRandom(lower, upper) {
* @since 4.0.0
* @category Collection
* @param {Array|Object} collection The collection to sample.
- * @param {number} [n=0] The number of elements to sample.
+ * @param {number} [n=1] The number of elements to sample.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Array} Returns the random elements.
* @example
*
@@ -99,13 +169,17 @@ function baseRandom(lower, upper) {
* _.sampleSize([1, 2, 3], 4);
* // => [2, 3, 1]
*/
-function sampleSize(collection, n) {
+function sampleSize(collection, n, guard) {
var index = -1,
result = toArray(collection),
length = result.length,
lastIndex = length - 1;
- n = baseClamp(toInteger(n), 0, length);
+ if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
+ n = 1;
+ } else {
+ n = baseClamp(toInteger(n), 0, length);
+ }
while (++index < n) {
var rand = baseRandom(index, lastIndex),
value = result[rand];
@@ -117,6 +191,71 @@ function sampleSize(collection, n) {
return result;
}
+/**
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ * var other = { 'user': 'fred' };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
+ */
+function eq(value, other) {
+ return value === other || (value !== value && other !== other);
+}
+
+/**
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @example
+ *
+ * _.isArrayLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLike(document.body.children);
+ * // => true
+ *
+ * _.isArrayLike('abc');
+ * // => true
+ *
+ * _.isArrayLike(_.noop);
+ * // => false
+ */
+function isArrayLike(value) {
+ return value != null && isLength(getLength(value)) && !isFunction(value);
+}
+
/**
* Checks if `value` is classified as a `Function` object.
*
@@ -144,8 +283,41 @@ function isFunction(value) {
}
/**
- * 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('')`)
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This function is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length,
+ * else `false`.
+ * @example
+ *
+ * _.isLength(3);
+ * // => true
+ *
+ * _.isLength(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isLength(Infinity);
+ * // => false
+ *
+ * _.isLength('3');
+ * // => false
+ */
+function isLength(value) {
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+/**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
diff --git a/lodash.samplesize/package.json b/lodash.samplesize/package.json
index 0a8fb48cb..24c68396b 100644
--- a/lodash.samplesize/package.json
+++ b/lodash.samplesize/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.samplesize",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.sampleSize` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.size/LICENSE b/lodash.size/LICENSE
index b054ca5a3..bcbe13d67 100644
--- a/lodash.size/LICENSE
+++ b/lodash.size/LICENSE
@@ -1,22 +1,23 @@
+The MIT License (MIT)
+
Copyright 2012-2016 The Dojo Foundation
Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/lodash.size/README.md b/lodash.size/README.md
index 189f7f0b9..e514cd397 100644
--- a/lodash.size/README.md
+++ b/lodash.size/README.md
@@ -1,4 +1,4 @@
-# lodash.size v4.0.2
+# lodash.size v4.0.3
The [lodash](https://lodash.com/) method `_.size` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var size = require('lodash.size');
```
-See the [documentation](https://lodash.com/docs#size) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.size) for more details.
+See the [documentation](https://lodash.com/docs#size) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.size) for more details.
diff --git a/lodash.size/index.js b/lodash.size/index.js
index 920faa678..2824f6383 100644
--- a/lodash.size/index.js
+++ b/lodash.size/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -133,7 +133,7 @@ function size(collection) {
*
* @static
* @memberOf _
- * @type Function
+ * @type {Function}
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
@@ -160,7 +160,6 @@ var isArray = Array.isArray;
*
* @static
* @memberOf _
- * @type Function
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
@@ -232,7 +231,8 @@ function isFunction(value) {
* // => false
*/
function isLength(value) {
- return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
/**
diff --git a/lodash.size/package.json b/lodash.size/package.json
index 1e5b89771..77e048b59 100644
--- a/lodash.size/package.json
+++ b/lodash.size/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.size",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.size` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.slice/README.md b/lodash.slice/README.md
index b5aa27b91..d9c8fbce4 100644
--- a/lodash.slice/README.md
+++ b/lodash.slice/README.md
@@ -1,4 +1,4 @@
-# lodash.slice v4.0.2
+# lodash.slice v4.0.3
The [lodash](https://lodash.com/) method `_.slice` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var slice = require('lodash.slice');
```
-See the [documentation](https://lodash.com/docs#slice) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.slice) for more details.
+See the [documentation](https://lodash.com/docs#slice) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.slice) for more details.
diff --git a/lodash.slice/index.js b/lodash.slice/index.js
index 1f6f92436..006052b6f 100644
--- a/lodash.slice/index.js
+++ b/lodash.slice/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -195,8 +195,7 @@ function eq(value, other) {
* // => false
*/
function isArrayLike(value) {
- return value != null &&
- !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value));
+ return value != null && isLength(getLength(value)) && !isFunction(value);
}
/**
@@ -217,8 +216,8 @@ function isArrayLike(value) {
*/
function isFunction(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 8 which returns 'object' for typed array constructors, and
- // PhantomJS 1.9 which returns 'function' for `NodeList` instances.
+ // in Safari 8 which returns 'object' for typed array and weak map constructors,
+ // and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
var tag = isObject(value) ? objectToString.call(value) : '';
return tag == funcTag || tag == genTag;
}
diff --git a/lodash.slice/package.json b/lodash.slice/package.json
index 5620d3b7f..bb1d79e41 100644
--- a/lodash.slice/package.json
+++ b/lodash.slice/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.slice",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.slice` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -9,7 +9,7 @@
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
- "Blaine Bublitz (https://github.com/phated)",
+ "Blaine Bublitz (https://github.com/phated)",
"Mathias Bynens (https://mathiasbynens.be/)"
],
"repository": "lodash/lodash",
diff --git a/lodash.sortedindex/LICENSE b/lodash.sortedindex/LICENSE
index bcbe13d67..e0c69d560 100644
--- a/lodash.sortedindex/LICENSE
+++ b/lodash.sortedindex/LICENSE
@@ -1,23 +1,47 @@
-The MIT License (MIT)
+Copyright jQuery Foundation and other contributors
-Copyright 2012-2016 The Dojo Foundation
-Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
+Based on Underscore.js, copyright Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
+The following license applies to all parts of this software except as
+documented below:
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/lodash.sortedindex/README.md b/lodash.sortedindex/README.md
index 2b92712e9..b462e0912 100644
--- a/lodash.sortedindex/README.md
+++ b/lodash.sortedindex/README.md
@@ -1,4 +1,4 @@
-# lodash.sortedindex v4.0.2
+# lodash.sortedindex v4.0.3
The [lodash](https://lodash.com/) method `_.sortedIndex` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var sortedIndex = require('lodash.sortedindex');
```
-See the [documentation](https://lodash.com/docs#sortedIndex) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.sortedindex) for more details.
+See the [documentation](https://lodash.com/docs#sortedIndex) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.sortedindex) for more details.
diff --git a/lodash.sortedindex/index.js b/lodash.sortedindex/index.js
index 0ecfe0e28..e6f08efb8 100644
--- a/lodash.sortedindex/index.js
+++ b/lodash.sortedindex/index.js
@@ -1,10 +1,10 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
- * Copyright 2012-2016 The Dojo Foundation
+ * Copyright jQuery Foundation and other contributors
+ * Released under MIT license
* Based on Underscore.js 1.8.3
- * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
var baseSortedIndexBy = require('lodash._basesortedindexby');
@@ -12,6 +12,19 @@ var baseSortedIndexBy = require('lodash._basesortedindexby');
var MAX_ARRAY_LENGTH = 4294967295,
HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
+/** `Object#toString` result references. */
+var symbolTag = '[object Symbol]';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
/**
* The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
* performs a binary search of `array` to determine the index at which `value`
@@ -33,7 +46,8 @@ function baseSortedIndex(array, value, retHighest) {
var mid = (low + high) >>> 1,
computed = array[mid];
- if ((retHighest ? (computed <= value) : (computed < value)) && computed !== null) {
+ if (computed !== null && !isSymbol(computed) &&
+ (retHighest ? (computed <= value) : (computed < value))) {
low = mid + 1;
} else {
high = mid;
@@ -68,6 +82,57 @@ function sortedIndex(array, value) {
return baseSortedIndex(array, value);
}
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+}
+
/**
* This method returns the first argument given to it.
*
diff --git a/lodash.sortedindex/package.json b/lodash.sortedindex/package.json
index 1ec2cc6c0..30c35e7a5 100644
--- a/lodash.sortedindex/package.json
+++ b/lodash.sortedindex/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.sortedindex",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.sortedIndex` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.sortedindexby/README.md b/lodash.sortedindexby/README.md
index 2abd3b007..8a5787cd0 100644
--- a/lodash.sortedindexby/README.md
+++ b/lodash.sortedindexby/README.md
@@ -1,4 +1,4 @@
-# lodash.sortedindexby v4.0.2
+# lodash.sortedindexby v4.0.3
The [lodash](https://lodash.com/) method `_.sortedIndexBy` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var sortedIndexBy = require('lodash.sortedindexby');
```
-See the [documentation](https://lodash.com/docs#sortedIndexBy) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.sortedindexby) for more details.
+See the [documentation](https://lodash.com/docs#sortedIndexBy) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.sortedindexby) for more details.
diff --git a/lodash.sortedindexby/index.js b/lodash.sortedindexby/index.js
index 49a0bc891..f43098a81 100644
--- a/lodash.sortedindexby/index.js
+++ b/lodash.sortedindexby/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -31,8 +31,51 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
/** Used to match backslashes in property paths. */
var reEscapeChar = /\\(\\)?/g;
+/** Used to determine if values are of the language type `Object`. */
+var objectTypes = {
+ 'function': true,
+ 'object': true
+};
+
+/** Detect free variable `exports`. */
+var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;
+
+/** Detect free variable `module`. */
+var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;
+
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
+
+/** Detect free variable `self`. */
+var freeSelf = checkGlobal(objectTypes[typeof self] && self);
+
+/** Detect free variable `window`. */
+var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+
+/** Detect `this` as the global object. */
+var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
+
+/**
+ * Used as a reference to the global object.
+ *
+ * The `this` value is used if it's the global object to avoid Greasemonkey's
+ * restricted `window` object, otherwise the `window` object is used.
+ */
+var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
+
+/**
+ * Checks if `value` is a global object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {null|Object} Returns `value` if it's a global object, else `null`.
+ */
+function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
+}
+
/** Used for built-in method references. */
-var objectProto = global.Object.prototype;
+var objectProto = Object.prototype;
/**
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
@@ -41,7 +84,7 @@ var objectProto = global.Object.prototype;
var objectToString = objectProto.toString;
/** Built-in value references. */
-var Symbol = global.Symbol;
+var Symbol = root.Symbol;
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
@@ -251,7 +294,7 @@ function stringToPath(string) {
* _.sortedIndexBy(['thirty', 'fifty'], 'forty', _.propertyOf(dict));
* // => 1
*
- * // using the `_.property` iteratee shorthand
+ * // The `_.property` iteratee shorthand.
* _.sortedIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x');
* // => 0
*/
diff --git a/lodash.sortedindexby/package.json b/lodash.sortedindexby/package.json
index 2d45d010c..2c6845e48 100644
--- a/lodash.sortedindexby/package.json
+++ b/lodash.sortedindexby/package.json
@@ -1,11 +1,11 @@
{
"name": "lodash.sortedindexby",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.sortedIndexBy` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util, sortedindexby",
+ "keywords": "lodash-modularized, sortedindexby",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
diff --git a/lodash.sortedindexof/LICENSE b/lodash.sortedindexof/LICENSE
index bcbe13d67..e0c69d560 100644
--- a/lodash.sortedindexof/LICENSE
+++ b/lodash.sortedindexof/LICENSE
@@ -1,23 +1,47 @@
-The MIT License (MIT)
+Copyright jQuery Foundation and other contributors
-Copyright 2012-2016 The Dojo Foundation
-Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
+Based on Underscore.js, copyright Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
+The following license applies to all parts of this software except as
+documented below:
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/lodash.sortedindexof/README.md b/lodash.sortedindexof/README.md
index ce761d83a..23cc895bc 100644
--- a/lodash.sortedindexof/README.md
+++ b/lodash.sortedindexof/README.md
@@ -1,4 +1,4 @@
-# lodash.sortedindexof v4.0.2
+# lodash.sortedindexof v4.0.3
The [lodash](https://lodash.com/) method `_.sortedIndexOf` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var sortedIndexOf = require('lodash.sortedindexof');
```
-See the [documentation](https://lodash.com/docs#sortedIndexOf) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.sortedindexof) for more details.
+See the [documentation](https://lodash.com/docs#sortedIndexOf) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.sortedindexof) for more details.
diff --git a/lodash.sortedindexof/index.js b/lodash.sortedindexof/index.js
index 5cb961dc6..82b8ec92f 100644
--- a/lodash.sortedindexof/index.js
+++ b/lodash.sortedindexof/index.js
@@ -1,10 +1,10 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
- * Copyright 2012-2016 The Dojo Foundation
+ * Copyright jQuery Foundation and other contributors
+ * Released under MIT license
* Based on Underscore.js 1.8.3
- * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
var baseSortedIndexBy = require('lodash._basesortedindexby');
@@ -12,6 +12,19 @@ var baseSortedIndexBy = require('lodash._basesortedindexby');
var MAX_ARRAY_LENGTH = 4294967295,
HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
+/** `Object#toString` result references. */
+var symbolTag = '[object Symbol]';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
/**
* The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
* performs a binary search of `array` to determine the index at which `value`
@@ -33,7 +46,8 @@ function baseSortedIndex(array, value, retHighest) {
var mid = (low + high) >>> 1,
computed = array[mid];
- if ((retHighest ? (computed <= value) : (computed < value)) && computed !== null) {
+ if (computed !== null && !isSymbol(computed) &&
+ (retHighest ? (computed <= value) : (computed < value))) {
low = mid + 1;
} else {
high = mid;
@@ -107,6 +121,57 @@ function eq(value, other) {
return value === other || (value !== value && other !== other);
}
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+}
+
/**
* This method returns the first argument given to it.
*
diff --git a/lodash.sortedindexof/package.json b/lodash.sortedindexof/package.json
index 6c70f7c7e..3bf72998c 100644
--- a/lodash.sortedindexof/package.json
+++ b/lodash.sortedindexof/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.sortedindexof",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.sortedIndexOf` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.sortedlastindex/LICENSE b/lodash.sortedlastindex/LICENSE
index bcbe13d67..e0c69d560 100644
--- a/lodash.sortedlastindex/LICENSE
+++ b/lodash.sortedlastindex/LICENSE
@@ -1,23 +1,47 @@
-The MIT License (MIT)
+Copyright jQuery Foundation and other contributors
-Copyright 2012-2016 The Dojo Foundation
-Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
+Based on Underscore.js, copyright Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
+The following license applies to all parts of this software except as
+documented below:
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/lodash.sortedlastindex/README.md b/lodash.sortedlastindex/README.md
index 249dc76e9..49ffdf07e 100644
--- a/lodash.sortedlastindex/README.md
+++ b/lodash.sortedlastindex/README.md
@@ -1,4 +1,4 @@
-# lodash.sortedlastindex v4.0.2
+# lodash.sortedlastindex v4.0.3
The [lodash](https://lodash.com/) method `_.sortedLastIndex` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var sortedLastIndex = require('lodash.sortedlastindex');
```
-See the [documentation](https://lodash.com/docs#sortedLastIndex) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.sortedlastindex) for more details.
+See the [documentation](https://lodash.com/docs#sortedLastIndex) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.sortedlastindex) for more details.
diff --git a/lodash.sortedlastindex/index.js b/lodash.sortedlastindex/index.js
index f8b324a4f..a21650c9d 100644
--- a/lodash.sortedlastindex/index.js
+++ b/lodash.sortedlastindex/index.js
@@ -1,10 +1,10 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
- * Copyright 2012-2016 The Dojo Foundation
+ * Copyright jQuery Foundation and other contributors
+ * Released under MIT license
* Based on Underscore.js 1.8.3
- * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
var baseSortedIndexBy = require('lodash._basesortedindexby');
@@ -12,6 +12,19 @@ var baseSortedIndexBy = require('lodash._basesortedindexby');
var MAX_ARRAY_LENGTH = 4294967295,
HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
+/** `Object#toString` result references. */
+var symbolTag = '[object Symbol]';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
/**
* The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
* performs a binary search of `array` to determine the index at which `value`
@@ -33,7 +46,8 @@ function baseSortedIndex(array, value, retHighest) {
var mid = (low + high) >>> 1,
computed = array[mid];
- if ((retHighest ? (computed <= value) : (computed < value)) && computed !== null) {
+ if (computed !== null && !isSymbol(computed) &&
+ (retHighest ? (computed <= value) : (computed < value))) {
low = mid + 1;
} else {
high = mid;
@@ -66,6 +80,57 @@ function sortedLastIndex(array, value) {
return baseSortedIndex(array, value, true);
}
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+}
+
/**
* This method returns the first argument given to it.
*
diff --git a/lodash.sortedlastindex/package.json b/lodash.sortedlastindex/package.json
index 4e811da5b..a948cf412 100644
--- a/lodash.sortedlastindex/package.json
+++ b/lodash.sortedlastindex/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.sortedlastindex",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.sortedLastIndex` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.sortedlastindexby/README.md b/lodash.sortedlastindexby/README.md
index 9620be3bb..813a64abd 100644
--- a/lodash.sortedlastindexby/README.md
+++ b/lodash.sortedlastindexby/README.md
@@ -1,4 +1,4 @@
-# lodash.sortedlastindexby v4.0.2
+# lodash.sortedlastindexby v4.0.3
The [lodash](https://lodash.com/) method `_.sortedLastIndexBy` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var sortedLastIndexBy = require('lodash.sortedlastindexby');
```
-See the [documentation](https://lodash.com/docs#sortedLastIndexBy) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.sortedlastindexby) for more details.
+See the [documentation](https://lodash.com/docs#sortedLastIndexBy) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.sortedlastindexby) for more details.
diff --git a/lodash.sortedlastindexby/index.js b/lodash.sortedlastindexby/index.js
index 19bea0f25..d5b0af3e7 100644
--- a/lodash.sortedlastindexby/index.js
+++ b/lodash.sortedlastindexby/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -31,8 +31,51 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
/** Used to match backslashes in property paths. */
var reEscapeChar = /\\(\\)?/g;
+/** Used to determine if values are of the language type `Object`. */
+var objectTypes = {
+ 'function': true,
+ 'object': true
+};
+
+/** Detect free variable `exports`. */
+var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;
+
+/** Detect free variable `module`. */
+var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;
+
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
+
+/** Detect free variable `self`. */
+var freeSelf = checkGlobal(objectTypes[typeof self] && self);
+
+/** Detect free variable `window`. */
+var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+
+/** Detect `this` as the global object. */
+var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
+
+/**
+ * Used as a reference to the global object.
+ *
+ * The `this` value is used if it's the global object to avoid Greasemonkey's
+ * restricted `window` object, otherwise the `window` object is used.
+ */
+var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
+
+/**
+ * Checks if `value` is a global object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {null|Object} Returns `value` if it's a global object, else `null`.
+ */
+function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
+}
+
/** Used for built-in method references. */
-var objectProto = global.Object.prototype;
+var objectProto = Object.prototype;
/**
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
@@ -41,7 +84,7 @@ var objectProto = global.Object.prototype;
var objectToString = objectProto.toString;
/** Built-in value references. */
-var Symbol = global.Symbol;
+var Symbol = root.Symbol;
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
@@ -246,7 +289,7 @@ function stringToPath(string) {
* @returns {number} Returns the index at which `value` should be inserted into `array`.
* @example
*
- * // using the `_.property` iteratee shorthand
+ * // The `_.property` iteratee shorthand.
* _.sortedLastIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x');
* // => 1
*/
diff --git a/lodash.sortedlastindexby/package.json b/lodash.sortedlastindexby/package.json
index 438143049..27641a14c 100644
--- a/lodash.sortedlastindexby/package.json
+++ b/lodash.sortedlastindexby/package.json
@@ -1,11 +1,11 @@
{
"name": "lodash.sortedlastindexby",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.sortedLastIndexBy` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util, sortedlastindexby",
+ "keywords": "lodash-modularized, sortedlastindexby",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
diff --git a/lodash.sortedlastindexof/LICENSE b/lodash.sortedlastindexof/LICENSE
index bcbe13d67..e0c69d560 100644
--- a/lodash.sortedlastindexof/LICENSE
+++ b/lodash.sortedlastindexof/LICENSE
@@ -1,23 +1,47 @@
-The MIT License (MIT)
+Copyright jQuery Foundation and other contributors
-Copyright 2012-2016 The Dojo Foundation
-Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
+Based on Underscore.js, copyright Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
+The following license applies to all parts of this software except as
+documented below:
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/lodash.sortedlastindexof/README.md b/lodash.sortedlastindexof/README.md
index c0c877726..f280d85c8 100644
--- a/lodash.sortedlastindexof/README.md
+++ b/lodash.sortedlastindexof/README.md
@@ -1,4 +1,4 @@
-# lodash.sortedlastindexof v4.0.2
+# lodash.sortedlastindexof v4.0.3
The [lodash](https://lodash.com/) method `_.sortedLastIndexOf` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var sortedLastIndexOf = require('lodash.sortedlastindexof');
```
-See the [documentation](https://lodash.com/docs#sortedLastIndexOf) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.sortedlastindexof) for more details.
+See the [documentation](https://lodash.com/docs#sortedLastIndexOf) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.sortedlastindexof) for more details.
diff --git a/lodash.sortedlastindexof/index.js b/lodash.sortedlastindexof/index.js
index 35f539f8a..493fe137f 100644
--- a/lodash.sortedlastindexof/index.js
+++ b/lodash.sortedlastindexof/index.js
@@ -1,10 +1,10 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
- * Copyright 2012-2016 The Dojo Foundation
+ * Copyright jQuery Foundation and other contributors
+ * Released under MIT license
* Based on Underscore.js 1.8.3
- * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
var baseSortedIndexBy = require('lodash._basesortedindexby');
@@ -12,6 +12,19 @@ var baseSortedIndexBy = require('lodash._basesortedindexby');
var MAX_ARRAY_LENGTH = 4294967295,
HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
+/** `Object#toString` result references. */
+var symbolTag = '[object Symbol]';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
/**
* The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
* performs a binary search of `array` to determine the index at which `value`
@@ -33,7 +46,8 @@ function baseSortedIndex(array, value, retHighest) {
var mid = (low + high) >>> 1,
computed = array[mid];
- if ((retHighest ? (computed <= value) : (computed < value)) && computed !== null) {
+ if (computed !== null && !isSymbol(computed) &&
+ (retHighest ? (computed <= value) : (computed < value))) {
low = mid + 1;
} else {
high = mid;
@@ -107,6 +121,57 @@ function eq(value, other) {
return value === other || (value !== value && other !== other);
}
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+}
+
/**
* This method returns the first argument given to it.
*
diff --git a/lodash.sortedlastindexof/package.json b/lodash.sortedlastindexof/package.json
index 27766083f..1311df33a 100644
--- a/lodash.sortedlastindexof/package.json
+++ b/lodash.sortedlastindexof/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.sortedlastindexof",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.sortedLastIndexOf` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.sorteduniqby/README.md b/lodash.sorteduniqby/README.md
index 16cc7b17c..8e7cf1363 100644
--- a/lodash.sorteduniqby/README.md
+++ b/lodash.sorteduniqby/README.md
@@ -1,4 +1,4 @@
-# lodash.sorteduniqby v4.0.2
+# lodash.sorteduniqby v4.0.3
The [lodash](https://lodash.com/) method `_.sortedUniqBy` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var sortedUniqBy = require('lodash.sorteduniqby');
```
-See the [documentation](https://lodash.com/docs#sortedUniqBy) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.sorteduniqby) for more details.
+See the [documentation](https://lodash.com/docs#sortedUniqBy) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.sorteduniqby) for more details.
diff --git a/lodash.sorteduniqby/index.js b/lodash.sorteduniqby/index.js
index 0bf732b20..7e04afc33 100644
--- a/lodash.sorteduniqby/index.js
+++ b/lodash.sorteduniqby/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -31,8 +31,51 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
/** Used to match backslashes in property paths. */
var reEscapeChar = /\\(\\)?/g;
+/** Used to determine if values are of the language type `Object`. */
+var objectTypes = {
+ 'function': true,
+ 'object': true
+};
+
+/** Detect free variable `exports`. */
+var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;
+
+/** Detect free variable `module`. */
+var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;
+
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
+
+/** Detect free variable `self`. */
+var freeSelf = checkGlobal(objectTypes[typeof self] && self);
+
+/** Detect free variable `window`. */
+var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+
+/** Detect `this` as the global object. */
+var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
+
+/**
+ * Used as a reference to the global object.
+ *
+ * The `this` value is used if it's the global object to avoid Greasemonkey's
+ * restricted `window` object, otherwise the `window` object is used.
+ */
+var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
+
+/**
+ * Checks if `value` is a global object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {null|Object} Returns `value` if it's a global object, else `null`.
+ */
+function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
+}
+
/** Used for built-in method references. */
-var objectProto = global.Object.prototype;
+var objectProto = Object.prototype;
/**
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
@@ -41,7 +84,7 @@ var objectProto = global.Object.prototype;
var objectToString = objectProto.toString;
/** Built-in value references. */
-var Symbol = global.Symbol;
+var Symbol = root.Symbol;
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
@@ -245,7 +288,7 @@ function stringToPath(string) {
* @example
*
* _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
- * // => [1.1, 2.2]
+ * // => [1.1, 2.3]
*/
function sortedUniqBy(array, iteratee) {
return (array && array.length)
diff --git a/lodash.sorteduniqby/package.json b/lodash.sorteduniqby/package.json
index a2c7f2d9f..a107f79a5 100644
--- a/lodash.sorteduniqby/package.json
+++ b/lodash.sorteduniqby/package.json
@@ -1,11 +1,11 @@
{
"name": "lodash.sorteduniqby",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.sortedUniqBy` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util, sorteduniqby",
+ "keywords": "lodash-modularized, sorteduniqby",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
diff --git a/lodash.sumby/README.md b/lodash.sumby/README.md
index 92364c3ac..9986d7551 100644
--- a/lodash.sumby/README.md
+++ b/lodash.sumby/README.md
@@ -1,4 +1,4 @@
-# lodash.sumby v4.0.2
+# lodash.sumby v4.0.3
The [lodash](https://lodash.com/) method `_.sumBy` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var sumBy = require('lodash.sumby');
```
-See the [documentation](https://lodash.com/docs#sumBy) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.sumby) for more details.
+See the [documentation](https://lodash.com/docs#sumBy) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.sumby) for more details.
diff --git a/lodash.sumby/index.js b/lodash.sumby/index.js
index 570615b57..4b7cccb8c 100644
--- a/lodash.sumby/index.js
+++ b/lodash.sumby/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -30,6 +30,38 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
/** Used to match backslashes in property paths. */
var reEscapeChar = /\\(\\)?/g;
+/** Used to determine if values are of the language type `Object`. */
+var objectTypes = {
+ 'function': true,
+ 'object': true
+};
+
+/** Detect free variable `exports`. */
+var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;
+
+/** Detect free variable `module`. */
+var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;
+
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
+
+/** Detect free variable `self`. */
+var freeSelf = checkGlobal(objectTypes[typeof self] && self);
+
+/** Detect free variable `window`. */
+var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+
+/** Detect `this` as the global object. */
+var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
+
+/**
+ * Used as a reference to the global object.
+ *
+ * The `this` value is used if it's the global object to avoid Greasemonkey's
+ * restricted `window` object, otherwise the `window` object is used.
+ */
+var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
+
/**
* The base implementation of `_.sum` without support for iteratee shorthands.
*
@@ -49,11 +81,22 @@ function baseSum(array, iteratee) {
result = result === undefined ? current : (result + current);
}
}
- return length ? result : 0;
+ return result;
+}
+
+/**
+ * Checks if `value` is a global object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {null|Object} Returns `value` if it's a global object, else `null`.
+ */
+function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
}
/** Used for built-in method references. */
-var objectProto = global.Object.prototype;
+var objectProto = Object.prototype;
/**
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
@@ -62,7 +105,7 @@ var objectProto = global.Object.prototype;
var objectToString = objectProto.toString;
/** Built-in value references. */
-var Symbol = global.Symbol;
+var Symbol = root.Symbol;
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
@@ -451,7 +494,7 @@ function property(path) {
* _.sumBy(objects, function(o) { return o.n; });
* // => 20
*
- * // using the `_.property` iteratee shorthand
+ * // The `_.property` iteratee shorthand.
* _.sumBy(objects, 'n');
* // => 20
*/
diff --git a/lodash.sumby/package.json b/lodash.sumby/package.json
index 5aec93cee..50c27c21b 100644
--- a/lodash.sumby/package.json
+++ b/lodash.sumby/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.sumby",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.sumBy` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.tail/LICENSE b/lodash.tail/LICENSE
index bcbe13d67..e0c69d560 100644
--- a/lodash.tail/LICENSE
+++ b/lodash.tail/LICENSE
@@ -1,23 +1,47 @@
-The MIT License (MIT)
+Copyright jQuery Foundation and other contributors
-Copyright 2012-2016 The Dojo Foundation
-Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
+Based on Underscore.js, copyright Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
+The following license applies to all parts of this software except as
+documented below:
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/lodash.tail/README.md b/lodash.tail/README.md
index fb3312169..619676372 100644
--- a/lodash.tail/README.md
+++ b/lodash.tail/README.md
@@ -1,4 +1,4 @@
-# lodash.tail v4.0.2
+# lodash.tail v4.0.3
The [lodash](https://lodash.com/) method `_.tail` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var tail = require('lodash.tail');
```
-See the [documentation](https://lodash.com/docs#tail) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.tail) for more details.
+See the [documentation](https://lodash.com/docs#tail) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.tail) for more details.
diff --git a/lodash.tail/index.js b/lodash.tail/index.js
index 7be4ba190..86bd24995 100644
--- a/lodash.tail/index.js
+++ b/lodash.tail/index.js
@@ -1,10 +1,10 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
- * Copyright 2012-2016 The Dojo Foundation
+ * Copyright jQuery Foundation and other contributors
+ * Released under MIT license
* Based on Underscore.js 1.8.3
- * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
var baseSlice = require('lodash._baseslice');
@@ -15,7 +15,8 @@ var INFINITY = 1 / 0,
/** `Object#toString` result references. */
var funcTag = '[object Function]',
- genTag = '[object GeneratorFunction]';
+ genTag = '[object GeneratorFunction]',
+ symbolTag = '[object Symbol]';
/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g;
@@ -36,7 +37,8 @@ var freeParseInt = parseInt;
var objectProto = Object.prototype;
/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
@@ -46,10 +48,11 @@ var objectToString = objectProto.toString;
*
* @static
* @memberOf _
+ * @since 0.5.0
* @category Array
* @param {Array} array The array to query.
* @param {number} [n=1] The number of elements to drop.
- * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Array} Returns the slice of `array`.
* @example
*
@@ -79,6 +82,7 @@ function drop(array, n, guard) {
*
* @static
* @memberOf _
+ * @since 4.0.0
* @category Array
* @param {Array} array The array to query.
* @returns {Array} Returns the slice of `array`.
@@ -96,9 +100,11 @@ function tail(array) {
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
* @example
*
* _.isFunction(_);
@@ -116,11 +122,13 @@ function isFunction(value) {
}
/**
- * 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('')`)
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
@@ -144,12 +152,65 @@ function isObject(value) {
}
/**
- * Converts `value` to an integer.
- *
- * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
*
* @static
* @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+}
+
+/**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This function is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted integer.
@@ -185,6 +246,7 @@ function toInteger(value) {
*
* @static
* @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to process.
* @returns {number} Returns the number.
@@ -203,6 +265,12 @@ function toInteger(value) {
* // => 3
*/
function toNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
if (isObject(value)) {
var other = isFunction(value.valueOf) ? value.valueOf() : value;
value = isObject(other) ? (other + '') : other;
diff --git a/lodash.tail/package.json b/lodash.tail/package.json
index 17c42d97f..a8afd45d3 100644
--- a/lodash.tail/package.json
+++ b/lodash.tail/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.tail",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.tail` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.take/LICENSE b/lodash.take/LICENSE
index bcbe13d67..e0c69d560 100644
--- a/lodash.take/LICENSE
+++ b/lodash.take/LICENSE
@@ -1,23 +1,47 @@
-The MIT License (MIT)
+Copyright jQuery Foundation and other contributors
-Copyright 2012-2016 The Dojo Foundation
-Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
+Based on Underscore.js, copyright Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
+The following license applies to all parts of this software except as
+documented below:
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/lodash.take/README.md b/lodash.take/README.md
index c3052e5b6..fa63e98ba 100644
--- a/lodash.take/README.md
+++ b/lodash.take/README.md
@@ -1,4 +1,4 @@
-# lodash.take v4.0.2
+# lodash.take v4.0.3
The [lodash](https://lodash.com/) method `_.take` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var take = require('lodash.take');
```
-See the [documentation](https://lodash.com/docs#take) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.take) for more details.
+See the [documentation](https://lodash.com/docs#take) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.take) for more details.
diff --git a/lodash.take/index.js b/lodash.take/index.js
index cd571f569..7c60a3435 100644
--- a/lodash.take/index.js
+++ b/lodash.take/index.js
@@ -1,10 +1,10 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
- * Copyright 2012-2016 The Dojo Foundation
+ * Copyright jQuery Foundation and other contributors
+ * Released under MIT license
* Based on Underscore.js 1.8.3
- * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
var baseSlice = require('lodash._baseslice');
@@ -15,7 +15,8 @@ var INFINITY = 1 / 0,
/** `Object#toString` result references. */
var funcTag = '[object Function]',
- genTag = '[object GeneratorFunction]';
+ genTag = '[object GeneratorFunction]',
+ symbolTag = '[object Symbol]';
/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g;
@@ -36,7 +37,8 @@ var freeParseInt = parseInt;
var objectProto = Object.prototype;
/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
@@ -46,10 +48,11 @@ var objectToString = objectProto.toString;
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Array
* @param {Array} array The array to query.
* @param {number} [n=1] The number of elements to take.
- * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Array} Returns the slice of `array`.
* @example
*
@@ -78,9 +81,11 @@ function take(array, n, guard) {
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
* @example
*
* _.isFunction(_);
@@ -98,11 +103,13 @@ function isFunction(value) {
}
/**
- * 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('')`)
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
@@ -126,12 +133,65 @@ function isObject(value) {
}
/**
- * Converts `value` to an integer.
- *
- * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
*
* @static
* @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+}
+
+/**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This function is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted integer.
@@ -167,6 +227,7 @@ function toInteger(value) {
*
* @static
* @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to process.
* @returns {number} Returns the number.
@@ -185,6 +246,12 @@ function toInteger(value) {
* // => 3
*/
function toNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
if (isObject(value)) {
var other = isFunction(value.valueOf) ? value.valueOf() : value;
value = isObject(other) ? (other + '') : other;
diff --git a/lodash.take/package.json b/lodash.take/package.json
index 00425891a..b44e98e69 100644
--- a/lodash.take/package.json
+++ b/lodash.take/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.take",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.take` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.takeright/LICENSE b/lodash.takeright/LICENSE
index bcbe13d67..e0c69d560 100644
--- a/lodash.takeright/LICENSE
+++ b/lodash.takeright/LICENSE
@@ -1,23 +1,47 @@
-The MIT License (MIT)
+Copyright jQuery Foundation and other contributors
-Copyright 2012-2016 The Dojo Foundation
-Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
+Based on Underscore.js, copyright Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
+The following license applies to all parts of this software except as
+documented below:
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/lodash.takeright/README.md b/lodash.takeright/README.md
index a51ce2cf0..66ce50c93 100644
--- a/lodash.takeright/README.md
+++ b/lodash.takeright/README.md
@@ -1,4 +1,4 @@
-# lodash.takeright v4.0.2
+# lodash.takeright v4.0.3
The [lodash](https://lodash.com/) method `_.takeRight` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var takeRight = require('lodash.takeright');
```
-See the [documentation](https://lodash.com/docs#takeRight) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.takeright) for more details.
+See the [documentation](https://lodash.com/docs#takeRight) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.takeright) for more details.
diff --git a/lodash.takeright/index.js b/lodash.takeright/index.js
index af2be0eab..5e938b269 100644
--- a/lodash.takeright/index.js
+++ b/lodash.takeright/index.js
@@ -1,10 +1,10 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
- * Copyright 2012-2016 The Dojo Foundation
+ * Copyright jQuery Foundation and other contributors
+ * Released under MIT license
* Based on Underscore.js 1.8.3
- * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
var baseSlice = require('lodash._baseslice');
@@ -15,7 +15,8 @@ var INFINITY = 1 / 0,
/** `Object#toString` result references. */
var funcTag = '[object Function]',
- genTag = '[object GeneratorFunction]';
+ genTag = '[object GeneratorFunction]',
+ symbolTag = '[object Symbol]';
/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g;
@@ -36,7 +37,8 @@ var freeParseInt = parseInt;
var objectProto = Object.prototype;
/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
@@ -46,10 +48,11 @@ var objectToString = objectProto.toString;
*
* @static
* @memberOf _
+ * @since 3.0.0
* @category Array
* @param {Array} array The array to query.
* @param {number} [n=1] The number of elements to take.
- * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Array} Returns the slice of `array`.
* @example
*
@@ -80,9 +83,11 @@ function takeRight(array, n, guard) {
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
* @example
*
* _.isFunction(_);
@@ -100,11 +105,13 @@ function isFunction(value) {
}
/**
- * 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('')`)
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
@@ -128,12 +135,65 @@ function isObject(value) {
}
/**
- * Converts `value` to an integer.
- *
- * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
*
* @static
* @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+}
+
+/**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This function is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted integer.
@@ -169,6 +229,7 @@ function toInteger(value) {
*
* @static
* @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to process.
* @returns {number} Returns the number.
@@ -187,6 +248,12 @@ function toInteger(value) {
* // => 3
*/
function toNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
if (isObject(value)) {
var other = isFunction(value.valueOf) ? value.valueOf() : value;
value = isObject(other) ? (other + '') : other;
diff --git a/lodash.takeright/package.json b/lodash.takeright/package.json
index b9ae8d097..0d319d438 100644
--- a/lodash.takeright/package.json
+++ b/lodash.takeright/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.takeright",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.takeRight` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.tointeger/README.md b/lodash.tointeger/README.md
index 2fb865ceb..91f1e55c0 100644
--- a/lodash.tointeger/README.md
+++ b/lodash.tointeger/README.md
@@ -1,4 +1,4 @@
-# lodash.tointeger v4.0.2
+# lodash.tointeger v4.0.3
The [lodash](https://lodash.com/) method `_.toInteger` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var toInteger = require('lodash.tointeger');
```
-See the [documentation](https://lodash.com/docs#toInteger) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.tointeger) for more details.
+See the [documentation](https://lodash.com/docs#toInteger) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.tointeger) for more details.
diff --git a/lodash.tointeger/index.js b/lodash.tointeger/index.js
index 3553d7691..f0a900935 100644
--- a/lodash.tointeger/index.js
+++ b/lodash.tointeger/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors
* Released under MIT license
@@ -50,8 +50,7 @@ var objectToString = objectProto.toString;
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
* @example
*
* _.isFunction(_);
@@ -134,8 +133,7 @@ function isObjectLike(value) {
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
* @example
*
* _.isSymbol(Symbol.iterator);
@@ -149,10 +147,45 @@ function isSymbol(value) {
(isObjectLike(value) && objectToString.call(value) == symbolTag);
}
+/**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+}
+
/**
* Converts `value` to an integer.
*
- * **Note:** This function is loosely based on
+ * **Note:** This method is loosely based on
* [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
*
* @static
@@ -163,7 +196,7 @@ function isSymbol(value) {
* @returns {number} Returns the converted integer.
* @example
*
- * _.toInteger(3);
+ * _.toInteger(3.2);
* // => 3
*
* _.toInteger(Number.MIN_VALUE);
@@ -172,20 +205,14 @@ function isSymbol(value) {
* _.toInteger(Infinity);
* // => 1.7976931348623157e+308
*
- * _.toInteger('3');
+ * _.toInteger('3.2');
* // => 3
*/
function toInteger(value) {
- if (!value) {
- return value === 0 ? value : 0;
- }
- value = toNumber(value);
- if (value === INFINITY || value === -INFINITY) {
- var sign = (value < 0 ? -1 : 1);
- return sign * MAX_INTEGER;
- }
- var remainder = value % 1;
- return value === value ? (remainder ? value - remainder : value) : 0;
+ var result = toFinite(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
}
/**
@@ -199,8 +226,8 @@ function toInteger(value) {
* @returns {number} Returns the number.
* @example
*
- * _.toNumber(3);
- * // => 3
+ * _.toNumber(3.2);
+ * // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
@@ -208,8 +235,8 @@ function toInteger(value) {
* _.toNumber(Infinity);
* // => Infinity
*
- * _.toNumber('3');
- * // => 3
+ * _.toNumber('3.2');
+ * // => 3.2
*/
function toNumber(value) {
if (typeof value == 'number') {
diff --git a/lodash.tointeger/package.json b/lodash.tointeger/package.json
index ca3818dd2..e453d3373 100644
--- a/lodash.tointeger/package.json
+++ b/lodash.tointeger/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.tointeger",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.toInteger` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.tolength/README.md b/lodash.tolength/README.md
index 784987d06..9fedd699c 100644
--- a/lodash.tolength/README.md
+++ b/lodash.tolength/README.md
@@ -1,4 +1,4 @@
-# lodash.tolength v4.0.2
+# lodash.tolength v4.0.3
The [lodash](https://lodash.com/) method `_.toLength` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var toLength = require('lodash.tolength');
```
-See the [documentation](https://lodash.com/docs#toLength) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.tolength) for more details.
+See the [documentation](https://lodash.com/docs#toLength) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.tolength) for more details.
diff --git a/lodash.tolength/index.js b/lodash.tolength/index.js
index aa44ff83b..cef24cc71 100644
--- a/lodash.tolength/index.js
+++ b/lodash.tolength/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors
* Released under MIT license
@@ -46,7 +46,7 @@ var objectProto = Object.prototype;
var objectToString = objectProto.toString;
/**
- * The base implementation of `_.clamp` which doesn't coerce arguments to numbers.
+ * The base implementation of `_.clamp` which doesn't coerce arguments.
*
* @private
* @param {number} number The number to clamp.
@@ -74,8 +74,7 @@ function baseClamp(number, lower, upper) {
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
* @example
*
* _.isFunction(_);
@@ -158,8 +157,7 @@ function isObjectLike(value) {
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
* @example
*
* _.isSymbol(Symbol.iterator);
@@ -173,10 +171,45 @@ function isSymbol(value) {
(isObjectLike(value) && objectToString.call(value) == symbolTag);
}
+/**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+}
+
/**
* Converts `value` to an integer.
*
- * **Note:** This function is loosely based on
+ * **Note:** This method is loosely based on
* [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
*
* @static
@@ -187,7 +220,7 @@ function isSymbol(value) {
* @returns {number} Returns the converted integer.
* @example
*
- * _.toInteger(3);
+ * _.toInteger(3.2);
* // => 3
*
* _.toInteger(Number.MIN_VALUE);
@@ -196,20 +229,14 @@ function isSymbol(value) {
* _.toInteger(Infinity);
* // => 1.7976931348623157e+308
*
- * _.toInteger('3');
+ * _.toInteger('3.2');
* // => 3
*/
function toInteger(value) {
- if (!value) {
- return value === 0 ? value : 0;
- }
- value = toNumber(value);
- if (value === INFINITY || value === -INFINITY) {
- var sign = (value < 0 ? -1 : 1);
- return sign * MAX_INTEGER;
- }
- var remainder = value % 1;
- return value === value ? (remainder ? value - remainder : value) : 0;
+ var result = toFinite(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
}
/**
@@ -227,7 +254,7 @@ function toInteger(value) {
* @returns {number} Returns the converted integer.
* @example
*
- * _.toLength(3);
+ * _.toLength(3.2);
* // => 3
*
* _.toLength(Number.MIN_VALUE);
@@ -236,7 +263,7 @@ function toInteger(value) {
* _.toLength(Infinity);
* // => 4294967295
*
- * _.toLength('3');
+ * _.toLength('3.2');
* // => 3
*/
function toLength(value) {
@@ -254,8 +281,8 @@ function toLength(value) {
* @returns {number} Returns the number.
* @example
*
- * _.toNumber(3);
- * // => 3
+ * _.toNumber(3.2);
+ * // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
@@ -263,8 +290,8 @@ function toLength(value) {
* _.toNumber(Infinity);
* // => Infinity
*
- * _.toNumber('3');
- * // => 3
+ * _.toNumber('3.2');
+ * // => 3.2
*/
function toNumber(value) {
if (typeof value == 'number') {
diff --git a/lodash.tolength/package.json b/lodash.tolength/package.json
index c9a7d3c4e..fad83516a 100644
--- a/lodash.tolength/package.json
+++ b/lodash.tolength/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.tolength",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.toLength` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.tonumber/README.md b/lodash.tonumber/README.md
index 228bc7672..4834bb913 100644
--- a/lodash.tonumber/README.md
+++ b/lodash.tonumber/README.md
@@ -1,4 +1,4 @@
-# lodash.tonumber v4.0.2
+# lodash.tonumber v4.0.3
The [lodash](https://lodash.com/) method `_.toNumber` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var toNumber = require('lodash.tonumber');
```
-See the [documentation](https://lodash.com/docs#toNumber) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.tonumber) for more details.
+See the [documentation](https://lodash.com/docs#toNumber) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.tonumber) for more details.
diff --git a/lodash.tonumber/index.js b/lodash.tonumber/index.js
index 60eb799d5..c82271074 100644
--- a/lodash.tonumber/index.js
+++ b/lodash.tonumber/index.js
@@ -11,9 +11,7 @@
var NAN = 0 / 0;
/** `Object#toString` result references. */
-var funcTag = '[object Function]',
- genTag = '[object GeneratorFunction]',
- symbolTag = '[object Symbol]';
+var symbolTag = '[object Symbol]';
/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g;
@@ -35,39 +33,14 @@ var objectProto = Object.prototype;
/**
* Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
-/**
- * Checks if `value` is classified as a `Function` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
- * @example
- *
- * _.isFunction(_);
- * // => true
- *
- * _.isFunction(/abc/);
- * // => false
- */
-function isFunction(value) {
- // The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 8 which returns 'object' for typed array and weak map constructors,
- // and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
- var tag = isObject(value) ? objectToString.call(value) : '';
- return tag == funcTag || tag == genTag;
-}
-
/**
* Checks if `value` is the
- * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
@@ -176,7 +149,7 @@ function toNumber(value) {
return NAN;
}
if (isObject(value)) {
- var other = isFunction(value.valueOf) ? value.valueOf() : value;
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
value = isObject(other) ? (other + '') : other;
}
if (typeof value != 'string') {
diff --git a/lodash.tonumber/package.json b/lodash.tonumber/package.json
index 78414b2c8..afdb6383d 100644
--- a/lodash.tonumber/package.json
+++ b/lodash.tonumber/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.tonumber",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.toNumber` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.toplainobject/README.md b/lodash.toplainobject/README.md
index 0d98365a3..2d844eaf9 100644
--- a/lodash.toplainobject/README.md
+++ b/lodash.toplainobject/README.md
@@ -1,4 +1,4 @@
-# lodash.toplainobject v4.0.2
+# lodash.toplainobject v4.0.3
The [lodash](https://lodash.com/) method `_.toPlainObject` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var toPlainObject = require('lodash.toplainobject');
```
-See the [documentation](https://lodash.com/docs#toPlainObject) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.toplainobject) for more details.
+See the [documentation](https://lodash.com/docs#toPlainObject) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.toplainobject) for more details.
diff --git a/lodash.toplainobject/index.js b/lodash.toplainobject/index.js
index b466083fc..86fc04b26 100644
--- a/lodash.toplainobject/index.js
+++ b/lodash.toplainobject/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -26,8 +26,7 @@ var hasOwnProperty = objectProto.hasOwnProperty;
*/
function assignValue(object, key, value) {
var objValue = object[key];
- if ((!eq(objValue, value) ||
- (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) ||
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
(value === undefined && !(key in object))) {
object[key] = value;
}
@@ -38,7 +37,7 @@ function assignValue(object, key, value) {
*
* @private
* @param {Object} source The object to copy properties from.
- * @param {Array} props The property names to copy.
+ * @param {Array} props The property identifiers to copy.
* @param {Object} [object={}] The object to copy properties to.
* @returns {Object} Returns `object`.
*/
@@ -52,7 +51,7 @@ function copyObject(source, props, object) {
*
* @private
* @param {Object} source The object to copy properties from.
- * @param {Array} props The property names to copy.
+ * @param {Array} props The property identifiers to copy.
* @param {Object} [object={}] The object to copy properties to.
* @param {Function} [customizer] The function to customize copied values.
* @returns {Object} Returns `object`.
@@ -76,11 +75,13 @@ function copyObjectWith(source, props, object, customizer) {
}
/**
- * Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* comparison between two values to determine if they are equivalent.
*
* @static
* @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
@@ -110,11 +111,12 @@ function eq(value, other) {
}
/**
- * Converts `value` to a plain object flattening inherited enumerable
- * properties of `value` to own properties of the plain object.
+ * Converts `value` to a plain object flattening inherited enumerable string
+ * keyed properties of `value` to own properties of the plain object.
*
* @static
* @memberOf _
+ * @since 3.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {Object} Returns the converted plain object.
diff --git a/lodash.toplainobject/package.json b/lodash.toplainobject/package.json
index b80e66128..54f8cc1db 100644
--- a/lodash.toplainobject/package.json
+++ b/lodash.toplainobject/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.toplainobject",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.toPlainObject` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.tosafeinteger/README.md b/lodash.tosafeinteger/README.md
index f9eecac50..6ad231903 100644
--- a/lodash.tosafeinteger/README.md
+++ b/lodash.tosafeinteger/README.md
@@ -1,4 +1,4 @@
-# lodash.tosafeinteger v4.0.2
+# lodash.tosafeinteger v4.0.3
The [lodash](https://lodash.com/) method `_.toSafeInteger` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var toSafeInteger = require('lodash.tosafeinteger');
```
-See the [documentation](https://lodash.com/docs#toSafeInteger) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.tosafeinteger) for more details.
+See the [documentation](https://lodash.com/docs#toSafeInteger) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.tosafeinteger) for more details.
diff --git a/lodash.tosafeinteger/index.js b/lodash.tosafeinteger/index.js
index 526dc3d51..13298b2bf 100644
--- a/lodash.tosafeinteger/index.js
+++ b/lodash.tosafeinteger/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors
* Released under MIT license
@@ -44,7 +44,7 @@ var objectProto = Object.prototype;
var objectToString = objectProto.toString;
/**
- * The base implementation of `_.clamp` which doesn't coerce arguments to numbers.
+ * The base implementation of `_.clamp` which doesn't coerce arguments.
*
* @private
* @param {number} number The number to clamp.
@@ -72,8 +72,7 @@ function baseClamp(number, lower, upper) {
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
* @example
*
* _.isFunction(_);
@@ -156,8 +155,7 @@ function isObjectLike(value) {
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
* @example
*
* _.isSymbol(Symbol.iterator);
@@ -171,10 +169,45 @@ function isSymbol(value) {
(isObjectLike(value) && objectToString.call(value) == symbolTag);
}
+/**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+}
+
/**
* Converts `value` to an integer.
*
- * **Note:** This function is loosely based on
+ * **Note:** This method is loosely based on
* [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
*
* @static
@@ -185,7 +218,7 @@ function isSymbol(value) {
* @returns {number} Returns the converted integer.
* @example
*
- * _.toInteger(3);
+ * _.toInteger(3.2);
* // => 3
*
* _.toInteger(Number.MIN_VALUE);
@@ -194,20 +227,14 @@ function isSymbol(value) {
* _.toInteger(Infinity);
* // => 1.7976931348623157e+308
*
- * _.toInteger('3');
+ * _.toInteger('3.2');
* // => 3
*/
function toInteger(value) {
- if (!value) {
- return value === 0 ? value : 0;
- }
- value = toNumber(value);
- if (value === INFINITY || value === -INFINITY) {
- var sign = (value < 0 ? -1 : 1);
- return sign * MAX_INTEGER;
- }
- var remainder = value % 1;
- return value === value ? (remainder ? value - remainder : value) : 0;
+ var result = toFinite(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
}
/**
@@ -221,8 +248,8 @@ function toInteger(value) {
* @returns {number} Returns the number.
* @example
*
- * _.toNumber(3);
- * // => 3
+ * _.toNumber(3.2);
+ * // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
@@ -230,8 +257,8 @@ function toInteger(value) {
* _.toNumber(Infinity);
* // => Infinity
*
- * _.toNumber('3');
- * // => 3
+ * _.toNumber('3.2');
+ * // => 3.2
*/
function toNumber(value) {
if (typeof value == 'number') {
@@ -266,7 +293,7 @@ function toNumber(value) {
* @returns {number} Returns the converted integer.
* @example
*
- * _.toSafeInteger(3);
+ * _.toSafeInteger(3.2);
* // => 3
*
* _.toSafeInteger(Number.MIN_VALUE);
@@ -275,7 +302,7 @@ function toNumber(value) {
* _.toSafeInteger(Infinity);
* // => 9007199254740991
*
- * _.toSafeInteger('3');
+ * _.toSafeInteger('3.2');
* // => 3
*/
function toSafeInteger(value) {
diff --git a/lodash.tosafeinteger/package.json b/lodash.tosafeinteger/package.json
index 5a828a52c..be4e6c0cb 100644
--- a/lodash.tosafeinteger/package.json
+++ b/lodash.tosafeinteger/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.tosafeinteger",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.toSafeInteger` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.trimend/README.md b/lodash.trimend/README.md
index b19012290..22ab2d8a7 100644
--- a/lodash.trimend/README.md
+++ b/lodash.trimend/README.md
@@ -1,4 +1,4 @@
-# lodash.trimend v4.0.2
+# lodash.trimend v4.0.3
The [lodash](https://lodash.com/) method `_.trimEnd` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var trimEnd = require('lodash.trimend');
```
-See the [documentation](https://lodash.com/docs#trimEnd) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.trimend) for more details.
+See the [documentation](https://lodash.com/docs#trimEnd) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.trimend) for more details.
diff --git a/lodash.trimend/index.js b/lodash.trimend/index.js
index b2cbcdd84..db0408e92 100644
--- a/lodash.trimend/index.js
+++ b/lodash.trimend/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -43,6 +43,49 @@ var reOptMod = rsModifier + '?',
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
var reComplexSymbol = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
+/** Used to determine if values are of the language type `Object`. */
+var objectTypes = {
+ 'function': true,
+ 'object': true
+};
+
+/** Detect free variable `exports`. */
+var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;
+
+/** Detect free variable `module`. */
+var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;
+
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
+
+/** Detect free variable `self`. */
+var freeSelf = checkGlobal(objectTypes[typeof self] && self);
+
+/** Detect free variable `window`. */
+var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+
+/** Detect `this` as the global object. */
+var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
+
+/**
+ * Used as a reference to the global object.
+ *
+ * The `this` value is used if it's the global object to avoid Greasemonkey's
+ * restricted `window` object, otherwise the `window` object is used.
+ */
+var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
+
+/**
+ * Checks if `value` is a global object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {null|Object} Returns `value` if it's a global object, else `null`.
+ */
+function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
+}
+
/**
* Converts `string` to an array.
*
@@ -55,7 +98,7 @@ function stringToArray(string) {
}
/** Used for built-in method references. */
-var objectProto = global.Object.prototype;
+var objectProto = Object.prototype;
/**
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
@@ -64,7 +107,7 @@ var objectProto = global.Object.prototype;
var objectToString = objectProto.toString;
/** Built-in value references. */
-var Symbol = global.Symbol;
+var Symbol = root.Symbol;
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
diff --git a/lodash.trimend/package.json b/lodash.trimend/package.json
index 1d7bb469c..571c10ae3 100644
--- a/lodash.trimend/package.json
+++ b/lodash.trimend/package.json
@@ -1,11 +1,11 @@
{
"name": "lodash.trimend",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.trimEnd` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util, trimend",
+ "keywords": "lodash-modularized, trimend",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
diff --git a/lodash.trimstart/README.md b/lodash.trimstart/README.md
index 80798bb4c..707eb9206 100644
--- a/lodash.trimstart/README.md
+++ b/lodash.trimstart/README.md
@@ -1,4 +1,4 @@
-# lodash.trimstart v4.0.2
+# lodash.trimstart v4.0.3
The [lodash](https://lodash.com/) method `_.trimStart` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var trimStart = require('lodash.trimstart');
```
-See the [documentation](https://lodash.com/docs#trimStart) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.trimstart) for more details.
+See the [documentation](https://lodash.com/docs#trimStart) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.trimstart) for more details.
diff --git a/lodash.trimstart/index.js b/lodash.trimstart/index.js
index ba5ebc364..9a0272001 100644
--- a/lodash.trimstart/index.js
+++ b/lodash.trimstart/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -43,6 +43,49 @@ var reOptMod = rsModifier + '?',
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
var reComplexSymbol = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
+/** Used to determine if values are of the language type `Object`. */
+var objectTypes = {
+ 'function': true,
+ 'object': true
+};
+
+/** Detect free variable `exports`. */
+var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;
+
+/** Detect free variable `module`. */
+var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;
+
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
+
+/** Detect free variable `self`. */
+var freeSelf = checkGlobal(objectTypes[typeof self] && self);
+
+/** Detect free variable `window`. */
+var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+
+/** Detect `this` as the global object. */
+var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
+
+/**
+ * Used as a reference to the global object.
+ *
+ * The `this` value is used if it's the global object to avoid Greasemonkey's
+ * restricted `window` object, otherwise the `window` object is used.
+ */
+var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
+
+/**
+ * Checks if `value` is a global object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {null|Object} Returns `value` if it's a global object, else `null`.
+ */
+function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
+}
+
/**
* Converts `string` to an array.
*
@@ -55,7 +98,7 @@ function stringToArray(string) {
}
/** Used for built-in method references. */
-var objectProto = global.Object.prototype;
+var objectProto = Object.prototype;
/**
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
@@ -64,7 +107,7 @@ var objectProto = global.Object.prototype;
var objectToString = objectProto.toString;
/** Built-in value references. */
-var Symbol = global.Symbol;
+var Symbol = root.Symbol;
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
diff --git a/lodash.trimstart/package.json b/lodash.trimstart/package.json
index c2040b6f7..76c5e36e3 100644
--- a/lodash.trimstart/package.json
+++ b/lodash.trimstart/package.json
@@ -1,11 +1,11 @@
{
"name": "lodash.trimstart",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.trimStart` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util, trimstart",
+ "keywords": "lodash-modularized, trimstart",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
diff --git a/lodash.unionby/README.md b/lodash.unionby/README.md
index 94cb4c9d9..df2ee0071 100644
--- a/lodash.unionby/README.md
+++ b/lodash.unionby/README.md
@@ -1,4 +1,4 @@
-# lodash.unionby v4.0.2
+# lodash.unionby v4.0.3
The [lodash](https://lodash.com/) method `_.unionBy` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var unionBy = require('lodash.unionby');
```
-See the [documentation](https://lodash.com/docs#unionBy) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.unionby) for more details.
+See the [documentation](https://lodash.com/docs#unionBy) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.unionby) for more details.
diff --git a/lodash.unionby/index.js b/lodash.unionby/index.js
index 194474f19..193ba6e09 100644
--- a/lodash.unionby/index.js
+++ b/lodash.unionby/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -48,6 +48,49 @@ var reEscapeChar = /\\(\\)?/g;
/** Used to detect host constructors (Safari > 5). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;
+/** Used to determine if values are of the language type `Object`. */
+var objectTypes = {
+ 'function': true,
+ 'object': true
+};
+
+/** Detect free variable `exports`. */
+var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;
+
+/** Detect free variable `module`. */
+var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;
+
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
+
+/** Detect free variable `self`. */
+var freeSelf = checkGlobal(objectTypes[typeof self] && self);
+
+/** Detect free variable `window`. */
+var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+
+/** Detect `this` as the global object. */
+var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
+
+/**
+ * Used as a reference to the global object.
+ *
+ * The `this` value is used if it's the global object to avoid Greasemonkey's
+ * restricted `window` object, otherwise the `window` object is used.
+ */
+var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
+
+/**
+ * Checks if `value` is a global object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {null|Object} Returns `value` if it's a global object, else `null`.
+ */
+function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
+}
+
/**
* Checks if `value` is a host object in IE < 9.
*
@@ -85,10 +128,10 @@ function setToArray(set) {
}
/** Used for built-in method references. */
-var objectProto = global.Object.prototype;
+var objectProto = Object.prototype;
/** Used to resolve the decompiled source of functions. */
-var funcToString = global.Function.prototype.toString;
+var funcToString = Function.prototype.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
@@ -106,10 +149,10 @@ var reIsNative = RegExp('^' +
);
/** Built-in value references. */
-var Symbol = global.Symbol;
+var Symbol = root.Symbol;
/* Built-in method references that are verified to be native. */
-var Set = getNative(global, 'Set');
+var Set = getNative(root, 'Set');
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
@@ -430,7 +473,7 @@ function last(array) {
* _.unionBy([2.1, 1.2], [4.3, 2.4], Math.floor);
* // => [2.1, 1.2, 4.3]
*
- * // using the `_.property` iteratee shorthand
+ * // The `_.property` iteratee shorthand.
* _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
* // => [{ 'x': 1 }, { 'x': 2 }]
*/
diff --git a/lodash.unionby/package.json b/lodash.unionby/package.json
index 1eb8ec6e8..b928df158 100644
--- a/lodash.unionby/package.json
+++ b/lodash.unionby/package.json
@@ -1,11 +1,11 @@
{
"name": "lodash.unionby",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.unionBy` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util, unionby",
+ "keywords": "lodash-modularized, unionby",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
diff --git a/lodash.uniqby/README.md b/lodash.uniqby/README.md
index 068262133..3e7214914 100644
--- a/lodash.uniqby/README.md
+++ b/lodash.uniqby/README.md
@@ -1,4 +1,4 @@
-# lodash.uniqby v4.0.2
+# lodash.uniqby v4.0.3
The [lodash](https://lodash.com/) method `_.uniqBy` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var uniqBy = require('lodash.uniqby');
```
-See the [documentation](https://lodash.com/docs#uniqBy) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.uniqby) for more details.
+See the [documentation](https://lodash.com/docs#uniqBy) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.uniqby) for more details.
diff --git a/lodash.uniqby/index.js b/lodash.uniqby/index.js
index 31463f5f0..2099491e1 100644
--- a/lodash.uniqby/index.js
+++ b/lodash.uniqby/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -45,6 +45,49 @@ var reEscapeChar = /\\(\\)?/g;
/** Used to detect host constructors (Safari > 5). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;
+/** Used to determine if values are of the language type `Object`. */
+var objectTypes = {
+ 'function': true,
+ 'object': true
+};
+
+/** Detect free variable `exports`. */
+var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;
+
+/** Detect free variable `module`. */
+var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;
+
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
+
+/** Detect free variable `self`. */
+var freeSelf = checkGlobal(objectTypes[typeof self] && self);
+
+/** Detect free variable `window`. */
+var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+
+/** Detect `this` as the global object. */
+var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
+
+/**
+ * Used as a reference to the global object.
+ *
+ * The `this` value is used if it's the global object to avoid Greasemonkey's
+ * restricted `window` object, otherwise the `window` object is used.
+ */
+var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
+
+/**
+ * Checks if `value` is a global object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {null|Object} Returns `value` if it's a global object, else `null`.
+ */
+function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
+}
+
/**
* Checks if `value` is a host object in IE < 9.
*
@@ -82,10 +125,10 @@ function setToArray(set) {
}
/** Used for built-in method references. */
-var objectProto = global.Object.prototype;
+var objectProto = Object.prototype;
/** Used to resolve the decompiled source of functions. */
-var funcToString = global.Function.prototype.toString;
+var funcToString = Function.prototype.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
@@ -103,10 +146,10 @@ var reIsNative = RegExp('^' +
);
/** Built-in value references. */
-var Symbol = global.Symbol;
+var Symbol = root.Symbol;
/* Built-in method references that are verified to be native. */
-var Set = getNative(global, 'Set');
+var Set = getNative(root, 'Set');
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
@@ -397,7 +440,7 @@ function stringToPath(string) {
* _.uniqBy([2.1, 1.2, 2.3], Math.floor);
* // => [2.1, 1.2]
*
- * // using the `_.property` iteratee shorthand
+ * // The `_.property` iteratee shorthand.
* _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
* // => [{ 'x': 1 }, { 'x': 2 }]
*/
diff --git a/lodash.uniqby/package.json b/lodash.uniqby/package.json
index ecd76de3c..e32cee3e3 100644
--- a/lodash.uniqby/package.json
+++ b/lodash.uniqby/package.json
@@ -1,11 +1,11 @@
{
"name": "lodash.uniqby",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.uniqBy` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util, uniqby",
+ "keywords": "lodash-modularized, uniqby",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
diff --git a/lodash.xorby/README.md b/lodash.xorby/README.md
index 4884edc84..84de47207 100644
--- a/lodash.xorby/README.md
+++ b/lodash.xorby/README.md
@@ -1,4 +1,4 @@
-# lodash.xorby v4.0.2
+# lodash.xorby v4.0.3
The [lodash](https://lodash.com/) method `_.xorBy` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var xorBy = require('lodash.xorby');
```
-See the [documentation](https://lodash.com/docs#xorBy) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.xorby) for more details.
+See the [documentation](https://lodash.com/docs#xorBy) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.xorby) for more details.
diff --git a/lodash.xorby/index.js b/lodash.xorby/index.js
index ceebaeb4d..1e9c9a536 100644
--- a/lodash.xorby/index.js
+++ b/lodash.xorby/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build)
+ * lodash 4.0.3 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -49,6 +49,38 @@ var reEscapeChar = /\\(\\)?/g;
/** Used to detect host constructors (Safari > 5). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;
+/** Used to determine if values are of the language type `Object`. */
+var objectTypes = {
+ 'function': true,
+ 'object': true
+};
+
+/** Detect free variable `exports`. */
+var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;
+
+/** Detect free variable `module`. */
+var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;
+
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
+
+/** Detect free variable `self`. */
+var freeSelf = checkGlobal(objectTypes[typeof self] && self);
+
+/** Detect free variable `window`. */
+var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+
+/** Detect `this` as the global object. */
+var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
+
+/**
+ * Used as a reference to the global object.
+ *
+ * The `this` value is used if it's the global object to avoid Greasemonkey's
+ * restricted `window` object, otherwise the `window` object is used.
+ */
+var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
+
/**
* Appends the elements of `values` to `array`.
*
@@ -81,6 +113,17 @@ function baseUnary(func) {
};
}
+/**
+ * Checks if `value` is a global object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {null|Object} Returns `value` if it's a global object, else `null`.
+ */
+function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
+}
+
/**
* Checks if `value` is a host object in IE < 9.
*
@@ -118,10 +161,10 @@ function setToArray(set) {
}
/** Used for built-in method references. */
-var objectProto = global.Object.prototype;
+var objectProto = Object.prototype;
/** Used to resolve the decompiled source of functions. */
-var funcToString = global.Function.prototype.toString;
+var funcToString = Function.prototype.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
@@ -139,10 +182,10 @@ var reIsNative = RegExp('^' +
);
/** Built-in value references. */
-var Symbol = global.Symbol;
+var Symbol = root.Symbol;
/* Built-in method references that are verified to be native. */
-var Set = getNative(global, 'Set');
+var Set = getNative(root, 'Set');
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
@@ -543,7 +586,7 @@ function last(array) {
* _.xorBy([2.1, 1.2], [4.3, 2.4], Math.floor);
* // => [1.2, 4.3]
*
- * // using the `_.property` iteratee shorthand
+ * // The `_.property` iteratee shorthand.
* _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
* // => [{ 'x': 2 }]
*/
diff --git a/lodash.xorby/package.json b/lodash.xorby/package.json
index 6fe8d428c..f47f7371f 100644
--- a/lodash.xorby/package.json
+++ b/lodash.xorby/package.json
@@ -1,11 +1,11 @@
{
"name": "lodash.xorby",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "The lodash method `_.xorBy` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
- "keywords": "lodash, lodash-modularized, stdlib, util, xorby",
+ "keywords": "lodash-modularized, xorby",
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",