From 958d7f06ddf588acc994bbc3770a2c4e3000bc11 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 1 Mar 2016 21:06:36 -0800 Subject: [PATCH] Bump to v4.3.2. --- README.md | 2 +- lodash.clone/README.md | 4 +- lodash.clone/index.js | 4 +- lodash.clone/package.json | 4 +- lodash.clonedeep/README.md | 4 +- lodash.clonedeep/index.js | 4 +- lodash.clonedeep/package.json | 4 +- lodash.clonedeepwith/README.md | 4 +- lodash.clonedeepwith/index.js | 4 +- lodash.clonedeepwith/package.json | 4 +- lodash.clonewith/README.md | 4 +- lodash.clonewith/index.js | 6 +- lodash.clonewith/package.json | 4 +- lodash.conforms/LICENSE | 60 +++++--- lodash.conforms/README.md | 4 +- lodash.conforms/index.js | 16 ++- lodash.conforms/package.json | 2 +- lodash.defaultsdeep/README.md | 4 +- lodash.defaultsdeep/index.js | 20 +-- lodash.defaultsdeep/package.json | 4 +- lodash.isbuffer/README.md | 4 +- lodash.isbuffer/index.js | 6 +- lodash.isbuffer/package.json | 6 +- lodash.ismap/README.md | 4 +- lodash.ismap/index.js | 2 +- lodash.ismap/package.json | 4 +- lodash.isset/README.md | 4 +- lodash.isset/index.js | 2 +- lodash.isset/package.json | 4 +- lodash.isweakmap/README.md | 4 +- lodash.isweakmap/index.js | 2 +- lodash.isweakmap/package.json | 4 +- lodash.matches/README.md | 4 +- lodash.matches/index.js | 2 +- lodash.matches/package.json | 8 +- lodash.matchesproperty/README.md | 4 +- lodash.matchesproperty/index.js | 2 +- lodash.matchesproperty/package.json | 10 +- lodash.merge/README.md | 4 +- lodash.merge/index.js | 30 ++-- lodash.merge/package.json | 4 +- lodash.mergewith/README.md | 4 +- lodash.mergewith/index.js | 17 +-- lodash.mergewith/package.json | 4 +- lodash.orderby/README.md | 4 +- lodash.orderby/index.js | 212 ++++++++++++++++++---------- lodash.orderby/package.json | 2 +- lodash.set/README.md | 4 +- lodash.set/index.js | 48 ++++--- lodash.set/package.json | 2 +- lodash.setwith/README.md | 4 +- lodash.setwith/index.js | 48 ++++--- lodash.setwith/package.json | 2 +- lodash.times/README.md | 4 +- lodash.times/index.js | 37 +---- lodash.times/package.json | 2 +- 56 files changed, 372 insertions(+), 298 deletions(-) diff --git a/README.md b/README.md index dbb949312..74931de5a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# lodash v4.3.1 +# lodash v4.3.2 The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method. diff --git a/lodash.clone/README.md b/lodash.clone/README.md index 490aed3a0..9808d7efd 100644 --- a/lodash.clone/README.md +++ b/lodash.clone/README.md @@ -1,4 +1,4 @@ -# lodash.clone v4.3.1 +# lodash.clone v4.3.2 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.3.1-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.3.2-npm-packages/lodash.clone) for more details. diff --git a/lodash.clone/index.js b/lodash.clone/index.js index cd1dda48b..962e454c0 100644 --- a/lodash.clone/index.js +++ b/lodash.clone/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.3.1 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -21,9 +21,11 @@ var baseClone = require('lodash._baseclone'); * * @static * @memberOf _ + * @since 0.1.0 * @category Lang * @param {*} value The value to clone. * @returns {*} Returns the cloned value. + * @see _.cloneDeep * @example * * var objects = [{ 'a': 1 }, { 'b': 2 }]; diff --git a/lodash.clone/package.json b/lodash.clone/package.json index d0c851621..b5735f0cc 100644 --- a/lodash.clone/package.json +++ b/lodash.clone/package.json @@ -1,6 +1,6 @@ { "name": "lodash.clone", - "version": "4.3.1", + "version": "4.3.2", "description": "The lodash method `_.clone` 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._baseclone": "^4.0.0" + "lodash._baseclone": "~4.5.0" } } diff --git a/lodash.clonedeep/README.md b/lodash.clonedeep/README.md index 4112f245f..1287ee1c0 100644 --- a/lodash.clonedeep/README.md +++ b/lodash.clonedeep/README.md @@ -1,4 +1,4 @@ -# lodash.clonedeep v4.3.1 +# lodash.clonedeep v4.3.2 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.3.1-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.3.2-npm-packages/lodash.clonedeep) for more details. diff --git a/lodash.clonedeep/index.js b/lodash.clonedeep/index.js index cc9d2b080..3e5b2228e 100644 --- a/lodash.clonedeep/index.js +++ b/lodash.clonedeep/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.3.1 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -13,9 +13,11 @@ var baseClone = require('lodash._baseclone'); * * @static * @memberOf _ + * @since 1.0.0 * @category Lang * @param {*} value The value to recursively clone. * @returns {*} Returns the deep cloned value. + * @see _.clone * @example * * var objects = [{ 'a': 1 }, { 'b': 2 }]; diff --git a/lodash.clonedeep/package.json b/lodash.clonedeep/package.json index 91ffdf0af..7e93cafa9 100644 --- a/lodash.clonedeep/package.json +++ b/lodash.clonedeep/package.json @@ -1,6 +1,6 @@ { "name": "lodash.clonedeep", - "version": "4.3.1", + "version": "4.3.2", "description": "The lodash method `_.cloneDeep` 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._baseclone": "^4.0.0" + "lodash._baseclone": "~4.5.0" } } diff --git a/lodash.clonedeepwith/README.md b/lodash.clonedeepwith/README.md index 26872a5b3..bd9aadf7b 100644 --- a/lodash.clonedeepwith/README.md +++ b/lodash.clonedeepwith/README.md @@ -1,4 +1,4 @@ -# lodash.clonedeepwith v4.3.1 +# lodash.clonedeepwith v4.3.2 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.3.1-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.3.2-npm-packages/lodash.clonedeepwith) for more details. diff --git a/lodash.clonedeepwith/index.js b/lodash.clonedeepwith/index.js index 3348872e0..1114e49e7 100644 --- a/lodash.clonedeepwith/index.js +++ b/lodash.clonedeepwith/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.3.1 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -13,10 +13,12 @@ var baseClone = require('lodash._baseclone'); * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to recursively clone. * @param {Function} [customizer] The function to customize cloning. * @returns {*} Returns the deep cloned value. + * @see _.cloneWith * @example * * function customizer(value) { diff --git a/lodash.clonedeepwith/package.json b/lodash.clonedeepwith/package.json index 1e2094c82..cc3b00408 100644 --- a/lodash.clonedeepwith/package.json +++ b/lodash.clonedeepwith/package.json @@ -1,6 +1,6 @@ { "name": "lodash.clonedeepwith", - "version": "4.3.1", + "version": "4.3.2", "description": "The lodash method `_.cloneDeepWith` 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._baseclone": "^4.0.0" + "lodash._baseclone": "~4.5.0" } } diff --git a/lodash.clonewith/README.md b/lodash.clonewith/README.md index a07b85fff..b6f9ad51a 100644 --- a/lodash.clonewith/README.md +++ b/lodash.clonewith/README.md @@ -1,4 +1,4 @@ -# lodash.clonewith v4.3.1 +# lodash.clonewith v4.3.2 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.3.1-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.3.2-npm-packages/lodash.clonewith) for more details. diff --git a/lodash.clonewith/index.js b/lodash.clonewith/index.js index 772382c6c..d6d86a5f6 100644 --- a/lodash.clonewith/index.js +++ b/lodash.clonewith/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.3.1 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -10,16 +10,18 @@ var baseClone = require('lodash._baseclone'); /** * This method is like `_.clone` except that it accepts `customizer` which - * is invoked to produce the cloned value. If `customizer` returns `undefined` + * is invoked to produce the cloned value. If `customizer` returns `undefined`, * cloning is handled by the method instead. The `customizer` is invoked with * up to four arguments; (value [, index|key, object, stack]). * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to clone. * @param {Function} [customizer] The function to customize cloning. * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith * @example * * function customizer(value) { diff --git a/lodash.clonewith/package.json b/lodash.clonewith/package.json index c6a6d4b71..86bd6dc0e 100644 --- a/lodash.clonewith/package.json +++ b/lodash.clonewith/package.json @@ -1,6 +1,6 @@ { "name": "lodash.clonewith", - "version": "4.3.1", + "version": "4.3.2", "description": "The lodash method `_.cloneWith` 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._baseclone": "^4.0.0" + "lodash._baseclone": "~4.5.0" } } diff --git a/lodash.conforms/LICENSE b/lodash.conforms/LICENSE index bcbe13d67..e0c69d560 100644 --- a/lodash.conforms/LICENSE +++ b/lodash.conforms/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.conforms/README.md b/lodash.conforms/README.md index 86818f3d0..8f6edd4b7 100644 --- a/lodash.conforms/README.md +++ b/lodash.conforms/README.md @@ -1,4 +1,4 @@ -# lodash.conforms v4.3.1 +# lodash.conforms v4.3.2 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.3.1-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.3.2-npm-packages/lodash.conforms) for more details. diff --git a/lodash.conforms/index.js b/lodash.conforms/index.js index ffda86f9d..ecd9d5378 100644 --- a/lodash.conforms/index.js +++ b/lodash.conforms/index.js @@ -1,10 +1,10 @@ /** - * lodash 4.3.1 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation + * Copyright jQuery Foundation and other contributors + * Released under MIT license * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ var baseClone = require('lodash._baseclone'), keys = require('lodash.keys'); @@ -14,7 +14,7 @@ var baseClone = require('lodash._baseclone'), * * @private * @param {Object} source The object of property predicates to conform to. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. */ function baseConforms(source) { var props = keys(source), @@ -30,7 +30,8 @@ function baseConforms(source) { predicate = source[key], value = object[key]; - if ((value === undefined && !(key in Object(object))) || !predicate(value)) { + if ((value === undefined && + !(key in Object(object))) || !predicate(value)) { return false; } } @@ -45,9 +46,10 @@ function baseConforms(source) { * * @static * @memberOf _ + * @since 4.0.0 * @category Util * @param {Object} source The object of property predicates to conform to. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. * @example * * var users = [ diff --git a/lodash.conforms/package.json b/lodash.conforms/package.json index 830e68c19..326b66e07 100644 --- a/lodash.conforms/package.json +++ b/lodash.conforms/package.json @@ -1,6 +1,6 @@ { "name": "lodash.conforms", - "version": "4.3.1", + "version": "4.3.2", "description": "The lodash method `_.conforms` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.defaultsdeep/README.md b/lodash.defaultsdeep/README.md index 3dbefe88a..c0234863f 100644 --- a/lodash.defaultsdeep/README.md +++ b/lodash.defaultsdeep/README.md @@ -1,4 +1,4 @@ -# lodash.defaultsdeep v4.3.1 +# lodash.defaultsdeep v4.3.2 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.3.1-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.3.2-npm-packages/lodash.defaultsdeep) for more details. diff --git a/lodash.defaultsdeep/index.js b/lodash.defaultsdeep/index.js index 7aeb98357..8576e1a58 100644 --- a/lodash.defaultsdeep/index.js +++ b/lodash.defaultsdeep/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.3.1 (Custom Build) + * lodash 4.3.2 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -116,7 +116,8 @@ var objectToString = objectProto.toString; var propertyIsEnumerable = objectProto.propertyIsEnumerable; /** - * This function is like `assignValue` except that it doesn't assign `undefined` values. + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. * * @private * @param {Object} object The object to modify. @@ -228,7 +229,7 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta } else { isCommon = false; - newValue = baseClone(srcValue, true); + newValue = baseClone(srcValue, !customizer); } } else if (isPlainObject(srcValue) || isArguments(srcValue)) { @@ -237,7 +238,7 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta } else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { isCommon = false; - newValue = baseClone(srcValue, true); + newValue = baseClone(srcValue, !customizer); } else { newValue = objValue; @@ -253,6 +254,7 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta // Recursively merge objects and arrays (susceptible to call stack limits). mergeFunc(newValue, srcValue, srcIndex, customizer, stack); } + stack['delete'](srcValue); assignMergeValue(object, key, newValue); } @@ -356,8 +358,7 @@ var getLength = baseProperty('length'); */ function mergeDefaults(objValue, srcValue, key, object, source, stack) { if (isObject(objValue) && isObject(srcValue)) { - stack.set(srcValue, objValue); - baseMerge(objValue, srcValue, undefined, mergeDefaults, stack); + baseMerge(objValue, srcValue, undefined, mergeDefaults, stack.set(srcValue, objValue)); } return objValue; } @@ -468,8 +469,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); } /** @@ -517,8 +517,8 @@ function isArrayLikeObject(value) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } diff --git a/lodash.defaultsdeep/package.json b/lodash.defaultsdeep/package.json index f0a6b6429..d8d1ac230 100644 --- a/lodash.defaultsdeep/package.json +++ b/lodash.defaultsdeep/package.json @@ -1,6 +1,6 @@ { "name": "lodash.defaultsdeep", - "version": "4.3.1", + "version": "4.3.2", "description": "The lodash method `_.defaultsDeep` 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.isbuffer/README.md b/lodash.isbuffer/README.md index e7bf02902..65670b00c 100644 --- a/lodash.isbuffer/README.md +++ b/lodash.isbuffer/README.md @@ -1,4 +1,4 @@ -# lodash.isbuffer v4.3.1 +# lodash.isbuffer v4.3.2 The [lodash](https://lodash.com/) method `_.isBuffer` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var isBuffer = require('lodash.isbuffer'); ``` -See the [documentation](https://lodash.com/docs#isBuffer) or [package source](https://github.com/lodash/lodash/blob/4.3.1-npm-packages/lodash.isbuffer) for more details. +See the [documentation](https://lodash.com/docs#isBuffer) or [package source](https://github.com/lodash/lodash/blob/4.3.2-npm-packages/lodash.isbuffer) for more details. diff --git a/lodash.isbuffer/index.js b/lodash.isbuffer/index.js index 70e426fb5..72396b26f 100644 --- a/lodash.isbuffer/index.js +++ b/lodash.isbuffer/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.3.1 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -37,6 +37,7 @@ var Buffer = moduleExports ? root.Buffer : undefined; * * @static * @memberOf _ + * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. @@ -57,9 +58,10 @@ var isBuffer = !Buffer ? constant(false) : function(value) { * * @static * @memberOf _ + * @since 2.4.0 * @category Util * @param {*} value The value to return from the new function. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new constant function. * @example * * var object = { 'user': 'fred' }; diff --git a/lodash.isbuffer/package.json b/lodash.isbuffer/package.json index 29b6327d1..3d20e6260 100644 --- a/lodash.isbuffer/package.json +++ b/lodash.isbuffer/package.json @@ -1,6 +1,6 @@ { "name": "lodash.isbuffer", - "version": "4.3.1", + "version": "4.3.2", "description": "The lodash method `_.isBuffer` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,12 +9,12 @@ "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", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._root": "^3.0.0" + "lodash._root": "~3.0.0" } } diff --git a/lodash.ismap/README.md b/lodash.ismap/README.md index 971ab0d98..3150dd370 100644 --- a/lodash.ismap/README.md +++ b/lodash.ismap/README.md @@ -1,4 +1,4 @@ -# lodash.ismap v4.3.1 +# lodash.ismap v4.3.2 The [lodash](https://lodash.com/) method `_.isMap` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var isMap = require('lodash.ismap'); ``` -See the [documentation](https://lodash.com/docs#isMap) or [package source](https://github.com/lodash/lodash/blob/4.3.1-npm-packages/lodash.ismap) for more details. +See the [documentation](https://lodash.com/docs#isMap) or [package source](https://github.com/lodash/lodash/blob/4.3.2-npm-packages/lodash.ismap) for more details. diff --git a/lodash.ismap/index.js b/lodash.ismap/index.js index 556456f5e..29b767d48 100644 --- a/lodash.ismap/index.js +++ b/lodash.ismap/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.3.1 (Custom Build) + * lodash 4.3.2 (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.ismap/package.json b/lodash.ismap/package.json index 94c01a8a5..5aeb0da67 100644 --- a/lodash.ismap/package.json +++ b/lodash.ismap/package.json @@ -1,6 +1,6 @@ { "name": "lodash.ismap", - "version": "4.3.1", + "version": "4.3.2", "description": "The lodash method `_.isMap` 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._root": "^3.0.0" + "lodash._root": "~3.0.0" } } diff --git a/lodash.isset/README.md b/lodash.isset/README.md index 0e6af174d..70b4173ab 100644 --- a/lodash.isset/README.md +++ b/lodash.isset/README.md @@ -1,4 +1,4 @@ -# lodash.isset v4.3.1 +# lodash.isset v4.3.2 The [lodash](https://lodash.com/) method `_.isSet` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var isSet = require('lodash.isset'); ``` -See the [documentation](https://lodash.com/docs#isSet) or [package source](https://github.com/lodash/lodash/blob/4.3.1-npm-packages/lodash.isset) for more details. +See the [documentation](https://lodash.com/docs#isSet) or [package source](https://github.com/lodash/lodash/blob/4.3.2-npm-packages/lodash.isset) for more details. diff --git a/lodash.isset/index.js b/lodash.isset/index.js index 60f8e79ac..24d8e0e5a 100644 --- a/lodash.isset/index.js +++ b/lodash.isset/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.3.1 (Custom Build) + * lodash 4.3.2 (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.isset/package.json b/lodash.isset/package.json index 37303dc3d..cfe82cd9d 100644 --- a/lodash.isset/package.json +++ b/lodash.isset/package.json @@ -1,6 +1,6 @@ { "name": "lodash.isset", - "version": "4.3.1", + "version": "4.3.2", "description": "The lodash method `_.isSet` 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._root": "^3.0.0" + "lodash._root": "~3.0.0" } } diff --git a/lodash.isweakmap/README.md b/lodash.isweakmap/README.md index 6dcc680c1..517125113 100644 --- a/lodash.isweakmap/README.md +++ b/lodash.isweakmap/README.md @@ -1,4 +1,4 @@ -# lodash.isweakmap v4.3.1 +# lodash.isweakmap v4.3.2 The [lodash](https://lodash.com/) method `_.isWeakMap` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var isWeakMap = require('lodash.isweakmap'); ``` -See the [documentation](https://lodash.com/docs#isWeakMap) or [package source](https://github.com/lodash/lodash/blob/4.3.1-npm-packages/lodash.isweakmap) for more details. +See the [documentation](https://lodash.com/docs#isWeakMap) or [package source](https://github.com/lodash/lodash/blob/4.3.2-npm-packages/lodash.isweakmap) for more details. diff --git a/lodash.isweakmap/index.js b/lodash.isweakmap/index.js index 332558abb..480d37689 100644 --- a/lodash.isweakmap/index.js +++ b/lodash.isweakmap/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.3.1 (Custom Build) + * lodash 4.3.2 (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.isweakmap/package.json b/lodash.isweakmap/package.json index f6b15e44f..4dcd5aece 100644 --- a/lodash.isweakmap/package.json +++ b/lodash.isweakmap/package.json @@ -1,6 +1,6 @@ { "name": "lodash.isweakmap", - "version": "4.3.1", + "version": "4.3.2", "description": "The lodash method `_.isWeakMap` 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._root": "^3.0.0" + "lodash._root": "~3.0.0" } } diff --git a/lodash.matches/README.md b/lodash.matches/README.md index 9164a7569..1704d971d 100644 --- a/lodash.matches/README.md +++ b/lodash.matches/README.md @@ -1,4 +1,4 @@ -# lodash.matches v4.3.1 +# lodash.matches v4.3.2 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.3.1-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.3.2-npm-packages/lodash.matches) for more details. diff --git a/lodash.matches/index.js b/lodash.matches/index.js index 29a8003ac..cbad705ae 100644 --- a/lodash.matches/index.js +++ b/lodash.matches/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.3.1 (Custom Build) + * lodash 4.3.2 (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.matches/package.json b/lodash.matches/package.json index 0f6c5f428..b8f86f5a2 100644 --- a/lodash.matches/package.json +++ b/lodash.matches/package.json @@ -1,6 +1,6 @@ { "name": "lodash.matches", - "version": "4.3.1", + "version": "4.3.2", "description": "The lodash method `_.matches` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -15,9 +15,9 @@ "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseclone": "^4.0.0", - "lodash._root": "^3.0.0", - "lodash._stack": "^4.0.0", + "lodash._baseclone": "~4.5.0", + "lodash._root": "~3.0.0", + "lodash._stack": "~4.1.0", "lodash.keys": "^4.0.0" } } diff --git a/lodash.matchesproperty/README.md b/lodash.matchesproperty/README.md index 8e9829f82..c8ef88ff6 100644 --- a/lodash.matchesproperty/README.md +++ b/lodash.matchesproperty/README.md @@ -1,4 +1,4 @@ -# lodash.matchesproperty v4.3.1 +# lodash.matchesproperty v4.3.2 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.3.1-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.3.2-npm-packages/lodash.matchesproperty) for more details. diff --git a/lodash.matchesproperty/index.js b/lodash.matchesproperty/index.js index d0834f127..76d9497b5 100644 --- a/lodash.matchesproperty/index.js +++ b/lodash.matchesproperty/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.3.1 (Custom Build) + * lodash 4.3.2 (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.matchesproperty/package.json b/lodash.matchesproperty/package.json index 633c5d2f4..92c5cefdc 100644 --- a/lodash.matchesproperty/package.json +++ b/lodash.matchesproperty/package.json @@ -1,6 +1,6 @@ { "name": "lodash.matchesproperty", - "version": "4.3.1", + "version": "4.3.2", "description": "The lodash method `_.matchesProperty` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -15,10 +15,10 @@ "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseclone": "^4.0.0", - "lodash._baseslice": "^4.0.0", - "lodash._root": "^3.0.0", - "lodash._stack": "^4.0.0", + "lodash._baseclone": "~4.5.0", + "lodash._baseslice": "~4.0.0", + "lodash._root": "~3.0.0", + "lodash._stack": "~4.1.0", "lodash.keys": "^4.0.0", "lodash.tostring": "^4.0.0" } diff --git a/lodash.merge/README.md b/lodash.merge/README.md index ba5e5d74f..260192186 100644 --- a/lodash.merge/README.md +++ b/lodash.merge/README.md @@ -1,4 +1,4 @@ -# lodash.merge v4.3.1 +# lodash.merge v4.3.2 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.3.1-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.3.2-npm-packages/lodash.merge) for more details. diff --git a/lodash.merge/index.js b/lodash.merge/index.js index 893e8f5d1..640728180 100644 --- a/lodash.merge/index.js +++ b/lodash.merge/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.3.1 (Custom Build) + * lodash 4.3.2 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -111,7 +111,8 @@ var objectToString = objectProto.toString; var propertyIsEnumerable = objectProto.propertyIsEnumerable; /** - * This function is like `assignValue` except that it doesn't assign `undefined` values. + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. * * @private * @param {Object} object The object to modify. @@ -223,7 +224,7 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta } else { isCommon = false; - newValue = baseClone(srcValue, true); + newValue = baseClone(srcValue, !customizer); } } else if (isPlainObject(srcValue) || isArguments(srcValue)) { @@ -232,7 +233,7 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta } else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { isCommon = false; - newValue = baseClone(srcValue, true); + newValue = baseClone(srcValue, !customizer); } else { newValue = objValue; @@ -248,6 +249,7 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta // Recursively merge objects and arrays (susceptible to call stack limits). mergeFunc(newValue, srcValue, srcIndex, customizer, stack); } + stack['delete'](srcValue); assignMergeValue(object, key, newValue); } @@ -498,8 +500,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); } /** @@ -547,8 +548,8 @@ function isArrayLikeObject(value) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } @@ -686,12 +687,13 @@ function toPlainObject(value) { } /** - * Recursively merges own and inherited enumerable properties of source objects - * into the destination object. Source properties that resolve to `undefined` - * are skipped if a destination value exists. Array and plain object properties - * are merged recursively. Other objects and value types are overridden by - * assignment. Source objects are applied from left to right. Subsequent - * sources overwrite property assignments of previous sources. + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable properties of source objects into the destination + * object. Source properties that resolve to `undefined` are skipped if a + * destination value exists. Array and plain object properties are merged + * recursively.Other objects and value types are overridden by assignment. + * Source objects are applied from left to right. Subsequent sources + * overwrite property assignments of previous sources. * * **Note:** This method mutates `object`. * diff --git a/lodash.merge/package.json b/lodash.merge/package.json index 8a723fc2a..043ae5da6 100644 --- a/lodash.merge/package.json +++ b/lodash.merge/package.json @@ -1,6 +1,6 @@ { "name": "lodash.merge", - "version": "4.3.1", + "version": "4.3.2", "description": "The lodash method `_.merge` 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.mergewith/README.md b/lodash.mergewith/README.md index b957883ba..21946d12d 100644 --- a/lodash.mergewith/README.md +++ b/lodash.mergewith/README.md @@ -1,4 +1,4 @@ -# lodash.mergewith v4.3.1 +# lodash.mergewith v4.3.2 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.3.1-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.3.2-npm-packages/lodash.mergewith) for more details. diff --git a/lodash.mergewith/index.js b/lodash.mergewith/index.js index 21eaa605f..d79635109 100644 --- a/lodash.mergewith/index.js +++ b/lodash.mergewith/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.3.1 (Custom Build) + * lodash 4.3.2 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -111,7 +111,8 @@ var objectToString = objectProto.toString; var propertyIsEnumerable = objectProto.propertyIsEnumerable; /** - * This function is like `assignValue` except that it doesn't assign `undefined` values. + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. * * @private * @param {Object} object The object to modify. @@ -223,7 +224,7 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta } else { isCommon = false; - newValue = baseClone(srcValue, true); + newValue = baseClone(srcValue, !customizer); } } else if (isPlainObject(srcValue) || isArguments(srcValue)) { @@ -232,7 +233,7 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta } else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { isCommon = false; - newValue = baseClone(srcValue, true); + newValue = baseClone(srcValue, !customizer); } else { newValue = objValue; @@ -248,6 +249,7 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta // Recursively merge objects and arrays (susceptible to call stack limits). mergeFunc(newValue, srcValue, srcIndex, customizer, stack); } + stack['delete'](srcValue); assignMergeValue(object, key, newValue); } @@ -498,8 +500,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); } /** @@ -547,8 +548,8 @@ function isArrayLikeObject(value) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } diff --git a/lodash.mergewith/package.json b/lodash.mergewith/package.json index 28e57e3c1..f1583918a 100644 --- a/lodash.mergewith/package.json +++ b/lodash.mergewith/package.json @@ -1,6 +1,6 @@ { "name": "lodash.mergewith", - "version": "4.3.1", + "version": "4.3.2", "description": "The lodash method `_.mergeWith` 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.orderby/README.md b/lodash.orderby/README.md index 86c128dd2..259ecbaf1 100644 --- a/lodash.orderby/README.md +++ b/lodash.orderby/README.md @@ -1,4 +1,4 @@ -# lodash.orderby v4.3.1 +# lodash.orderby v4.3.2 The [lodash](https://lodash.com/) method `_.orderBy` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var orderBy = require('lodash.orderby'); ``` -See the [documentation](https://lodash.com/docs#orderBy) or [package source](https://github.com/lodash/lodash/blob/4.3.1-npm-packages/lodash.orderby) for more details. +See the [documentation](https://lodash.com/docs#orderBy) or [package source](https://github.com/lodash/lodash/blob/4.3.2-npm-packages/lodash.orderby) for more details. diff --git a/lodash.orderby/index.js b/lodash.orderby/index.js index ee406ad22..578d04d74 100644 --- a/lodash.orderby/index.js +++ b/lodash.orderby/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.3.1 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors * Released under MIT license @@ -14,7 +14,8 @@ var MAX_SAFE_INTEGER = 9007199254740991; /** `Object#toString` result references. */ var funcTag = '[object Function]', - genTag = '[object GeneratorFunction]'; + genTag = '[object GeneratorFunction]', + symbolTag = '[object Symbol]'; /** * A specialized version of `_.map` for arrays without support for iteratee @@ -61,7 +62,7 @@ function baseSortBy(array, comparer) { * * @private * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { @@ -69,79 +70,6 @@ function baseUnary(func) { }; } -/** - * Compares values to sort them in ascending order. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {number} Returns the sort order indicator for `value`. - */ -function compareAscending(value, other) { - if (value !== other) { - var valIsNull = value === null, - valIsUndef = value === undefined, - valIsReflexive = value === value; - - var othIsNull = other === null, - othIsUndef = other === undefined, - othIsReflexive = other === other; - - if ((value > other && !othIsNull) || !valIsReflexive || - (valIsNull && !othIsUndef && othIsReflexive) || - (valIsUndef && othIsReflexive)) { - return 1; - } - if ((value < other && !valIsNull) || !othIsReflexive || - (othIsNull && !valIsUndef && valIsReflexive) || - (othIsUndef && valIsReflexive)) { - return -1; - } - } - return 0; -} - -/** - * Used by `_.orderBy` to compare multiple properties of a value to another - * and stable sort them. - * - * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, - * specify an order of "desc" for descending or "asc" for ascending sort order - * of corresponding values. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {boolean[]|string[]} orders The order to sort by for each property. - * @returns {number} Returns the sort order indicator for `object`. - */ -function compareMultiple(object, other, orders) { - var index = -1, - objCriteria = object.criteria, - othCriteria = other.criteria, - length = objCriteria.length, - ordersLength = orders.length; - - while (++index < length) { - var result = compareAscending(objCriteria[index], othCriteria[index]); - if (result) { - if (index >= ordersLength) { - return result; - } - var order = orders[index]; - return result * (order == 'desc' ? -1 : 1); - } - } - // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications - // that causes it, under certain circumstances, to provide the same value for - // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 - // for more details. - // - // This also ensures a stable sort in V8 and other engines. - // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. - return object.index - other.index; -} - /** Used for built-in method references. */ var objectProto = Object.prototype; @@ -200,7 +128,7 @@ function baseOrderBy(collection, iteratees, orders) { * * @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) { @@ -208,6 +136,85 @@ function baseProperty(key) { }; } +/** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ +function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; +} + +/** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ +function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; +} + /** * Gets the "length" property value of `object`. * @@ -408,6 +415,57 @@ 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); +} + /** * This method returns the first argument given to it. * diff --git a/lodash.orderby/package.json b/lodash.orderby/package.json index e24d78d55..b35ce6c5c 100644 --- a/lodash.orderby/package.json +++ b/lodash.orderby/package.json @@ -1,6 +1,6 @@ { "name": "lodash.orderby", - "version": "4.3.1", + "version": "4.3.2", "description": "The lodash method `_.orderBy` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.set/README.md b/lodash.set/README.md index 09aaf4057..1f530bc42 100644 --- a/lodash.set/README.md +++ b/lodash.set/README.md @@ -1,4 +1,4 @@ -# lodash.set v4.3.1 +# lodash.set v4.3.2 The [lodash](https://lodash.com/) method `_.set` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var set = require('lodash.set'); ``` -See the [documentation](https://lodash.com/docs#set) or [package source](https://github.com/lodash/lodash/blob/4.3.1-npm-packages/lodash.set) for more details. +See the [documentation](https://lodash.com/docs#set) or [package source](https://github.com/lodash/lodash/blob/4.3.2-npm-packages/lodash.set) for more details. diff --git a/lodash.set/index.js b/lodash.set/index.js index b412308bf..9f3ed6b18 100644 --- a/lodash.set/index.js +++ b/lodash.set/index.js @@ -30,7 +30,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, /** * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; @@ -85,6 +85,7 @@ function isHostObject(value) { /** Used for built-in method references. */ var arrayProto = Array.prototype, + funcProto = Function.prototype, objectProto = Object.prototype; /** Used to detect overreaching core-js shims. */ @@ -97,14 +98,14 @@ var maskSrcKey = (function() { }()); /** Used to resolve the decompiled source of functions. */ -var funcToString = Function.prototype.toString; +var funcToString = funcProto.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) + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -433,7 +434,7 @@ MapCache.prototype.set = mapCacheSet; /** * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @private @@ -453,7 +454,7 @@ function assignValue(object, key, value) { * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ @@ -487,13 +488,16 @@ function baseIsNative(value) { * The base implementation of `_.set`. * * @private - * @param {Object} object The object to query. + * @param {Object} object The object to modify. * @param {Array|string} path The path of the property to set. * @param {*} value The value to set. * @param {Function} [customizer] The function to customize path creation. * @returns {Object} Returns `object`. */ function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } path = isKey(path, object) ? [path] : castPath(path); var index = -1, @@ -502,20 +506,19 @@ function baseSet(object, path, value, customizer) { nested = object; while (nested != null && ++index < length) { - var key = toKey(path[index]); - if (isObject(nested)) { - var newValue = value; - if (index != lastIndex) { - var objValue = nested[key]; - newValue = customizer ? customizer(objValue, key, nested) : undefined; - if (newValue === undefined) { - newValue = objValue == null - ? (isIndex(path[index + 1]) ? [] : {}) - : objValue; - } + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); } - assignValue(nested, key, newValue); } + assignValue(nested, key, newValue); nested = nested[key]; } return object; @@ -705,7 +708,7 @@ function toSource(func) { * **Note:** The cache is exposed as the `cache` property on the memoized * function. Its creation may be customized by replacing the `_.memoize.Cache` * constructor with one whose instances implement the - * [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object) + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) * method interface of `delete`, `get`, `has`, and `set`. * * @static @@ -764,7 +767,7 @@ memoize.Cache = MapCache; /** * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static @@ -842,15 +845,14 @@ var isArray = Array.isArray; */ 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. + // in Safari 8-9 which returns 'object' for typed array and other constructors. 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 diff --git a/lodash.set/package.json b/lodash.set/package.json index b9728a359..057651bcf 100644 --- a/lodash.set/package.json +++ b/lodash.set/package.json @@ -1,6 +1,6 @@ { "name": "lodash.set", - "version": "4.3.1", + "version": "4.3.2", "description": "The lodash method `_.set` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.setwith/README.md b/lodash.setwith/README.md index bef692f5e..105871323 100644 --- a/lodash.setwith/README.md +++ b/lodash.setwith/README.md @@ -1,4 +1,4 @@ -# lodash.setwith v4.3.1 +# lodash.setwith v4.3.2 The [lodash](https://lodash.com/) method `_.setWith` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var setWith = require('lodash.setwith'); ``` -See the [documentation](https://lodash.com/docs#setWith) or [package source](https://github.com/lodash/lodash/blob/4.3.1-npm-packages/lodash.setwith) for more details. +See the [documentation](https://lodash.com/docs#setWith) or [package source](https://github.com/lodash/lodash/blob/4.3.2-npm-packages/lodash.setwith) for more details. diff --git a/lodash.setwith/index.js b/lodash.setwith/index.js index f98f5d3e8..5ad789fda 100644 --- a/lodash.setwith/index.js +++ b/lodash.setwith/index.js @@ -30,7 +30,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, /** * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; @@ -85,6 +85,7 @@ function isHostObject(value) { /** Used for built-in method references. */ var arrayProto = Array.prototype, + funcProto = Function.prototype, objectProto = Object.prototype; /** Used to detect overreaching core-js shims. */ @@ -97,14 +98,14 @@ var maskSrcKey = (function() { }()); /** Used to resolve the decompiled source of functions. */ -var funcToString = Function.prototype.toString; +var funcToString = funcProto.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) + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -433,7 +434,7 @@ MapCache.prototype.set = mapCacheSet; /** * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @private @@ -453,7 +454,7 @@ function assignValue(object, key, value) { * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ @@ -487,13 +488,16 @@ function baseIsNative(value) { * The base implementation of `_.set`. * * @private - * @param {Object} object The object to query. + * @param {Object} object The object to modify. * @param {Array|string} path The path of the property to set. * @param {*} value The value to set. * @param {Function} [customizer] The function to customize path creation. * @returns {Object} Returns `object`. */ function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } path = isKey(path, object) ? [path] : castPath(path); var index = -1, @@ -502,20 +506,19 @@ function baseSet(object, path, value, customizer) { nested = object; while (nested != null && ++index < length) { - var key = toKey(path[index]); - if (isObject(nested)) { - var newValue = value; - if (index != lastIndex) { - var objValue = nested[key]; - newValue = customizer ? customizer(objValue, key, nested) : undefined; - if (newValue === undefined) { - newValue = objValue == null - ? (isIndex(path[index + 1]) ? [] : {}) - : objValue; - } + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); } - assignValue(nested, key, newValue); } + assignValue(nested, key, newValue); nested = nested[key]; } return object; @@ -705,7 +708,7 @@ function toSource(func) { * **Note:** The cache is exposed as the `cache` property on the memoized * function. Its creation may be customized by replacing the `_.memoize.Cache` * constructor with one whose instances implement the - * [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object) + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) * method interface of `delete`, `get`, `has`, and `set`. * * @static @@ -764,7 +767,7 @@ memoize.Cache = MapCache; /** * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static @@ -842,15 +845,14 @@ var isArray = Array.isArray; */ 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. + // in Safari 8-9 which returns 'object' for typed array and other constructors. 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 diff --git a/lodash.setwith/package.json b/lodash.setwith/package.json index 0248c6985..f6e5a2e0d 100644 --- a/lodash.setwith/package.json +++ b/lodash.setwith/package.json @@ -1,6 +1,6 @@ { "name": "lodash.setwith", - "version": "4.3.1", + "version": "4.3.2", "description": "The lodash method `_.setWith` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.times/README.md b/lodash.times/README.md index 89255c631..0156e84b4 100644 --- a/lodash.times/README.md +++ b/lodash.times/README.md @@ -1,4 +1,4 @@ -# lodash.times v4.3.1 +# lodash.times v4.3.2 The [lodash](https://lodash.com/) method `_.times` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var times = require('lodash.times'); ``` -See the [documentation](https://lodash.com/docs#times) or [package source](https://github.com/lodash/lodash/blob/4.3.1-npm-packages/lodash.times) for more details. +See the [documentation](https://lodash.com/docs#times) or [package source](https://github.com/lodash/lodash/blob/4.3.2-npm-packages/lodash.times) for more details. diff --git a/lodash.times/index.js b/lodash.times/index.js index 01e2b1258..ecfd990ed 100644 --- a/lodash.times/index.js +++ b/lodash.times/index.js @@ -17,9 +17,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; @@ -60,7 +58,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; @@ -68,34 +66,9 @@ var objectToString = objectProto.toString; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMin = Math.min; -/** - * 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 @@ -212,7 +185,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 _ @@ -272,7 +245,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.times/package.json b/lodash.times/package.json index 0406c9843..19c647948 100644 --- a/lodash.times/package.json +++ b/lodash.times/package.json @@ -1,6 +1,6 @@ { "name": "lodash.times", - "version": "4.3.1", + "version": "4.3.2", "description": "The lodash method `_.times` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg",