diff --git a/README.md b/README.md
index 295a973a5..2326b4ae4 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# lodash v4.1.4
+# lodash v4.1.5
The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method.
diff --git a/lodash._mapcache/README.md b/lodash._mapcache/README.md
index 905fe82f7..68c6245c0 100644
--- a/lodash._mapcache/README.md
+++ b/lodash._mapcache/README.md
@@ -1,4 +1,4 @@
-# lodash._mapcache v4.1.4
+# lodash._mapcache v4.1.5
The internal [lodash](https://lodash.com/) function `MapCache` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var MapCache = require('lodash._mapcache');
```
-See the [package source](https://github.com/lodash/lodash/blob/4.1.4-npm-packages/lodash._mapcache) for more details.
+See the [package source](https://github.com/lodash/lodash/blob/4.1.5-npm-packages/lodash._mapcache) for more details.
diff --git a/lodash._mapcache/index.js b/lodash._mapcache/index.js
index b575d389a..85790a167 100644
--- a/lodash._mapcache/index.js
+++ b/lodash._mapcache/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.1.4 (Custom Build)
+ * lodash 4.1.5 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors
* Released under MIT license
@@ -14,7 +14,10 @@ var HASH_UNDEFINED = '__lodash_hash_undefined__';
var funcTag = '[object Function]',
genTag = '[object GeneratorFunction]';
-/** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */
+/**
+ * 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). */
@@ -99,7 +102,8 @@ var funcToString = Function.prototype.toString;
var hasOwnProperty = objectProto.hasOwnProperty;
/**
- * 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;
@@ -118,7 +122,7 @@ var Map = getNative(root, 'Map'),
nativeCreate = getNative(Object, 'create');
/**
- * Creates an hash object.
+ * Creates a hash object.
*
* @private
* @constructor
@@ -402,6 +406,25 @@ function isKeyable(value) {
(type == 'string' && value != '__proto__') || value == null;
}
+/**
+ * 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 '';
+}
+
/**
* Performs a
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
@@ -465,8 +488,9 @@ 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 _
@@ -493,34 +517,6 @@ 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 a native function.
*
@@ -540,14 +536,11 @@ function isObjectLike(value) {
* // => false
*/
function isNative(value) {
- if (value == null) {
+ if (!isObject(value)) {
return false;
}
- if (isFunction(value)) {
- return reIsNative.test(funcToString.call(value));
- }
- return isObjectLike(value) &&
- (isHostObject(value) ? reIsNative : reIsHostCtor).test(value);
+ var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
+ return pattern.test(toSource(value));
}
module.exports = MapCache;
diff --git a/lodash._mapcache/package.json b/lodash._mapcache/package.json
index acc29d09f..4bd4bad7d 100644
--- a/lodash._mapcache/package.json
+++ b/lodash._mapcache/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash._mapcache",
- "version": "4.1.4",
+ "version": "4.1.5",
"description": "The internal lodash function `MapCache` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.keysin/README.md b/lodash.keysin/README.md
index 7dfa7e3e7..f0158bce7 100644
--- a/lodash.keysin/README.md
+++ b/lodash.keysin/README.md
@@ -1,4 +1,4 @@
-# lodash.keysin v4.1.4
+# lodash.keysin v4.1.5
The [lodash](https://lodash.com/) method `_.keysIn` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var keysIn = require('lodash.keysin');
```
-See the [documentation](https://lodash.com/docs#keysIn) or [package source](https://github.com/lodash/lodash/blob/4.1.4-npm-packages/lodash.keysin) for more details.
+See the [documentation](https://lodash.com/docs#keysIn) or [package source](https://github.com/lodash/lodash/blob/4.1.5-npm-packages/lodash.keysin) for more details.
diff --git a/lodash.keysin/index.js b/lodash.keysin/index.js
index 9d34a0f66..a8bd90669 100644
--- a/lodash.keysin/index.js
+++ b/lodash.keysin/index.js
@@ -19,43 +19,27 @@ var argsTag = '[object Arguments]',
/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;
-/** Used to determine if values are of the language type `Object`. */
-var objectTypes = {
- 'function': true,
- 'object': true
-};
-
-/** Detect free variable `exports`. */
-var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType)
- ? exports
- : 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);
+var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
/** Detect free variable `self`. */
-var freeSelf = checkGlobal(objectTypes[typeof self] && self);
+var freeSelf = typeof self == 'object' && self && self.Object === Object && 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. */
+var root = freeGlobal || freeSelf || Function('return this')();
/**
- * Used as a reference to the global object.
+ * The base implementation of `_.property` without support for deep paths.
*
- * The `this` value is used if it's the global object to avoid Greasemonkey's
- * restricted `window` object, otherwise the `window` object is used.
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new accessor function.
*/
-var root = freeGlobal ||
- ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) ||
- freeSelf || thisGlobal || Function('return this')();
+function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+}
/**
* The base implementation of `_.times` without support for iteratee shorthands
@@ -76,17 +60,6 @@ function baseTimes(n, iteratee) {
return result;
}
-/**
- * Checks if `value` is a global object.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {null|Object} Returns `value` if it's a global object, else `null`.
- */
-function checkGlobal(value) {
- return (value && value.Object === Object) ? value : null;
-}
-
/**
* Converts `iterator` to an array.
*
@@ -147,19 +120,6 @@ if (enumerate && !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf')) {
};
}
-/**
- * The base implementation of `_.property` without support for deep paths.
- *
- * @private
- * @param {string} key The key of the property to get.
- * @returns {Function} Returns the new accessor function.
- */
-function baseProperty(key) {
- return function(object) {
- return object == null ? undefined : object[key];
- };
-}
-
/**
* Gets the "length" property value of `object`.
*
@@ -227,7 +187,7 @@ function isPrototype(value) {
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
* else `false`.
* @example
*
@@ -249,11 +209,9 @@ function isArguments(value) {
* @static
* @memberOf _
* @since 0.1.0
- * @type {Function}
* @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 an array, else `false`.
* @example
*
* _.isArray([1, 2, 3]);
@@ -336,8 +294,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(_);
@@ -452,8 +409,7 @@ function isObjectLike(value) {
* @memberOf _
* @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 string, else `false`.
* @example
*
* _.isString('abc');
diff --git a/lodash.keysin/package.json b/lodash.keysin/package.json
index 6b8e96801..b661992b1 100644
--- a/lodash.keysin/package.json
+++ b/lodash.keysin/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.keysin",
- "version": "4.1.4",
+ "version": "4.1.5",
"description": "The lodash method `_.keysIn` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",