diff --git a/README.md b/README.md
index c158507b8..be5febb05 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# lodash v4.0.3
+# lodash v4.0.4
The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method.
diff --git a/lodash._createset/LICENSE b/lodash._createset/LICENSE
deleted file mode 100644
index e0c69d560..000000000
--- a/lodash._createset/LICENSE
+++ /dev/null
@@ -1,47 +0,0 @@
-Copyright jQuery Foundation and other contributors
-
-Based on Underscore.js, copyright Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors
-
-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 following license applies to all parts of this software except as
-documented below:
-
-====
-
-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._createset/README.md b/lodash._createset/README.md
deleted file mode 100644
index 6486d7e85..000000000
--- a/lodash._createset/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# lodash._createset v4.0.3
-
-The internal [lodash](https://lodash.com/) function `createSet` exported as a [Node.js](https://nodejs.org/) module.
-
-## Installation
-
-Using npm:
-```bash
-$ {sudo -H} npm i -g npm
-$ npm i --save lodash._createset
-```
-
-In Node.js:
-```js
-var createSet = require('lodash._createset');
-```
-
-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
deleted file mode 100644
index 9cadd2eee..000000000
--- a/lodash._createset/index.js
+++ /dev/null
@@ -1,280 +0,0 @@
-/**
- * lodash (Custom Build)
- * Build: `lodash modularize exports="npm" -o ./`
- * Copyright jQuery Foundation and other contributors
- * Released under MIT license
- * Based on Underscore.js 1.8.3
- * 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]';
-
-/**
- * Used to match `RegExp`
- * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
- */
-var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
-
-/** Used to detect host constructors (Safari). */
-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
- : undefined;
-
-/** Detect free variable `module`. */
-var freeModule = (objectTypes[typeof module] && module && !module.nodeType)
- ? module
- : undefined;
-
-/** 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.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
- */
-function isHostObject(value) {
- // Many host objects are `Object` objects that can coerce to strings
- // despite having improperly defined `toString` methods.
- var result = false;
- if (value != null && typeof value.toString != 'function') {
- try {
- result = !!(value + '');
- } catch (e) {}
- }
- 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;
-
-/** Used to resolve the decompiled source of functions. */
-var funcToString = Function.prototype.toString;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objectToString = objectProto.toString;
-
-/** Used to detect if a method is native. */
-var reIsNative = RegExp('^' +
- funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
-);
-
-/* Built-in method references that are verified to be native. */
-var Set = getNative(root, 'Set');
-
-/**
- * Creates a set of `values`.
- *
- * @private
- * @param {Array} values The values to add to the set.
- * @returns {Object} Returns the new set.
- */
-var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
- return new Set(values);
-};
-
-/**
- * Gets the native function at `key` of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {string} key The key of the method to get.
- * @returns {*} Returns the function if it's native, else `undefined`.
- */
-function getNative(object, key) {
- var value = object[key];
- return isNative(value) ? value : undefined;
-}
-
-/**
- * Converts `func` to its source code.
- *
- * @private
- * @param {Function} func The function to process.
- * @returns {string} Returns the source code.
- */
-function toSource(func) {
- if (func != null) {
- try {
- return funcToString.call(func);
- } catch (e) {}
- try {
- return (func + '');
- } catch (e) {}
- }
- return '';
-}
-
-/**
- * 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 correctly classified,
- * else `false`.
- * @example
- *
- * _.isFunction(_);
- * // => true
- *
- * _.isFunction(/abc/);
- * // => false
- */
-function isFunction(value) {
- // The use of `Object#toString` avoids issues with the `typeof` operator
- // in 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)
- * 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`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(_.noop);
- * // => true
- *
- * _.isObject(null);
- * // => false
- */
-function isObject(value) {
- var type = typeof value;
- return !!value && (type == 'object' || type == 'function');
-}
-
-/**
- * Checks if `value` is a native function.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a native function,
- * else `false`.
- * @example
- *
- * _.isNative(Array.prototype.push);
- * // => true
- *
- * _.isNative(_);
- * // => false
- */
-function isNative(value) {
- if (!isObject(value)) {
- return false;
- }
- var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
- return pattern.test(toSource(value));
-}
-
-/**
- * A no-operation function that returns `undefined` regardless of the
- * arguments it receives.
- *
- * @static
- * @memberOf _
- * @since 2.3.0
- * @category Util
- * @example
- *
- * var object = { 'user': 'fred' };
- *
- * _.noop(object) === undefined;
- * // => true
- */
-function noop() {
- // No operation performed.
-}
-
-module.exports = createSet;
diff --git a/lodash._createset/package.json b/lodash._createset/package.json
deleted file mode 100644
index ca7e01780..000000000
--- a/lodash._createset/package.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "name": "lodash._createset",
- "version": "4.0.3",
- "description": "The internal lodash function `createSet` exported as a module.",
- "homepage": "https://lodash.com/",
- "icon": "https://lodash.com/icon.svg",
- "license": "MIT",
- "author": "John-David Dalton (http://allyoucanleet.com/)",
- "contributors": [
- "John-David Dalton (http://allyoucanleet.com/)",
- "Blaine Bublitz (https://github.com/phated)",
- "Mathias Bynens (https://mathiasbynens.be/)"
- ],
- "repository": "lodash/lodash",
- "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
-}
diff --git a/lodash._createwrapper/README.md b/lodash._createwrapper/README.md
index 1aaa72128..c4165590d 100644
--- a/lodash._createwrapper/README.md
+++ b/lodash._createwrapper/README.md
@@ -1,4 +1,4 @@
-# lodash._createwrapper v4.0.3
+# lodash._createwrapper v4.0.4
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.3-npm-packages/lodash._createwrapper) for more details.
+See the [package source](https://github.com/lodash/lodash/blob/4.0.4-npm-packages/lodash._createwrapper) for more details.
diff --git a/lodash._createwrapper/index.js b/lodash._createwrapper/index.js
index a93864e6f..d75c502dd 100644
--- a/lodash._createwrapper/index.js
+++ b/lodash._createwrapper/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash 4.0.4 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors
* Released under MIT license
@@ -525,7 +525,6 @@ function createPartialWrapper(func, bitmask, thisArg, partials) {
*/
function createRecurryWrapper(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
var isCurry = bitmask & CURRY_FLAG,
- newArgPos = argPos ? copyArray(argPos) : undefined,
newHolders = isCurry ? holders : undefined,
newHoldersRight = isCurry ? undefined : holders,
newPartials = isCurry ? partials : undefined,
@@ -538,7 +537,7 @@ function createRecurryWrapper(func, bitmask, wrapFunc, placeholder, thisArg, par
bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG);
}
- var result = wrapFunc(func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, newHoldersRight, newArgPos, ary, arity);
+ var result = wrapFunc(func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, newHoldersRight, argPos, ary, arity);
result.placeholder = placeholder;
return result;
}
diff --git a/lodash._createwrapper/package.json b/lodash._createwrapper/package.json
index c6264f759..673cf30c7 100644
--- a/lodash._createwrapper/package.json
+++ b/lodash._createwrapper/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash._createwrapper",
- "version": "4.0.3",
+ "version": "4.0.4",
"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 5968c014d..376471d6c 100644
--- a/lodash.after/README.md
+++ b/lodash.after/README.md
@@ -1,4 +1,4 @@
-# lodash.after v4.0.3
+# lodash.after v4.0.4
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.3-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.4-npm-packages/lodash.after) for more details.
diff --git a/lodash.after/index.js b/lodash.after/index.js
index c2fd5e787..fdd2b5138 100644
--- a/lodash.after/index.js
+++ b/lodash.after/index.js
@@ -16,9 +16,7 @@ var INFINITY = 1 / 0,
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;
@@ -40,7 +38,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;
@@ -81,34 +79,9 @@ function after(n, func) {
};
}
-/**
- * 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
@@ -225,7 +198,7 @@ function toFinite(value) {
* Converts `value` to an integer.
*
* **Note:** This method is loosely based on
- * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
*
* @static
* @memberOf _
@@ -285,7 +258,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.after/package.json b/lodash.after/package.json
index 3645f90c2..62727cfd1 100644
--- a/lodash.after/package.json
+++ b/lodash.after/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.after",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.after` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.assign/README.md b/lodash.assign/README.md
index 7a7051c36..d832baab5 100644
--- a/lodash.assign/README.md
+++ b/lodash.assign/README.md
@@ -1,4 +1,4 @@
-# lodash.assign v4.0.3
+# lodash.assign v4.0.4
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.3-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.4-npm-packages/lodash.assign) for more details.
diff --git a/lodash.assign/index.js b/lodash.assign/index.js
index 0320e0977..7e3179367 100644
--- a/lodash.assign/index.js
+++ b/lodash.assign/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash 4.0.4 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -57,8 +57,7 @@ var objectToString = objectProto.toString;
*/
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;
}
diff --git a/lodash.assign/package.json b/lodash.assign/package.json
index 633f31e75..4a79da67b 100644
--- a/lodash.assign/package.json
+++ b/lodash.assign/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.assign",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.assign` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.assignin/README.md b/lodash.assignin/README.md
index 93b1f17bb..4142c5575 100644
--- a/lodash.assignin/README.md
+++ b/lodash.assignin/README.md
@@ -1,4 +1,4 @@
-# lodash.assignin v4.0.3
+# lodash.assignin v4.0.4
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.3-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.4-npm-packages/lodash.assignin) for more details.
diff --git a/lodash.assignin/index.js b/lodash.assignin/index.js
index 1b145250e..e925fbb6b 100644
--- a/lodash.assignin/index.js
+++ b/lodash.assignin/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash 4.0.4 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -57,8 +57,7 @@ var objectToString = objectProto.toString;
*/
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;
}
diff --git a/lodash.assignin/package.json b/lodash.assignin/package.json
index 752bab4ba..558fbc3f3 100644
--- a/lodash.assignin/package.json
+++ b/lodash.assignin/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.assignin",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.assignIn` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.assigninwith/README.md b/lodash.assigninwith/README.md
index 19109d127..24833bf1a 100644
--- a/lodash.assigninwith/README.md
+++ b/lodash.assigninwith/README.md
@@ -1,4 +1,4 @@
-# lodash.assigninwith v4.0.3
+# lodash.assigninwith v4.0.4
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.3-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.4-npm-packages/lodash.assigninwith) for more details.
diff --git a/lodash.assigninwith/index.js b/lodash.assigninwith/index.js
index 118a9c415..018551bb1 100644
--- a/lodash.assigninwith/index.js
+++ b/lodash.assigninwith/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash 4.0.4 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -57,8 +57,7 @@ var objectToString = objectProto.toString;
*/
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;
}
diff --git a/lodash.assigninwith/package.json b/lodash.assigninwith/package.json
index a93dc8fbc..e140e18a9 100644
--- a/lodash.assigninwith/package.json
+++ b/lodash.assigninwith/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.assigninwith",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.assignInWith` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.assignwith/README.md b/lodash.assignwith/README.md
index 6062fe7c7..e3e411d79 100644
--- a/lodash.assignwith/README.md
+++ b/lodash.assignwith/README.md
@@ -1,4 +1,4 @@
-# lodash.assignwith v4.0.3
+# lodash.assignwith v4.0.4
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.3-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.4-npm-packages/lodash.assignwith) for more details.
diff --git a/lodash.assignwith/index.js b/lodash.assignwith/index.js
index ce07bc7dd..175edf42f 100644
--- a/lodash.assignwith/index.js
+++ b/lodash.assignwith/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash 4.0.4 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -57,8 +57,7 @@ var objectToString = objectProto.toString;
*/
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;
}
diff --git a/lodash.assignwith/package.json b/lodash.assignwith/package.json
index e90198bbf..9c4922090 100644
--- a/lodash.assignwith/package.json
+++ b/lodash.assignwith/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.assignwith",
- "version": "4.0.3",
+ "version": "4.0.4",
"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 e50d8cd4f..1a9902a06 100644
--- a/lodash.before/README.md
+++ b/lodash.before/README.md
@@ -1,4 +1,4 @@
-# lodash.before v4.0.3
+# lodash.before v4.0.4
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.3-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.4-npm-packages/lodash.before) for more details.
diff --git a/lodash.before/index.js b/lodash.before/index.js
index 783d3c571..6ada58f30 100644
--- a/lodash.before/index.js
+++ b/lodash.before/index.js
@@ -16,9 +16,7 @@ var INFINITY = 1 / 0,
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;
@@ -40,7 +38,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;
@@ -79,34 +77,9 @@ function before(n, func) {
};
}
-/**
- * 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
@@ -223,7 +196,7 @@ function toFinite(value) {
* Converts `value` to an integer.
*
* **Note:** This method is loosely based on
- * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
*
* @static
* @memberOf _
@@ -283,7 +256,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.before/package.json b/lodash.before/package.json
index badcc69a3..a6e558a6d 100644
--- a/lodash.before/package.json
+++ b/lodash.before/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.before",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.before` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.ceil/README.md b/lodash.ceil/README.md
index 0635b8223..f57d53f6e 100644
--- a/lodash.ceil/README.md
+++ b/lodash.ceil/README.md
@@ -1,4 +1,4 @@
-# lodash.ceil v4.0.3
+# lodash.ceil v4.0.4
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.3-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.4-npm-packages/lodash.ceil) for more details.
diff --git a/lodash.ceil/index.js b/lodash.ceil/index.js
index 930386a0e..e1c55bf2b 100644
--- a/lodash.ceil/index.js
+++ b/lodash.ceil/index.js
@@ -13,9 +13,7 @@ var INFINITY = 1 / 0,
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;
@@ -46,7 +44,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;
@@ -106,34 +104,9 @@ function createRound(methodName) {
};
}
-/**
- * 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
@@ -250,7 +223,7 @@ function toFinite(value) {
* Converts `value` to an integer.
*
* **Note:** This method is loosely based on
- * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
*
* @static
* @memberOf _
@@ -310,7 +283,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.ceil/package.json b/lodash.ceil/package.json
index f1c0e9830..bd16278d5 100644
--- a/lodash.ceil/package.json
+++ b/lodash.ceil/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.ceil",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.ceil` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.chunk/LICENSE b/lodash.chunk/LICENSE
index bcbe13d67..e0c69d560 100644
--- a/lodash.chunk/LICENSE
+++ b/lodash.chunk/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.chunk/README.md b/lodash.chunk/README.md
index 94287c73b..6b72976d4 100644
--- a/lodash.chunk/README.md
+++ b/lodash.chunk/README.md
@@ -1,4 +1,4 @@
-# lodash.chunk v4.0.3
+# lodash.chunk v4.0.4
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.3-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.4-npm-packages/lodash.chunk) for more details.
diff --git a/lodash.chunk/index.js b/lodash.chunk/index.js
index ddbe724d5..5dcf337ef 100644
--- a/lodash.chunk/index.js
+++ b/lodash.chunk/index.js
@@ -1,10 +1,10 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash 4.0.4 (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;
@@ -52,6 +53,7 @@ var nativeCeil = Math.ceil,
*
* @static
* @memberOf _
+ * @since 3.0.0
* @category Array
* @param {Array} array The array to process.
* @param {number} [size=0] The length of each chunk.
@@ -86,9 +88,11 @@ function chunk(array, size) {
*
* @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(_);
@@ -111,6 +115,7 @@ function isFunction(value) {
*
* @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`.
@@ -134,12 +139,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.
@@ -175,6 +233,7 @@ function toInteger(value) {
*
* @static
* @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to process.
* @returns {number} Returns the number.
@@ -193,6 +252,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.chunk/package.json b/lodash.chunk/package.json
index 3afdd5c32..8e46188fd 100644
--- a/lodash.chunk/package.json
+++ b/lodash.chunk/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.chunk",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.chunk` 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 7a4078808..e5fb719ca 100644
--- a/lodash.clone/README.md
+++ b/lodash.clone/README.md
@@ -1,4 +1,4 @@
-# lodash.clone v4.0.3
+# lodash.clone v4.0.4
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.3-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.4-npm-packages/lodash.clone) for more details.
diff --git a/lodash.clone/index.js b/lodash.clone/index.js
index 43a16446d..244a97731 100644
--- a/lodash.clone/index.js
+++ b/lodash.clone/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash 4.0.4 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -64,6 +64,38 @@ cloneableTags[uint32Tag] = true;
cloneableTags[errorTag] = cloneableTags[funcTag] =
cloneableTags[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')();
+
/**
* Adds the key-value `pair` to `map`.
*
@@ -114,6 +146,17 @@ function arrayReduce(array, iteratee, accumulator, initAccum) {
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;
+}
+
/**
* Checks if `value` is a host object in IE < 9.
*
@@ -168,10 +211,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;
@@ -189,13 +232,13 @@ var reIsNative = RegExp('^' +
);
/** Built-in value references. */
-var Symbol = global.Symbol,
- Uint8Array = global.Uint8Array,
+var Symbol = root.Symbol,
+ Uint8Array = root.Uint8Array,
getOwnPropertySymbols = Object.getOwnPropertySymbols;
/* 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.clone/package.json b/lodash.clone/package.json
index 27a50ba05..7179102d7 100644
--- a/lodash.clone/package.json
+++ b/lodash.clone/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.clone",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.clone` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.clonedeep/README.md b/lodash.clonedeep/README.md
index 93f076556..9883b55cf 100644
--- a/lodash.clonedeep/README.md
+++ b/lodash.clonedeep/README.md
@@ -1,4 +1,4 @@
-# lodash.clonedeep v4.0.3
+# lodash.clonedeep v4.0.4
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.3-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.4-npm-packages/lodash.clonedeep) for more details.
diff --git a/lodash.clonedeep/index.js b/lodash.clonedeep/index.js
index aac5ad170..e232701f7 100644
--- a/lodash.clonedeep/index.js
+++ b/lodash.clonedeep/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash 4.0.4 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -64,6 +64,38 @@ cloneableTags[uint32Tag] = true;
cloneableTags[errorTag] = cloneableTags[funcTag] =
cloneableTags[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')();
+
/**
* Adds the key-value `pair` to `map`.
*
@@ -114,6 +146,17 @@ function arrayReduce(array, iteratee, accumulator, initAccum) {
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;
+}
+
/**
* Checks if `value` is a host object in IE < 9.
*
@@ -168,10 +211,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;
@@ -189,13 +232,13 @@ var reIsNative = RegExp('^' +
);
/** Built-in value references. */
-var Symbol = global.Symbol,
- Uint8Array = global.Uint8Array,
+var Symbol = root.Symbol,
+ Uint8Array = root.Uint8Array,
getOwnPropertySymbols = Object.getOwnPropertySymbols;
/* 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.clonedeep/package.json b/lodash.clonedeep/package.json
index 57c11e291..dfe029c23 100644
--- a/lodash.clonedeep/package.json
+++ b/lodash.clonedeep/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.clonedeep",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.cloneDeep` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.clonedeepwith/README.md b/lodash.clonedeepwith/README.md
index b4edf5ba7..1c54fb6d5 100644
--- a/lodash.clonedeepwith/README.md
+++ b/lodash.clonedeepwith/README.md
@@ -1,4 +1,4 @@
-# lodash.clonedeepwith v4.0.3
+# lodash.clonedeepwith v4.0.4
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.3-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.4-npm-packages/lodash.clonedeepwith) for more details.
diff --git a/lodash.clonedeepwith/index.js b/lodash.clonedeepwith/index.js
index 308b77b8e..1918c0ab7 100644
--- a/lodash.clonedeepwith/index.js
+++ b/lodash.clonedeepwith/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash 4.0.4 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -64,6 +64,38 @@ cloneableTags[uint32Tag] = true;
cloneableTags[errorTag] = cloneableTags[funcTag] =
cloneableTags[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')();
+
/**
* Adds the key-value `pair` to `map`.
*
@@ -114,6 +146,17 @@ function arrayReduce(array, iteratee, accumulator, initAccum) {
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;
+}
+
/**
* Checks if `value` is a host object in IE < 9.
*
@@ -168,10 +211,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;
@@ -189,13 +232,13 @@ var reIsNative = RegExp('^' +
);
/** Built-in value references. */
-var Symbol = global.Symbol,
- Uint8Array = global.Uint8Array,
+var Symbol = root.Symbol,
+ Uint8Array = root.Uint8Array,
getOwnPropertySymbols = Object.getOwnPropertySymbols;
/* 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.clonedeepwith/package.json b/lodash.clonedeepwith/package.json
index 9a520fd2c..4de389ca3 100644
--- a/lodash.clonedeepwith/package.json
+++ b/lodash.clonedeepwith/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.clonedeepwith",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.cloneDeepWith` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.clonewith/README.md b/lodash.clonewith/README.md
index 671d5fb52..973431e45 100644
--- a/lodash.clonewith/README.md
+++ b/lodash.clonewith/README.md
@@ -1,4 +1,4 @@
-# lodash.clonewith v4.0.3
+# lodash.clonewith v4.0.4
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.3-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.4-npm-packages/lodash.clonewith) for more details.
diff --git a/lodash.clonewith/index.js b/lodash.clonewith/index.js
index 3f7c4962d..c346592eb 100644
--- a/lodash.clonewith/index.js
+++ b/lodash.clonewith/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash 4.0.4 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -64,6 +64,38 @@ cloneableTags[uint32Tag] = true;
cloneableTags[errorTag] = cloneableTags[funcTag] =
cloneableTags[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')();
+
/**
* Adds the key-value `pair` to `map`.
*
@@ -114,6 +146,17 @@ function arrayReduce(array, iteratee, accumulator, initAccum) {
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;
+}
+
/**
* Checks if `value` is a host object in IE < 9.
*
@@ -168,10 +211,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;
@@ -189,13 +232,13 @@ var reIsNative = RegExp('^' +
);
/** Built-in value references. */
-var Symbol = global.Symbol,
- Uint8Array = global.Uint8Array,
+var Symbol = root.Symbol,
+ Uint8Array = root.Uint8Array,
getOwnPropertySymbols = Object.getOwnPropertySymbols;
/* 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.clonewith/package.json b/lodash.clonewith/package.json
index a9ef4264c..762447558 100644
--- a/lodash.clonewith/package.json
+++ b/lodash.clonewith/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.clonewith",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.cloneWith` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.conforms/README.md b/lodash.conforms/README.md
index 4dcd82e3f..06fad2268 100644
--- a/lodash.conforms/README.md
+++ b/lodash.conforms/README.md
@@ -1,4 +1,4 @@
-# lodash.conforms v4.0.3
+# lodash.conforms v4.0.4
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.3-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.4-npm-packages/lodash.conforms) for more details.
diff --git a/lodash.conforms/index.js b/lodash.conforms/index.js
index d78a22274..1c703e5a1 100644
--- a/lodash.conforms/index.js
+++ b/lodash.conforms/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash 4.0.4 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -64,6 +64,38 @@ cloneableTags[uint32Tag] = true;
cloneableTags[errorTag] = cloneableTags[funcTag] =
cloneableTags[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')();
+
/**
* Adds the key-value `pair` to `map`.
*
@@ -114,6 +146,17 @@ function arrayReduce(array, iteratee, accumulator, initAccum) {
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;
+}
+
/**
* Checks if `value` is a host object in IE < 9.
*
@@ -168,10 +211,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;
@@ -189,13 +232,13 @@ var reIsNative = RegExp('^' +
);
/** Built-in value references. */
-var Symbol = global.Symbol,
- Uint8Array = global.Uint8Array,
+var Symbol = root.Symbol,
+ Uint8Array = root.Uint8Array,
getOwnPropertySymbols = Object.getOwnPropertySymbols;
/* 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.conforms/package.json b/lodash.conforms/package.json
index 19116830e..f58c7cdad 100644
--- a/lodash.conforms/package.json
+++ b/lodash.conforms/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.conforms",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.conforms` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.create/LICENSE b/lodash.create/LICENSE
index bcbe13d67..e0c69d560 100644
--- a/lodash.create/LICENSE
+++ b/lodash.create/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.create/README.md b/lodash.create/README.md
index 364366603..82364c383 100644
--- a/lodash.create/README.md
+++ b/lodash.create/README.md
@@ -1,4 +1,4 @@
-# lodash.create v4.0.3
+# lodash.create v4.0.4
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.3-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.4-npm-packages/lodash.create) for more details.
diff --git a/lodash.create/index.js b/lodash.create/index.js
index d3d7b3106..0993fdbe5 100644
--- a/lodash.create/index.js
+++ b/lodash.create/index.js
@@ -1,10 +1,10 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash 4.0.4 (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 keys = require('lodash.keys');
@@ -67,24 +67,10 @@ function baseCreate(proto) {
* @param {Object} source The object to copy properties from.
* @param {Array} props The property identifiers to copy.
* @param {Object} [object={}] The object to copy properties to.
- * @returns {Object} Returns `object`.
- */
-function copyObject(source, props, object) {
- return copyObjectWith(source, props, object);
-}
-
-/**
- * This function is like `copyObject` except that it accepts a function to
- * customize copied values.
- *
- * @private
- * @param {Object} source The object to copy properties from.
- * @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`.
*/
-function copyObjectWith(source, props, object, customizer) {
+function copyObject(source, props, object, customizer) {
object || (object = {});
var index = -1,
diff --git a/lodash.create/package.json b/lodash.create/package.json
index 398e608a1..ab9c371ae 100644
--- a/lodash.create/package.json
+++ b/lodash.create/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.create",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.create` 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.debounce/LICENSE b/lodash.debounce/LICENSE
index bcbe13d67..e0c69d560 100644
--- a/lodash.debounce/LICENSE
+++ b/lodash.debounce/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.debounce/README.md b/lodash.debounce/README.md
index 1fb4fc7db..2bbe5c42e 100644
--- a/lodash.debounce/README.md
+++ b/lodash.debounce/README.md
@@ -1,4 +1,4 @@
-# lodash.debounce v4.0.3
+# lodash.debounce v4.0.4
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.3-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.4-npm-packages/lodash.debounce) for more details.
diff --git a/lodash.debounce/index.js b/lodash.debounce/index.js
index 519c627d7..b54c50f5f 100644
--- a/lodash.debounce/index.js
+++ b/lodash.debounce/index.js
@@ -1,10 +1,10 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash 4.0.4 (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. */
@@ -15,7 +15,8 @@ var NAN = 0 / 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,13 +37,15 @@ 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;
/* Built-in method references for those with the same name as other `lodash` methods. */
-var nativeMax = Math.max;
+var nativeMax = Math.max,
+ nativeMin = Math.min;
/**
* Gets the timestamp of the number of milliseconds that have elapsed since
@@ -50,6 +53,7 @@ var nativeMax = Math.max;
*
* @static
* @memberOf _
+ * @since 2.4.0
* @type {Function}
* @category Date
* @returns {number} Returns the timestamp.
@@ -58,7 +62,7 @@ var nativeMax = Math.max;
* _.defer(function(stamp) {
* console.log(_.now() - stamp);
* }, _.now());
- * // => logs the number of milliseconds it took for the deferred function to be invoked
+ * // => Logs the number of milliseconds it took for the deferred function to be invoked.
*/
var now = Date.now;
@@ -76,21 +80,22 @@ var now = Date.now;
* on the trailing edge of the timeout only if the debounced function is
* invoked more than once during the `wait` timeout.
*
- * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
* for details over the differences between `_.debounce` and `_.throttle`.
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Function
* @param {Function} func The function to debounce.
* @param {number} [wait=0] The number of milliseconds to delay.
- * @param {Object} [options] The options object.
- * @param {boolean} [options.leading=false] Specify invoking on the leading
- * edge of the timeout.
- * @param {number} [options.maxWait] The maximum time `func` is allowed to be
- * delayed before it's invoked.
- * @param {boolean} [options.trailing=true] Specify invoking on the trailing
- * edge of the timeout.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.leading=false]
+ * Specify invoking on the leading edge of the timeout.
+ * @param {number} [options.maxWait]
+ * The maximum time `func` is allowed to be delayed before it's invoked.
+ * @param {boolean} [options.trailing=true]
+ * Specify invoking on the trailing edge of the timeout.
* @returns {Function} Returns the new debounced function.
* @example
*
@@ -112,14 +117,12 @@ var now = Date.now;
* jQuery(window).on('popstate', debounced.cancel);
*/
function debounce(func, wait, options) {
- var args,
- maxTimeoutId,
+ var lastArgs,
+ lastThis,
result,
- stamp,
- thisArg,
- timeoutId,
- trailingCall,
- lastCalled = 0,
+ timerId,
+ lastCallTime = 0,
+ lastInvokeTime = 0,
leading = false,
maxWait = false,
trailing = true;
@@ -134,92 +137,94 @@ function debounce(func, wait, options) {
trailing = 'trailing' in options ? !!options.trailing : trailing;
}
- function cancel() {
- if (timeoutId) {
- clearTimeout(timeoutId);
- }
- if (maxTimeoutId) {
- clearTimeout(maxTimeoutId);
- }
- lastCalled = 0;
- args = maxTimeoutId = thisArg = timeoutId = trailingCall = undefined;
- }
+ function invokeFunc(time) {
+ var args = lastArgs,
+ thisArg = lastThis;
- function complete(isCalled, id) {
- if (id) {
- clearTimeout(id);
- }
- maxTimeoutId = timeoutId = trailingCall = undefined;
- if (isCalled) {
- lastCalled = now();
- result = func.apply(thisArg, args);
- if (!timeoutId && !maxTimeoutId) {
- args = thisArg = undefined;
- }
- }
- }
-
- function delayed() {
- var remaining = wait - (now() - stamp);
- if (remaining <= 0 || remaining > wait) {
- complete(trailingCall, maxTimeoutId);
- } else {
- timeoutId = setTimeout(delayed, remaining);
- }
- }
-
- function flush() {
- if ((timeoutId && trailingCall) || (maxTimeoutId && trailing)) {
- result = func.apply(thisArg, args);
- }
- cancel();
+ lastArgs = lastThis = undefined;
+ lastInvokeTime = time;
+ result = func.apply(thisArg, args);
return result;
}
- function maxDelayed() {
- complete(trailing, timeoutId);
+ function leadingEdge(time) {
+ // Reset any `maxWait` timer.
+ lastInvokeTime = time;
+ // Start the timer for the trailing edge.
+ timerId = setTimeout(timerExpired, wait);
+ // Invoke the leading edge.
+ return leading ? invokeFunc(time) : result;
+ }
+
+ function remainingWait(time) {
+ var timeSinceLastCall = time - lastCallTime,
+ timeSinceLastInvoke = time - lastInvokeTime,
+ result = wait - timeSinceLastCall;
+
+ return maxWait === false ? result : nativeMin(result, maxWait - timeSinceLastInvoke);
+ }
+
+ function shouldInvoke(time) {
+ var timeSinceLastCall = time - lastCallTime,
+ timeSinceLastInvoke = time - lastInvokeTime;
+
+ // Either this is the first call, activity has stopped and we're at the
+ // trailing edge, the system time has gone backwards and we're treating
+ // it as the trailing edge, or we've hit the `maxWait` limit.
+ return (!lastCallTime || (timeSinceLastCall >= wait) ||
+ (timeSinceLastCall < 0) || (maxWait !== false && timeSinceLastInvoke >= maxWait));
+ }
+
+ function timerExpired() {
+ var time = now();
+ if (shouldInvoke(time)) {
+ return trailingEdge(time);
+ }
+ // Restart the timer.
+ timerId = setTimeout(timerExpired, remainingWait(time));
+ }
+
+ function trailingEdge(time) {
+ clearTimeout(timerId);
+ timerId = undefined;
+
+ // Only invoke if we have `lastArgs` which means `func` has been
+ // debounced at least once.
+ if (trailing && lastArgs) {
+ return invokeFunc(time);
+ }
+ lastArgs = lastThis = undefined;
+ return result;
+ }
+
+ function cancel() {
+ if (timerId !== undefined) {
+ clearTimeout(timerId);
+ }
+ lastCallTime = lastInvokeTime = 0;
+ lastArgs = lastThis = timerId = undefined;
+ }
+
+ function flush() {
+ return timerId === undefined ? result : trailingEdge(now());
}
function debounced() {
- args = arguments;
- stamp = now();
- thisArg = this;
- trailingCall = trailing && (timeoutId || !leading);
+ var time = now(),
+ isInvoking = shouldInvoke(time);
- if (maxWait === false) {
- var leadingCall = leading && !timeoutId;
- } else {
- if (!lastCalled && !maxTimeoutId && !leading) {
- lastCalled = stamp;
- }
- var remaining = maxWait - (stamp - lastCalled);
+ lastArgs = arguments;
+ lastThis = this;
+ lastCallTime = time;
- var isCalled = (remaining <= 0 || remaining > maxWait) &&
- (leading || maxTimeoutId);
-
- if (isCalled) {
- if (maxTimeoutId) {
- maxTimeoutId = clearTimeout(maxTimeoutId);
- }
- lastCalled = stamp;
- result = func.apply(thisArg, args);
+ if (isInvoking) {
+ if (timerId === undefined) {
+ return leadingEdge(lastCallTime);
}
- else if (!maxTimeoutId) {
- maxTimeoutId = setTimeout(maxDelayed, remaining);
- }
- }
- if (isCalled && timeoutId) {
- timeoutId = clearTimeout(timeoutId);
- }
- else if (!timeoutId && wait !== maxWait) {
- timeoutId = setTimeout(delayed, wait);
- }
- if (leadingCall) {
- isCalled = true;
- result = func.apply(thisArg, args);
- }
- if (isCalled && !timeoutId && !maxTimeoutId) {
- args = thisArg = undefined;
+ // Handle invocations in a tight loop.
+ clearTimeout(timerId);
+ timerId = setTimeout(timerExpired, wait);
+ return invokeFunc(lastCallTime);
}
return result;
}
@@ -233,9 +238,11 @@ function debounce(func, wait, options) {
*
* @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(_);
@@ -253,11 +260,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`.
@@ -280,11 +289,63 @@ function isObject(value) {
return !!value && (type == 'object' || type == 'function');
}
+/**
+ * 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 a number.
*
* @static
* @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to process.
* @returns {number} Returns the number.
@@ -303,6 +364,12 @@ function isObject(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.debounce/package.json b/lodash.debounce/package.json
index 4294be7eb..8aca02111 100644
--- a/lodash.debounce/package.json
+++ b/lodash.debounce/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.debounce",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.debounce` 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.defaultsdeep/README.md b/lodash.defaultsdeep/README.md
index c9a2abfb6..20942bf2a 100644
--- a/lodash.defaultsdeep/README.md
+++ b/lodash.defaultsdeep/README.md
@@ -1,4 +1,4 @@
-# lodash.defaultsdeep v4.0.3
+# lodash.defaultsdeep v4.0.4
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.3-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.4-npm-packages/lodash.defaultsdeep) for more details.
diff --git a/lodash.defaultsdeep/index.js b/lodash.defaultsdeep/index.js
index 317233279..b4eb464f6 100644
--- a/lodash.defaultsdeep/index.js
+++ b/lodash.defaultsdeep/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash 4.0.4 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -86,6 +86,38 @@ cloneableTags[uint32Tag] = true;
cloneableTags[errorTag] = cloneableTags[funcTag] =
cloneableTags[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')();
+
/**
* Adds the key-value `pair` to `map`.
*
@@ -119,11 +151,11 @@ function addSetEntry(set, value) {
* @private
* @param {Function} func The function to invoke.
* @param {*} thisArg The `this` binding of `func`.
- * @param {...*} [args] The arguments to invoke `func` with.
+ * @param {...*} args The arguments to invoke `func` with.
* @returns {*} Returns the result of `func`.
*/
function apply(func, thisArg, args) {
- var length = args ? args.length : 0;
+ var length = args.length;
switch (length) {
case 0: return func.call(thisArg);
case 1: return func.call(thisArg, args[0]);
@@ -157,6 +189,17 @@ function arrayReduce(array, iteratee, accumulator, initAccum) {
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;
+}
+
/**
* Checks if `value` is a host object in IE < 9.
*
@@ -211,10 +254,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;
@@ -232,14 +275,14 @@ var reIsNative = RegExp('^' +
);
/** Built-in value references. */
-var Symbol = global.Symbol,
- Uint8Array = global.Uint8Array,
+var Symbol = root.Symbol,
+ Uint8Array = root.Uint8Array,
getOwnPropertySymbols = Object.getOwnPropertySymbols,
propertyIsEnumerable = objectProto.propertyIsEnumerable;
/* 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.defaultsdeep/package.json b/lodash.defaultsdeep/package.json
index d177bf439..c739d45ea 100644
--- a/lodash.defaultsdeep/package.json
+++ b/lodash.defaultsdeep/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.defaultsdeep",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.defaultsDeep` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.drop/README.md b/lodash.drop/README.md
index 55bb57156..9b9f798c7 100644
--- a/lodash.drop/README.md
+++ b/lodash.drop/README.md
@@ -1,4 +1,4 @@
-# lodash.drop v4.0.3
+# lodash.drop v4.0.4
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.3-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.4-npm-packages/lodash.drop) for more details.
diff --git a/lodash.drop/index.js b/lodash.drop/index.js
index 21a790f07..da06345e6 100644
--- a/lodash.drop/index.js
+++ b/lodash.drop/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors
* Released under MIT license
@@ -184,6 +184,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.
*
@@ -198,7 +233,7 @@ function isSymbol(value) {
* @returns {number} Returns the converted integer.
* @example
*
- * _.toInteger(3);
+ * _.toInteger(3.2);
* // => 3
*
* _.toInteger(Number.MIN_VALUE);
@@ -207,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;
}
/**
@@ -234,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
@@ -243,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.drop/package.json b/lodash.drop/package.json
index 7abb46024..fa6330cf5 100644
--- a/lodash.drop/package.json
+++ b/lodash.drop/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.drop",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.drop` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.dropright/README.md b/lodash.dropright/README.md
index 9998df849..cacc31254 100644
--- a/lodash.dropright/README.md
+++ b/lodash.dropright/README.md
@@ -1,4 +1,4 @@
-# lodash.dropright v4.0.3
+# lodash.dropright v4.0.4
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.3-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.4-npm-packages/lodash.dropright) for more details.
diff --git a/lodash.dropright/index.js b/lodash.dropright/index.js
index 60ba018f2..e24da5151 100644
--- a/lodash.dropright/index.js
+++ b/lodash.dropright/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors
* Released under MIT license
@@ -185,6 +185,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.
*
@@ -199,7 +234,7 @@ function isSymbol(value) {
* @returns {number} Returns the converted integer.
* @example
*
- * _.toInteger(3);
+ * _.toInteger(3.2);
* // => 3
*
* _.toInteger(Number.MIN_VALUE);
@@ -208,20 +243,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;
}
/**
@@ -235,8 +264,8 @@ function toInteger(value) {
* @returns {number} Returns the number.
* @example
*
- * _.toNumber(3);
- * // => 3
+ * _.toNumber(3.2);
+ * // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
@@ -244,8 +273,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.dropright/package.json b/lodash.dropright/package.json
index 8f97266cc..a722024c2 100644
--- a/lodash.dropright/package.json
+++ b/lodash.dropright/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.dropright",
- "version": "4.0.3",
+ "version": "4.0.4",
"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 b9889684a..1b37451b3 100644
--- a/lodash.floor/README.md
+++ b/lodash.floor/README.md
@@ -1,4 +1,4 @@
-# lodash.floor v4.0.3
+# lodash.floor v4.0.4
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.3-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.4-npm-packages/lodash.floor) for more details.
diff --git a/lodash.floor/index.js b/lodash.floor/index.js
index 4d9144439..1f4e4c2cb 100644
--- a/lodash.floor/index.js
+++ b/lodash.floor/index.js
@@ -13,9 +13,7 @@ var INFINITY = 1 / 0,
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;
@@ -46,7 +44,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;
@@ -106,34 +104,9 @@ function createRound(methodName) {
};
}
-/**
- * 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
@@ -250,7 +223,7 @@ function toFinite(value) {
* Converts `value` to an integer.
*
* **Note:** This method is loosely based on
- * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
*
* @static
* @memberOf _
@@ -310,7 +283,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.floor/package.json b/lodash.floor/package.json
index 6277a5418..9074deb58 100644
--- a/lodash.floor/package.json
+++ b/lodash.floor/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.floor",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.floor` 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 c288cd85c..ea0465645 100644
--- a/lodash.indexof/README.md
+++ b/lodash.indexof/README.md
@@ -1,4 +1,4 @@
-# lodash.indexof v4.0.3
+# lodash.indexof v4.0.4
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.3-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.4-npm-packages/lodash.indexof) for more details.
diff --git a/lodash.indexof/index.js b/lodash.indexof/index.js
index 1decfde88..8dfcaa4fc 100644
--- a/lodash.indexof/index.js
+++ b/lodash.indexof/index.js
@@ -32,6 +32,29 @@ var reIsOctal = /^0o[0-7]+$/i;
/** Built-in method references without a dependency on `root`. */
var freeParseInt = parseInt;
+/**
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to search.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {number} fromIndex The index to search from.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function baseFindIndex(array, predicate, fromIndex, fromRight) {
+ var length = array.length,
+ index = fromIndex + (fromRight ? 1 : -1);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (predicate(array[index], index, array)) {
+ return index;
+ }
+ }
+ return -1;
+}
+
/**
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
*
@@ -43,7 +66,7 @@ var freeParseInt = parseInt;
*/
function baseIndexOf(array, value, fromIndex) {
if (value !== value) {
- return indexOfNaN(array, fromIndex);
+ return baseFindIndex(array, baseIsNaN, fromIndex);
}
var index = fromIndex - 1,
length = array.length;
@@ -57,25 +80,14 @@ function baseIndexOf(array, value, fromIndex) {
}
/**
- * Gets the index at which the first occurrence of `NaN` is found in `array`.
+ * The base implementation of `_.isNaN` without support for number objects.
*
* @private
- * @param {Array} array The array to search.
- * @param {number} fromIndex The index to search from.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {number} Returns the index of the matched `NaN`, else `-1`.
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
*/
-function indexOfNaN(array, fromIndex, fromRight) {
- var length = array.length,
- index = fromIndex + (fromRight ? 0 : -1);
-
- while ((fromRight ? index-- : ++index < length)) {
- var other = array[index];
- if (other !== other) {
- return index;
- }
- }
- return -1;
+function baseIsNaN(value) {
+ return value !== value;
}
/** Used for built-in method references. */
@@ -119,11 +131,11 @@ function indexOf(array, value, fromIndex) {
if (!length) {
return -1;
}
- fromIndex = toInteger(fromIndex);
- if (fromIndex < 0) {
- fromIndex = nativeMax(length + fromIndex, 0);
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
+ if (index < 0) {
+ index = nativeMax(length + index, 0);
}
- return baseIndexOf(array, value, fromIndex);
+ return baseIndexOf(array, value, index);
}
/**
@@ -134,8 +146,7 @@ function indexOf(array, value, fromIndex) {
* @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(_);
@@ -218,8 +229,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);
@@ -271,7 +281,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
diff --git a/lodash.indexof/package.json b/lodash.indexof/package.json
index 1afc51d2e..4409215eb 100644
--- a/lodash.indexof/package.json
+++ b/lodash.indexof/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.indexof",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.indexOf` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.initial/README.md b/lodash.initial/README.md
index 44a83c00d..c34313903 100644
--- a/lodash.initial/README.md
+++ b/lodash.initial/README.md
@@ -1,4 +1,4 @@
-# lodash.initial v4.0.3
+# lodash.initial v4.0.4
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.3-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.4-npm-packages/lodash.initial) for more details.
diff --git a/lodash.initial/index.js b/lodash.initial/index.js
index afaa58c9a..85add622e 100644
--- a/lodash.initial/index.js
+++ b/lodash.initial/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors
* Released under MIT license
@@ -203,6 +203,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.
*
@@ -217,7 +252,7 @@ function isSymbol(value) {
* @returns {number} Returns the converted integer.
* @example
*
- * _.toInteger(3);
+ * _.toInteger(3.2);
* // => 3
*
* _.toInteger(Number.MIN_VALUE);
@@ -226,20 +261,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;
}
/**
@@ -253,8 +282,8 @@ function toInteger(value) {
* @returns {number} Returns the number.
* @example
*
- * _.toNumber(3);
- * // => 3
+ * _.toNumber(3.2);
+ * // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
@@ -262,8 +291,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.initial/package.json b/lodash.initial/package.json
index 85ed37b4a..f1e392922 100644
--- a/lodash.initial/package.json
+++ b/lodash.initial/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.initial",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.initial` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.isarraylike/LICENSE b/lodash.isarraylike/LICENSE
index bcbe13d67..e0c69d560 100644
--- a/lodash.isarraylike/LICENSE
+++ b/lodash.isarraylike/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.isarraylike/README.md b/lodash.isarraylike/README.md
index 2ba375fee..0fd14ae2b 100644
--- a/lodash.isarraylike/README.md
+++ b/lodash.isarraylike/README.md
@@ -1,4 +1,4 @@
-# lodash.isarraylike v4.0.3
+# lodash.isarraylike v4.0.4
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.3-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.4-npm-packages/lodash.isarraylike) for more details.
diff --git a/lodash.isarraylike/index.js b/lodash.isarraylike/index.js
index 8a383770d..c78820add 100644
--- a/lodash.isarraylike/index.js
+++ b/lodash.isarraylike/index.js
@@ -1,10 +1,10 @@
/**
* 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
*/
/** Used as references for various `Number` constants. */
@@ -14,16 +14,6 @@ var MAX_SAFE_INTEGER = 9007199254740991;
var funcTag = '[object Function]',
genTag = '[object GeneratorFunction]';
-/** 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 `_.property` without support for deep paths.
*
@@ -37,6 +27,16 @@ function baseProperty(key) {
};
}
+/** 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;
+
/**
* Gets the "length" property value of `object`.
*
@@ -87,8 +87,7 @@ function isArrayLike(value) {
* @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(_);
diff --git a/lodash.isarraylike/package.json b/lodash.isarraylike/package.json
index 2e0ef63dd..fb261c31f 100644
--- a/lodash.isarraylike/package.json
+++ b/lodash.isarraylike/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.isarraylike",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.isArrayLike` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.isarraylikeobject/LICENSE b/lodash.isarraylikeobject/LICENSE
index bcbe13d67..e0c69d560 100644
--- a/lodash.isarraylikeobject/LICENSE
+++ b/lodash.isarraylikeobject/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.isarraylikeobject/README.md b/lodash.isarraylikeobject/README.md
index 3ed8ebfaf..7bd9fda12 100644
--- a/lodash.isarraylikeobject/README.md
+++ b/lodash.isarraylikeobject/README.md
@@ -1,4 +1,4 @@
-# lodash.isarraylikeobject v4.0.3
+# lodash.isarraylikeobject v4.0.4
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.3-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.4-npm-packages/lodash.isarraylikeobject) for more details.
diff --git a/lodash.isarraylikeobject/index.js b/lodash.isarraylikeobject/index.js
index 912c70292..66be18f53 100644
--- a/lodash.isarraylikeobject/index.js
+++ b/lodash.isarraylikeobject/index.js
@@ -1,10 +1,10 @@
/**
* 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
*/
/** Used as references for various `Number` constants. */
@@ -14,16 +14,6 @@ var MAX_SAFE_INTEGER = 9007199254740991;
var funcTag = '[object Function]',
genTag = '[object GeneratorFunction]';
-/** 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 `_.property` without support for deep paths.
*
@@ -37,6 +27,16 @@ function baseProperty(key) {
};
}
+/** 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;
+
/**
* Gets the "length" property value of `object`.
*
@@ -116,8 +116,7 @@ function isArrayLikeObject(value) {
* @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(_);
diff --git a/lodash.isarraylikeobject/package.json b/lodash.isarraylikeobject/package.json
index 02ff7f1ec..69ea2b0b7 100644
--- a/lodash.isarraylikeobject/package.json
+++ b/lodash.isarraylikeobject/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.isarraylikeobject",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.isArrayLikeObject` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.isinteger/README.md b/lodash.isinteger/README.md
index e6f1c4e92..3a78567b6 100644
--- a/lodash.isinteger/README.md
+++ b/lodash.isinteger/README.md
@@ -1,4 +1,4 @@
-# lodash.isinteger v4.0.3
+# lodash.isinteger v4.0.4
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.3-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.4-npm-packages/lodash.isinteger) for more details.
diff --git a/lodash.isinteger/index.js b/lodash.isinteger/index.js
index 94575f6dc..3bf06f007 100644
--- a/lodash.isinteger/index.js
+++ b/lodash.isinteger/index.js
@@ -13,9 +13,7 @@ var INFINITY = 1 / 0,
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;
@@ -37,36 +35,11 @@ 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 an integer.
*
@@ -99,7 +72,7 @@ function isInteger(value) {
/**
* 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
@@ -216,7 +189,7 @@ function toFinite(value) {
* Converts `value` to an integer.
*
* **Note:** This method is loosely based on
- * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
*
* @static
* @memberOf _
@@ -276,7 +249,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.isinteger/package.json b/lodash.isinteger/package.json
index 049ed11b9..92db256f1 100644
--- a/lodash.isinteger/package.json
+++ b/lodash.isinteger/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.isinteger",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.isInteger` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.isplainobject/LICENSE b/lodash.isplainobject/LICENSE
index bcbe13d67..e0c69d560 100644
--- a/lodash.isplainobject/LICENSE
+++ b/lodash.isplainobject/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.isplainobject/README.md b/lodash.isplainobject/README.md
index 8fdcf647b..155e9c0cb 100644
--- a/lodash.isplainobject/README.md
+++ b/lodash.isplainobject/README.md
@@ -1,4 +1,4 @@
-# lodash.isplainobject v4.0.3
+# lodash.isplainobject v4.0.4
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.3-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.4-npm-packages/lodash.isplainobject) for more details.
diff --git a/lodash.isplainobject/index.js b/lodash.isplainobject/index.js
index 6d7fcddea..e6e4a4ee5 100644
--- a/lodash.isplainobject/index.js
+++ b/lodash.isplainobject/index.js
@@ -1,10 +1,10 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash 4.0.4 (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
*/
/** `Object#toString` result references. */
@@ -35,17 +35,32 @@ var objectProto = Object.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = Function.prototype.toString;
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
/** Used to infer the `Object` constructor. */
var objectCtorString = funcToString.call(Object);
/**
- * 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;
-/** Built-in value references. */
-var getPrototypeOf = Object.getPrototypeOf;
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeGetPrototype = Object.getPrototypeOf;
+
+/**
+ * Gets the `[[Prototype]]` of `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {null|Object} Returns the `[[Prototype]]`.
+ */
+function getPrototype(value) {
+ return nativeGetPrototype(Object(value));
+}
/**
* Checks if `value` is object-like. A value is object-like if it's not `null`
@@ -53,6 +68,7 @@ var getPrototypeOf = Object.getPrototypeOf;
*
* @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`.
@@ -80,9 +96,11 @@ function isObjectLike(value) {
*
* @static
* @memberOf _
+ * @since 0.8.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
+ * @returns {boolean} Returns `true` if `value` is a plain object,
+ * else `false`.
* @example
*
* function Foo() {
@@ -106,11 +124,11 @@ function isPlainObject(value) {
objectToString.call(value) != objectTag || isHostObject(value)) {
return false;
}
- var proto = getPrototypeOf(value);
+ var proto = getPrototype(value);
if (proto === null) {
return true;
}
- var Ctor = proto.constructor;
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
return (typeof Ctor == 'function' &&
Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
}
diff --git a/lodash.isplainobject/package.json b/lodash.isplainobject/package.json
index 0a821ae7f..5d6e9eeda 100644
--- a/lodash.isplainobject/package.json
+++ b/lodash.isplainobject/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.isplainobject",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.isPlainObject` 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.issafeinteger/README.md b/lodash.issafeinteger/README.md
index dd2479382..7be6f064b 100644
--- a/lodash.issafeinteger/README.md
+++ b/lodash.issafeinteger/README.md
@@ -1,4 +1,4 @@
-# lodash.issafeinteger v4.0.3
+# lodash.issafeinteger v4.0.4
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.3-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.4-npm-packages/lodash.issafeinteger) for more details.
diff --git a/lodash.issafeinteger/index.js b/lodash.issafeinteger/index.js
index eb30f6697..8c05ada9f 100644
--- a/lodash.issafeinteger/index.js
+++ b/lodash.issafeinteger/index.js
@@ -14,9 +14,7 @@ var INFINITY = 1 / 0,
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;
@@ -38,36 +36,11 @@ 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 an integer.
*
@@ -100,7 +73,7 @@ function isInteger(value) {
/**
* 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
@@ -168,8 +141,7 @@ function isObjectLike(value) {
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a safe integer,
- * else `false`.
+ * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
* @example
*
* _.isSafeInteger(3);
@@ -249,7 +221,7 @@ function toFinite(value) {
* Converts `value` to an integer.
*
* **Note:** This method is loosely based on
- * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
*
* @static
* @memberOf _
@@ -309,7 +281,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.issafeinteger/package.json b/lodash.issafeinteger/package.json
index 19d1ebe45..cc75840ad 100644
--- a/lodash.issafeinteger/package.json
+++ b/lodash.issafeinteger/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.issafeinteger",
- "version": "4.0.3",
+ "version": "4.0.4",
"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 097182c31..e5e7d330b 100644
--- a/lodash.iteratee/README.md
+++ b/lodash.iteratee/README.md
@@ -1,4 +1,4 @@
-# lodash.iteratee v4.0.3
+# lodash.iteratee v4.0.4
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.3-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.4-npm-packages/lodash.iteratee) for more details.
diff --git a/lodash.iteratee/index.js b/lodash.iteratee/index.js
index 4db6d385d..af82ce370 100644
--- a/lodash.iteratee/index.js
+++ b/lodash.iteratee/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash 4.0.4 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -84,6 +84,38 @@ cloneableTags[uint32Tag] = true;
cloneableTags[errorTag] = cloneableTags[funcTag] =
cloneableTags[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')();
+
/**
* Adds the key-value `pair` to `map`.
*
@@ -134,6 +166,17 @@ function arrayReduce(array, iteratee, accumulator, initAccum) {
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;
+}
+
/**
* Checks if `value` is a host object in IE < 9.
*
@@ -188,10 +231,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;
@@ -209,13 +252,13 @@ var reIsNative = RegExp('^' +
);
/** Built-in value references. */
-var Symbol = global.Symbol,
- Uint8Array = global.Uint8Array,
+var Symbol = root.Symbol,
+ Uint8Array = root.Uint8Array,
getOwnPropertySymbols = Object.getOwnPropertySymbols;
/* 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) : '',
@@ -1094,7 +1137,7 @@ function identity(value) {
* { 'user': 'fred', 'age': 40 }
* ];
*
- * // create custom iteratee shorthands
+ * // Create custom iteratee shorthands.
* _.iteratee = _.wrap(_.iteratee, function(callback, func) {
* var p = /^(\S+)\s*([<>])\s*(\S+)$/.exec(func);
* return !p ? callback(func) : function(object) {
@@ -1106,35 +1149,7 @@ function identity(value) {
* // => [{ 'user': 'fred', 'age': 40 }]
*/
function iteratee(func) {
- return (isObjectLike(func) && !isArray(func))
- ? matches(func)
- : baseIteratee(func);
-}
-
-/**
- * Creates a function that performs a deep partial comparison between a given
- * object and `source`, returning `true` if the given object has equivalent
- * property values, else `false`.
- *
- * **Note:** This method supports comparing the same values as `_.isEqual`.
- *
- * @static
- * @memberOf _
- * @category Util
- * @param {Object} source The object of property values to match.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': true },
- * { 'user': 'fred', 'age': 40, 'active': false }
- * ];
- *
- * _.filter(users, _.matches({ 'age': 40, 'active': false }));
- * // => [{ 'user': 'fred', 'age': 40, 'active': false }]
- */
-function matches(source) {
- return baseMatches(baseClone(source, true));
+ return baseIteratee(typeof func == 'function' ? func : baseClone(func, true));
}
/**
diff --git a/lodash.iteratee/package.json b/lodash.iteratee/package.json
index 8c479dd23..068d21ae0 100644
--- a/lodash.iteratee/package.json
+++ b/lodash.iteratee/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.iteratee",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.iteratee` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.keys/README.md b/lodash.keys/README.md
index 810f42e30..0fc15cf72 100644
--- a/lodash.keys/README.md
+++ b/lodash.keys/README.md
@@ -1,4 +1,4 @@
-# lodash.keys v4.0.3
+# lodash.keys v4.0.4
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.3-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.4-npm-packages/lodash.keys) for more details.
diff --git a/lodash.keys/index.js b/lodash.keys/index.js
index 02302b8c9..353c0511d 100644
--- a/lodash.keys/index.js
+++ b/lodash.keys/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash 4.0.4 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -150,7 +150,7 @@ function indexKeys(object) {
*/
function isPrototype(value) {
var Ctor = value && value.constructor,
- proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+ proto = (isFunction(Ctor) && Ctor.prototype) || objectProto;
return value === proto;
}
diff --git a/lodash.keys/package.json b/lodash.keys/package.json
index c450597b2..f67a85da2 100644
--- a/lodash.keys/package.json
+++ b/lodash.keys/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.keys",
- "version": "4.0.3",
+ "version": "4.0.4",
"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 500ce6c72..71ee64c94 100644
--- a/lodash.lastindexof/README.md
+++ b/lodash.lastindexof/README.md
@@ -1,4 +1,4 @@
-# lodash.lastindexof v4.0.3
+# lodash.lastindexof v4.0.4
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.3-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.4-npm-packages/lodash.lastindexof) for more details.
diff --git a/lodash.lastindexof/index.js b/lodash.lastindexof/index.js
index 603ea61bf..244aa0ef5 100644
--- a/lodash.lastindexof/index.js
+++ b/lodash.lastindexof/index.js
@@ -33,27 +33,39 @@ var reIsOctal = /^0o[0-7]+$/i;
var freeParseInt = parseInt;
/**
- * Gets the index at which the first occurrence of `NaN` is found in `array`.
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
+ * support for iteratee shorthands.
*
* @private
* @param {Array} array The array to search.
+ * @param {Function} predicate The function invoked per iteration.
* @param {number} fromIndex The index to search from.
* @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {number} Returns the index of the matched `NaN`, else `-1`.
+ * @returns {number} Returns the index of the matched value, else `-1`.
*/
-function indexOfNaN(array, fromIndex, fromRight) {
+function baseFindIndex(array, predicate, fromIndex, fromRight) {
var length = array.length,
- index = fromIndex + (fromRight ? 0 : -1);
+ index = fromIndex + (fromRight ? 1 : -1);
while ((fromRight ? index-- : ++index < length)) {
- var other = array[index];
- if (other !== other) {
+ if (predicate(array[index], index, array)) {
return index;
}
}
return -1;
}
+/**
+ * The base implementation of `_.isNaN` without support for number objects.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ */
+function baseIsNaN(value) {
+ return value !== value;
+}
+
/** Used for built-in method references. */
var objectProto = Object.prototype;
@@ -104,7 +116,7 @@ function lastIndexOf(array, value, fromIndex) {
) + 1;
}
if (value !== value) {
- return indexOfNaN(array, index, true);
+ return baseFindIndex(array, baseIsNaN, index - 1, true);
}
while (index--) {
if (array[index] === value) {
@@ -122,8 +134,7 @@ function lastIndexOf(array, value, fromIndex) {
* @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(_);
@@ -206,8 +217,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);
@@ -259,7 +269,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
diff --git a/lodash.lastindexof/package.json b/lodash.lastindexof/package.json
index ae31ac4f4..093419eda 100644
--- a/lodash.lastindexof/package.json
+++ b/lodash.lastindexof/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.lastindexof",
- "version": "4.0.3",
+ "version": "4.0.4",
"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 1191f199b..a964bce84 100644
--- a/lodash.matches/README.md
+++ b/lodash.matches/README.md
@@ -1,4 +1,4 @@
-# lodash.matches v4.0.3
+# lodash.matches v4.0.4
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.3-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.4-npm-packages/lodash.matches) for more details.
diff --git a/lodash.matches/index.js b/lodash.matches/index.js
index 799c7d1d4..468df1b6a 100644
--- a/lodash.matches/index.js
+++ b/lodash.matches/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash 4.0.4 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -66,6 +66,38 @@ cloneableTags[uint32Tag] = true;
cloneableTags[errorTag] = cloneableTags[funcTag] =
cloneableTags[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')();
+
/**
* Adds the key-value `pair` to `map`.
*
@@ -116,6 +148,17 @@ function arrayReduce(array, iteratee, accumulator, initAccum) {
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;
+}
+
/**
* Checks if `value` is a host object in IE < 9.
*
@@ -170,10 +213,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;
@@ -191,13 +234,13 @@ var reIsNative = RegExp('^' +
);
/** Built-in value references. */
-var Symbol = global.Symbol,
- Uint8Array = global.Uint8Array,
+var Symbol = root.Symbol,
+ Uint8Array = root.Uint8Array,
getOwnPropertySymbols = Object.getOwnPropertySymbols;
/* 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.matches/package.json b/lodash.matches/package.json
index 2e59e92ba..218d65c0a 100644
--- a/lodash.matches/package.json
+++ b/lodash.matches/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.matches",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.matches` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.matchesproperty/README.md b/lodash.matchesproperty/README.md
index 6cbc07168..e515f5207 100644
--- a/lodash.matchesproperty/README.md
+++ b/lodash.matchesproperty/README.md
@@ -1,4 +1,4 @@
-# lodash.matchesproperty v4.0.3
+# lodash.matchesproperty v4.0.4
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.3-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.4-npm-packages/lodash.matchesproperty) for more details.
diff --git a/lodash.matchesproperty/index.js b/lodash.matchesproperty/index.js
index e5f727c43..e0c07bb08 100644
--- a/lodash.matchesproperty/index.js
+++ b/lodash.matchesproperty/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash 4.0.4 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -71,6 +71,38 @@ cloneableTags[uint32Tag] = true;
cloneableTags[errorTag] = cloneableTags[funcTag] =
cloneableTags[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')();
+
/**
* Adds the key-value `pair` to `map`.
*
@@ -121,6 +153,17 @@ function arrayReduce(array, iteratee, accumulator, initAccum) {
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;
+}
+
/**
* Checks if `value` is a host object in IE < 9.
*
@@ -175,10 +218,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;
@@ -196,13 +239,13 @@ var reIsNative = RegExp('^' +
);
/** Built-in value references. */
-var Symbol = global.Symbol,
- Uint8Array = global.Uint8Array,
+var Symbol = root.Symbol,
+ Uint8Array = root.Uint8Array,
getOwnPropertySymbols = Object.getOwnPropertySymbols;
/* 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.matchesproperty/package.json b/lodash.matchesproperty/package.json
index eb7e81f42..7804654f0 100644
--- a/lodash.matchesproperty/package.json
+++ b/lodash.matchesproperty/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.matchesproperty",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.matchesProperty` 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 833188cc9..8e7d4d091 100644
--- a/lodash.merge/README.md
+++ b/lodash.merge/README.md
@@ -1,4 +1,4 @@
-# lodash.merge v4.0.3
+# lodash.merge v4.0.4
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.3-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.4-npm-packages/lodash.merge) for more details.
diff --git a/lodash.merge/index.js b/lodash.merge/index.js
index dd6e75c07..51feae151 100644
--- a/lodash.merge/index.js
+++ b/lodash.merge/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash 4.0.4 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -88,6 +88,38 @@ cloneableTags[uint32Tag] = true;
cloneableTags[errorTag] = cloneableTags[funcTag] =
cloneableTags[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')();
+
/**
* Adds the key-value `pair` to `map`.
*
@@ -138,6 +170,17 @@ function arrayReduce(array, iteratee, accumulator, initAccum) {
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;
+}
+
/**
* Checks if `value` is a host object in IE < 9.
*
@@ -206,10 +249,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;
@@ -227,14 +270,14 @@ var reIsNative = RegExp('^' +
);
/** Built-in value references. */
-var Symbol = global.Symbol,
- Uint8Array = global.Uint8Array,
+var Symbol = root.Symbol,
+ Uint8Array = root.Uint8Array,
getOwnPropertySymbols = Object.getOwnPropertySymbols,
propertyIsEnumerable = objectProto.propertyIsEnumerable;
/* 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.merge/package.json b/lodash.merge/package.json
index 19368d70c..2581b17a3 100644
--- a/lodash.merge/package.json
+++ b/lodash.merge/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.merge",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.merge` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.mergewith/README.md b/lodash.mergewith/README.md
index 6b4346abc..e2f622b99 100644
--- a/lodash.mergewith/README.md
+++ b/lodash.mergewith/README.md
@@ -1,4 +1,4 @@
-# lodash.mergewith v4.0.3
+# lodash.mergewith v4.0.4
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.3-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.4-npm-packages/lodash.mergewith) for more details.
diff --git a/lodash.mergewith/index.js b/lodash.mergewith/index.js
index d4f285841..5e5ade01e 100644
--- a/lodash.mergewith/index.js
+++ b/lodash.mergewith/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash 4.0.4 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -88,6 +88,38 @@ cloneableTags[uint32Tag] = true;
cloneableTags[errorTag] = cloneableTags[funcTag] =
cloneableTags[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')();
+
/**
* Adds the key-value `pair` to `map`.
*
@@ -138,6 +170,17 @@ function arrayReduce(array, iteratee, accumulator, initAccum) {
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;
+}
+
/**
* Checks if `value` is a host object in IE < 9.
*
@@ -206,10 +249,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;
@@ -227,14 +270,14 @@ var reIsNative = RegExp('^' +
);
/** Built-in value references. */
-var Symbol = global.Symbol,
- Uint8Array = global.Uint8Array,
+var Symbol = root.Symbol,
+ Uint8Array = root.Uint8Array,
getOwnPropertySymbols = Object.getOwnPropertySymbols,
propertyIsEnumerable = objectProto.propertyIsEnumerable;
/* 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) : '',
@@ -1187,6 +1230,8 @@ function toPlainObject(value) {
* method instead. The `customizer` is invoked with seven arguments:
* (objValue, srcValue, key, object, source, stack).
*
+ * **Note:** This method mutates `object`.
+ *
* @static
* @memberOf _
* @category Object
diff --git a/lodash.mergewith/package.json b/lodash.mergewith/package.json
index b74e20e46..07c713c9c 100644
--- a/lodash.mergewith/package.json
+++ b/lodash.mergewith/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.mergewith",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.mergeWith` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.rangeright/LICENSE b/lodash.rangeright/LICENSE
index bcbe13d67..e0c69d560 100644
--- a/lodash.rangeright/LICENSE
+++ b/lodash.rangeright/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.rangeright/README.md b/lodash.rangeright/README.md
index abf42a6bc..b751d0309 100644
--- a/lodash.rangeright/README.md
+++ b/lodash.rangeright/README.md
@@ -1,4 +1,4 @@
-# lodash.rangeright v4.0.3
+# lodash.rangeright v4.0.4
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.3-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.4-npm-packages/lodash.rangeright) for more details.
diff --git a/lodash.rangeright/index.js b/lodash.rangeright/index.js
index 51b374857..1eaa8758d 100644
--- a/lodash.rangeright/index.js
+++ b/lodash.rangeright/index.js
@@ -1,10 +1,10 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash 4.0.4 (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 references for various `Number` constants. */
@@ -13,7 +13,8 @@ var MAX_SAFE_INTEGER = 9007199254740991,
/** `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;
@@ -51,7 +52,8 @@ function isIndex(value, length) {
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;
@@ -125,8 +127,9 @@ function createRange(fromRight) {
/**
* 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.
@@ -141,7 +144,8 @@ var getLength = baseProperty('length');
* @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`.
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
+ * else `false`.
*/
function isIterateeCall(value, index, object) {
if (!isObject(object)) {
@@ -149,19 +153,22 @@ function isIterateeCall(value, index, object) {
}
var type = typeof index;
if (type == 'number'
- ? (isArrayLike(object) && isIndex(index, object.length))
- : (type == 'string' && index in object)) {
+ ? (isArrayLike(object) && isIndex(index, object.length))
+ : (type == 'string' && index in object)
+ ) {
return eq(object[index], value);
}
return false;
}
/**
- * 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.
@@ -197,6 +204,7 @@ function eq(value, other) {
*
* @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`.
@@ -223,9 +231,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(_);
@@ -245,13 +255,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);
@@ -272,11 +285,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`.
@@ -299,11 +314,63 @@ function isObject(value) {
return !!value && (type == 'object' || type == 'function');
}
+/**
+ * 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 a number.
*
* @static
* @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to process.
* @returns {number} Returns the number.
@@ -322,6 +389,12 @@ function isObject(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;
@@ -342,6 +415,7 @@ function toNumber(value) {
*
* @static
* @memberOf _
+ * @since 4.0.0
* @category Util
* @param {number} [start=0] The start of the range.
* @param {number} end The end of the range.
diff --git a/lodash.rangeright/package.json b/lodash.rangeright/package.json
index 10f7364d5..df0a3a62e 100644
--- a/lodash.rangeright/package.json
+++ b/lodash.rangeright/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.rangeright",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.rangeRight` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.repeat/README.md b/lodash.repeat/README.md
index 0bf4b8169..ac5ec19bc 100644
--- a/lodash.repeat/README.md
+++ b/lodash.repeat/README.md
@@ -1,4 +1,4 @@
-# lodash.repeat v4.0.3
+# lodash.repeat v4.0.4
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.3-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.4-npm-packages/lodash.repeat) for more details.
diff --git a/lodash.repeat/index.js b/lodash.repeat/index.js
index 812d4c8db..bb1591f34 100644
--- a/lodash.repeat/index.js
+++ b/lodash.repeat/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,
@@ -37,18 +36,14 @@ var reIsUint = /^(?:0|[1-9]\d*)$/;
/** Built-in method references without a dependency on `root`. */
var freeParseInt = parseInt;
-/** Used for built-in method references. */
-var objectProto = Object.prototype;
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
-/**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objectToString = objectProto.toString;
+/** Detect free variable `self`. */
+var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
-/* Built-in method references for those with the same name as other `lodash` methods. */
-var nativeFloor = Math.floor;
+/** Used as a reference to the global object. */
+var root = freeGlobal || freeSelf || Function('return this')();
/**
* The base implementation of `_.property` without support for deep paths.
@@ -63,6 +58,26 @@ function baseProperty(key) {
};
}
+/** 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;
+
+/** Built-in value references. */
+var Symbol = root.Symbol;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeFloor = Math.floor;
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
+
/**
* The base implementation of `_.repeat` which doesn't coerce arguments.
*
@@ -91,6 +106,26 @@ function baseRepeat(string, n) {
return result;
}
+/**
+ * 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;
+}
+
/**
* Gets the "length" property value of `object`.
*
@@ -157,8 +192,8 @@ function isIterateeCall(value, index, object) {
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
* @example
*
- * var object = { 'user': 'fred' };
- * var other = { 'user': 'fred' };
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
*
* _.eq(object, object);
* // => true
@@ -216,8 +251,7 @@ function isArrayLike(value) {
* @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(_);
@@ -332,8 +366,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);
@@ -385,7 +418,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
@@ -459,6 +492,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);
+}
+
/**
* Repeats the given string `n` times.
*
diff --git a/lodash.repeat/package.json b/lodash.repeat/package.json
index 63d71c9dd..7b11481f5 100644
--- a/lodash.repeat/package.json
+++ b/lodash.repeat/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.repeat",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.repeat` 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.rest/README.md b/lodash.rest/README.md
index 5342ca445..511f9fd17 100644
--- a/lodash.rest/README.md
+++ b/lodash.rest/README.md
@@ -1,4 +1,4 @@
-# lodash.rest v4.0.3
+# lodash.rest v4.0.4
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.3-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.4-npm-packages/lodash.rest) for more details.
diff --git a/lodash.rest/index.js b/lodash.rest/index.js
index 231578641..98ace7c33 100644
--- a/lodash.rest/index.js
+++ b/lodash.rest/index.js
@@ -46,8 +46,7 @@ var freeParseInt = parseInt;
* @returns {*} Returns the result of `func`.
*/
function apply(func, thisArg, args) {
- var length = args.length;
- switch (length) {
+ switch (args.length) {
case 0: return func.call(thisArg);
case 1: return func.call(thisArg, args[0]);
case 2: return func.call(thisArg, args[0], args[1]);
@@ -69,6 +68,35 @@ var objectToString = objectProto.toString;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max;
+/**
+ * The base implementation of `_.rest` which doesn't validate or coerce arguments.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ */
+function baseRest(func, start) {
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ array = Array(length);
+
+ while (++index < length) {
+ array[index] = args[start + index];
+ }
+ index = -1;
+ var otherArgs = Array(start + 1);
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = array;
+ return apply(func, this, otherArgs);
+ };
+}
+
/**
* Creates a function that invokes `func` with the `this` binding of the
* created function and arguments from `start` and beyond provided as
@@ -98,29 +126,8 @@ function rest(func, start) {
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
- start = nativeMax(start === undefined ? (func.length - 1) : toInteger(start), 0);
- return function() {
- var args = arguments,
- index = -1,
- length = nativeMax(args.length - start, 0),
- array = Array(length);
-
- while (++index < length) {
- array[index] = args[start + index];
- }
- switch (start) {
- case 0: return func.call(this, array);
- case 1: return func.call(this, args[0], array);
- case 2: return func.call(this, args[0], args[1], array);
- }
- var otherArgs = Array(start + 1);
- index = -1;
- while (++index < start) {
- otherArgs[index] = args[index];
- }
- otherArgs[start] = array;
- return apply(func, this, otherArgs);
- };
+ start = start === undefined ? start : toInteger(start);
+ return baseRest(func, start);
}
/**
@@ -131,8 +138,7 @@ function rest(func, start) {
* @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(_);
@@ -215,8 +221,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);
@@ -268,7 +273,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
diff --git a/lodash.rest/package.json b/lodash.rest/package.json
index 50193acb2..18cf7fd24 100644
--- a/lodash.rest/package.json
+++ b/lodash.rest/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.rest",
- "version": "4.0.3",
+ "version": "4.0.4",
"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 606d00aec..cf9af8760 100644
--- a/lodash.round/README.md
+++ b/lodash.round/README.md
@@ -1,4 +1,4 @@
-# lodash.round v4.0.3
+# lodash.round v4.0.4
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.3-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.4-npm-packages/lodash.round) for more details.
diff --git a/lodash.round/index.js b/lodash.round/index.js
index 095433e21..4ab230f1c 100644
--- a/lodash.round/index.js
+++ b/lodash.round/index.js
@@ -13,9 +13,7 @@ var INFINITY = 1 / 0,
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;
@@ -46,7 +44,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;
@@ -106,34 +104,9 @@ function createRound(methodName) {
};
}
-/**
- * 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
@@ -250,7 +223,7 @@ function toFinite(value) {
* Converts `value` to an integer.
*
* **Note:** This method is loosely based on
- * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
*
* @static
* @memberOf _
@@ -310,7 +283,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.round/package.json b/lodash.round/package.json
index 231c9fbfd..3d9e72177 100644
--- a/lodash.round/package.json
+++ b/lodash.round/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.round",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.round` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.samplesize/README.md b/lodash.samplesize/README.md
index ce181d537..8e91e7909 100644
--- a/lodash.samplesize/README.md
+++ b/lodash.samplesize/README.md
@@ -1,4 +1,4 @@
-# lodash.samplesize v4.0.3
+# lodash.samplesize v4.0.4
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.3-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.4-npm-packages/lodash.samplesize) for more details.
diff --git a/lodash.samplesize/index.js b/lodash.samplesize/index.js
index 230aab7eb..c6ff965e0 100644
--- a/lodash.samplesize/index.js
+++ b/lodash.samplesize/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.3 (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;
@@ -91,7 +77,7 @@ function baseClamp(number, lower, upper) {
*
* @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) {
@@ -125,6 +111,21 @@ function baseRandom(lower, upper) {
*/
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.
*
@@ -395,6 +396,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.
*
@@ -409,7 +445,7 @@ function isSymbol(value) {
* @returns {number} Returns the converted integer.
* @example
*
- * _.toInteger(3);
+ * _.toInteger(3.2);
* // => 3
*
* _.toInteger(Number.MIN_VALUE);
@@ -418,20 +454,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;
}
/**
@@ -445,8 +475,8 @@ function toInteger(value) {
* @returns {number} Returns the number.
* @example
*
- * _.toNumber(3);
- * // => 3
+ * _.toNumber(3.2);
+ * // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
@@ -454,8 +484,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.samplesize/package.json b/lodash.samplesize/package.json
index 24c68396b..c88bb7808 100644
--- a/lodash.samplesize/package.json
+++ b/lodash.samplesize/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.samplesize",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.sampleSize` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.size/README.md b/lodash.size/README.md
index e514cd397..1a41dce23 100644
--- a/lodash.size/README.md
+++ b/lodash.size/README.md
@@ -1,4 +1,4 @@
-# lodash.size v4.0.3
+# lodash.size v4.0.4
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.3-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.4-npm-packages/lodash.size) for more details.
diff --git a/lodash.size/index.js b/lodash.size/index.js
index 2824f6383..00eb4164b 100644
--- a/lodash.size/index.js
+++ b/lodash.size/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash 4.0.4 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -178,8 +178,7 @@ var isArray = Array.isArray;
* // => false
*/
function isArrayLike(value) {
- return value != null &&
- !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value));
+ return value != null && isLength(getLength(value)) && !isFunction(value);
}
/**
@@ -200,8 +199,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.size/package.json b/lodash.size/package.json
index 77e048b59..14203a8b3 100644
--- a/lodash.size/package.json
+++ b/lodash.size/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.size",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.size` 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.slice/README.md b/lodash.slice/README.md
index d9c8fbce4..a5f9dfe6d 100644
--- a/lodash.slice/README.md
+++ b/lodash.slice/README.md
@@ -1,4 +1,4 @@
-# lodash.slice v4.0.3
+# lodash.slice v4.0.4
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.3-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.4-npm-packages/lodash.slice) for more details.
diff --git a/lodash.slice/index.js b/lodash.slice/index.js
index 006052b6f..d090d274a 100644
--- a/lodash.slice/index.js
+++ b/lodash.slice/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash 4.0.4 (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.slice/package.json b/lodash.slice/package.json
index bb1d79e41..699dfa8c5 100644
--- a/lodash.slice/package.json
+++ b/lodash.slice/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.slice",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.slice` 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.tail/README.md b/lodash.tail/README.md
index 619676372..1cf46508e 100644
--- a/lodash.tail/README.md
+++ b/lodash.tail/README.md
@@ -1,4 +1,4 @@
-# lodash.tail v4.0.3
+# lodash.tail v4.0.4
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.3-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.4-npm-packages/lodash.tail) for more details.
diff --git a/lodash.tail/index.js b/lodash.tail/index.js
index 86bd24995..687ed2342 100644
--- a/lodash.tail/index.js
+++ b/lodash.tail/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors
* Released under MIT license
@@ -202,6 +202,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.
*
@@ -216,7 +251,7 @@ function isSymbol(value) {
* @returns {number} Returns the converted integer.
* @example
*
- * _.toInteger(3);
+ * _.toInteger(3.2);
* // => 3
*
* _.toInteger(Number.MIN_VALUE);
@@ -225,20 +260,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;
}
/**
@@ -252,8 +281,8 @@ function toInteger(value) {
* @returns {number} Returns the number.
* @example
*
- * _.toNumber(3);
- * // => 3
+ * _.toNumber(3.2);
+ * // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
@@ -261,8 +290,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.tail/package.json b/lodash.tail/package.json
index a8afd45d3..254959a31 100644
--- a/lodash.tail/package.json
+++ b/lodash.tail/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.tail",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.tail` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.take/README.md b/lodash.take/README.md
index fa63e98ba..dda3870b5 100644
--- a/lodash.take/README.md
+++ b/lodash.take/README.md
@@ -1,4 +1,4 @@
-# lodash.take v4.0.3
+# lodash.take v4.0.4
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.3-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.4-npm-packages/lodash.take) for more details.
diff --git a/lodash.take/index.js b/lodash.take/index.js
index 7c60a3435..e0a273dd9 100644
--- a/lodash.take/index.js
+++ b/lodash.take/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors
* Released under MIT license
@@ -183,6 +183,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.
*
@@ -197,7 +232,7 @@ function isSymbol(value) {
* @returns {number} Returns the converted integer.
* @example
*
- * _.toInteger(3);
+ * _.toInteger(3.2);
* // => 3
*
* _.toInteger(Number.MIN_VALUE);
@@ -206,20 +241,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;
}
/**
@@ -233,8 +262,8 @@ function toInteger(value) {
* @returns {number} Returns the number.
* @example
*
- * _.toNumber(3);
- * // => 3
+ * _.toNumber(3.2);
+ * // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
@@ -242,8 +271,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.take/package.json b/lodash.take/package.json
index b44e98e69..2d524d22c 100644
--- a/lodash.take/package.json
+++ b/lodash.take/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.take",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.take` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.takeright/README.md b/lodash.takeright/README.md
index 66ce50c93..e6cf97752 100644
--- a/lodash.takeright/README.md
+++ b/lodash.takeright/README.md
@@ -1,4 +1,4 @@
-# lodash.takeright v4.0.3
+# lodash.takeright v4.0.4
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.3-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.4-npm-packages/lodash.takeright) for more details.
diff --git a/lodash.takeright/index.js b/lodash.takeright/index.js
index 5e938b269..551c1d166 100644
--- a/lodash.takeright/index.js
+++ b/lodash.takeright/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors
* Released under MIT license
@@ -185,6 +185,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.
*
@@ -199,7 +234,7 @@ function isSymbol(value) {
* @returns {number} Returns the converted integer.
* @example
*
- * _.toInteger(3);
+ * _.toInteger(3.2);
* // => 3
*
* _.toInteger(Number.MIN_VALUE);
@@ -208,20 +243,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;
}
/**
@@ -235,8 +264,8 @@ function toInteger(value) {
* @returns {number} Returns the number.
* @example
*
- * _.toNumber(3);
- * // => 3
+ * _.toNumber(3.2);
+ * // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
@@ -244,8 +273,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.takeright/package.json b/lodash.takeright/package.json
index 0d319d438..519fce712 100644
--- a/lodash.takeright/package.json
+++ b/lodash.takeright/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.takeright",
- "version": "4.0.3",
+ "version": "4.0.4",
"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 91f1e55c0..6d2d2e842 100644
--- a/lodash.tointeger/README.md
+++ b/lodash.tointeger/README.md
@@ -1,4 +1,4 @@
-# lodash.tointeger v4.0.3
+# lodash.tointeger v4.0.4
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.3-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.4-npm-packages/lodash.tointeger) for more details.
diff --git a/lodash.tointeger/index.js b/lodash.tointeger/index.js
index f0a900935..5e1c8769d 100644
--- a/lodash.tointeger/index.js
+++ b/lodash.tointeger/index.js
@@ -13,9 +13,7 @@ var INFINITY = 1 / 0,
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;
@@ -37,39 +35,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
@@ -186,7 +159,7 @@ function toFinite(value) {
* Converts `value` to an integer.
*
* **Note:** This method is loosely based on
- * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
*
* @static
* @memberOf _
@@ -246,7 +219,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.tointeger/package.json b/lodash.tointeger/package.json
index e453d3373..884d3b15d 100644
--- a/lodash.tointeger/package.json
+++ b/lodash.tointeger/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.tointeger",
- "version": "4.0.3",
+ "version": "4.0.4",
"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 9fedd699c..204a524be 100644
--- a/lodash.tolength/README.md
+++ b/lodash.tolength/README.md
@@ -1,4 +1,4 @@
-# lodash.tolength v4.0.3
+# lodash.tolength v4.0.4
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.3-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.4-npm-packages/lodash.tolength) for more details.
diff --git a/lodash.tolength/index.js b/lodash.tolength/index.js
index cef24cc71..4624b1bdc 100644
--- a/lodash.tolength/index.js
+++ b/lodash.tolength/index.js
@@ -16,9 +16,7 @@ var INFINITY = 1 / 0,
var MAX_ARRAY_LENGTH = 4294967295;
/** `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;
@@ -40,7 +38,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;
@@ -66,34 +64,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
@@ -210,7 +183,7 @@ function toFinite(value) {
* Converts `value` to an integer.
*
* **Note:** This method is loosely based on
- * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
*
* @static
* @memberOf _
@@ -244,7 +217,7 @@ function toInteger(value) {
* array-like object.
*
* **Note:** This method is based on
- * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
*
* @static
* @memberOf _
@@ -301,7 +274,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.tolength/package.json b/lodash.tolength/package.json
index fad83516a..e3ba5584e 100644
--- a/lodash.tolength/package.json
+++ b/lodash.tolength/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.tolength",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.toLength` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.toplainobject/LICENSE b/lodash.toplainobject/LICENSE
index bcbe13d67..e0c69d560 100644
--- a/lodash.toplainobject/LICENSE
+++ b/lodash.toplainobject/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.toplainobject/README.md b/lodash.toplainobject/README.md
index 2d844eaf9..940d8b145 100644
--- a/lodash.toplainobject/README.md
+++ b/lodash.toplainobject/README.md
@@ -1,4 +1,4 @@
-# lodash.toplainobject v4.0.3
+# lodash.toplainobject v4.0.4
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.3-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.4-npm-packages/lodash.toplainobject) for more details.
diff --git a/lodash.toplainobject/index.js b/lodash.toplainobject/index.js
index 86fc04b26..6b4991193 100644
--- a/lodash.toplainobject/index.js
+++ b/lodash.toplainobject/index.js
@@ -1,10 +1,10 @@
/**
- * lodash 4.0.3 (Custom Build)
+ * lodash 4.0.4 (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 keysIn = require('lodash.keysin');
@@ -39,24 +39,10 @@ function assignValue(object, key, value) {
* @param {Object} source The object to copy properties from.
* @param {Array} props The property identifiers to copy.
* @param {Object} [object={}] The object to copy properties to.
- * @returns {Object} Returns `object`.
- */
-function copyObject(source, props, object) {
- return copyObjectWith(source, props, object);
-}
-
-/**
- * This function is like `copyObject` except that it accepts a function to
- * customize copied values.
- *
- * @private
- * @param {Object} source The object to copy properties from.
- * @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`.
*/
-function copyObjectWith(source, props, object, customizer) {
+function copyObject(source, props, object, customizer) {
object || (object = {});
var index = -1,
diff --git a/lodash.toplainobject/package.json b/lodash.toplainobject/package.json
index 54f8cc1db..684fb8ffe 100644
--- a/lodash.toplainobject/package.json
+++ b/lodash.toplainobject/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.toplainobject",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.toPlainObject` 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.tosafeinteger/README.md b/lodash.tosafeinteger/README.md
index 6ad231903..05a00d43e 100644
--- a/lodash.tosafeinteger/README.md
+++ b/lodash.tosafeinteger/README.md
@@ -1,4 +1,4 @@
-# lodash.tosafeinteger v4.0.3
+# lodash.tosafeinteger v4.0.4
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.3-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.4-npm-packages/lodash.tosafeinteger) for more details.
diff --git a/lodash.tosafeinteger/index.js b/lodash.tosafeinteger/index.js
index 13298b2bf..d3544d7b1 100644
--- a/lodash.tosafeinteger/index.js
+++ b/lodash.tosafeinteger/index.js
@@ -14,9 +14,7 @@ var INFINITY = 1 / 0,
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;
@@ -38,7 +36,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;
@@ -64,34 +62,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
@@ -208,7 +181,7 @@ function toFinite(value) {
* Converts `value` to an integer.
*
* **Note:** This method is loosely based on
- * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
*
* @static
* @memberOf _
@@ -268,7 +241,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.tosafeinteger/package.json b/lodash.tosafeinteger/package.json
index be4e6c0cb..42c7303de 100644
--- a/lodash.tosafeinteger/package.json
+++ b/lodash.tosafeinteger/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.tosafeinteger",
- "version": "4.0.3",
+ "version": "4.0.4",
"description": "The lodash method `_.toSafeInteger` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",