diff --git a/README.md b/README.md index 3f464c9c3..289e4b420 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# lodash-amd v4.17.10 +# lodash-amd v4.17.11 The [Lodash](https://lodash.com/) library exported as [AMD](https://github.com/amdjs/amdjs-api/wiki/AMD) modules. @@ -27,4 +27,4 @@ require({ }); ``` -See the [package source](https://github.com/lodash/lodash/tree/4.17.10-amd) for more details. +See the [package source](https://github.com/lodash/lodash/tree/4.17.11-amd) for more details. diff --git a/_baseMergeDeep.js b/_baseMergeDeep.js index 1e816684b..d39720a5f 100644 --- a/_baseMergeDeep.js +++ b/_baseMergeDeep.js @@ -63,7 +63,7 @@ define(['./_assignMergeValue', './_cloneBuffer', './_cloneTypedArray', './_copyA if (isArguments(objValue)) { newValue = toPlainObject(objValue); } - else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { + else if (!isObject(objValue) || isFunction(objValue)) { newValue = initCloneObject(srcValue); } } diff --git a/_hasUnicodeWord.js b/_hasUnicodeWord.js index 3c1b47ec5..5e61dd2ca 100644 --- a/_hasUnicodeWord.js +++ b/_hasUnicodeWord.js @@ -1,7 +1,7 @@ define([], function() { /** Used to detect strings that need a more robust regexp to match words. */ - var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; /** * Checks if `string` contains a word composed of Unicode symbols. diff --git a/_safeGet.js b/_safeGet.js index 7b44db8b5..79888d729 100644 --- a/_safeGet.js +++ b/_safeGet.js @@ -1,8 +1,5 @@ define([], function() { - /** Used as a safe reference for `undefined` in pre-ES5 environments. */ - var undefined; - /** * Gets the value at `key`, unless `key` is "__proto__". * @@ -12,9 +9,11 @@ define([], function() { * @returns {*} Returns the property value. */ function safeGet(object, key) { - return key == '__proto__' - ? undefined - : object[key]; + if (key == '__proto__') { + return; + } + + return object[key]; } return safeGet; diff --git a/main.js b/main.js index c1d170938..0f99b4fd2 100644 --- a/main.js +++ b/main.js @@ -13,7 +13,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.17.10'; + var VERSION = '4.17.11'; /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; @@ -277,7 +277,7 @@ var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); /** Used to detect strings that need a more robust regexp to match words. */ - var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; /** Used to assign default `context` object properties. */ var contextProps = [ @@ -1225,20 +1225,6 @@ return result; } - /** - * Gets the value at `key`, unless `key` is "__proto__". - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ - function safeGet(object, key) { - return key == '__proto__' - ? undefined - : object[key]; - } - /** * Converts `set` to an array of its values. * @@ -3696,7 +3682,7 @@ if (isArguments(objValue)) { newValue = toPlainObject(objValue); } - else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { + else if (!isObject(objValue) || isFunction(objValue)) { newValue = initCloneObject(srcValue); } } @@ -6619,6 +6605,22 @@ return array; } + /** + * Gets the value at `key`, unless `key` is "__proto__". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function safeGet(object, key) { + if (key == '__proto__') { + return; + } + + return object[key]; + } + /** * Sets metadata for `func`. * diff --git a/package.json b/package.json index 77aa6ccd2..a3109f809 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lodash-amd", - "version": "4.17.10", + "version": "4.17.11", "description": "Lodash exported as AMD modules.", "keywords": "amd, modules, stdlib, util", "homepage": "https://lodash.com/custom-builds",