From 4e2d859e65c4e5ee6b7c5966083a28fb18badae6 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 24 Feb 2016 08:06:57 -0800 Subject: [PATCH] Bump to v4.1.3. --- README.md | 2 +- lodash._baseeach/README.md | 4 +- lodash._baseeach/index.js | 33 +++---- lodash._baseeach/package.json | 2 +- lodash._baseeachright/README.md | 4 +- lodash._baseeachright/index.js | 33 +++---- lodash._baseeachright/package.json | 2 +- lodash._baseset/README.md | 4 +- lodash._baseset/index.js | 5 +- lodash._baseset/package.json | 2 +- lodash._mapcache/README.md | 4 +- lodash._mapcache/index.js | 8 +- lodash._mapcache/package.json | 4 +- lodash._setcache/README.md | 4 +- lodash._setcache/index.js | 73 +++++++------- lodash._setcache/package.json | 2 +- lodash._stack/README.md | 4 +- lodash._stack/index.js | 73 +++++++------- lodash._stack/package.json | 2 +- lodash.bind/README.md | 4 +- lodash.bind/index.js | 6 +- lodash.bind/package.json | 4 +- lodash.bindkey/README.md | 4 +- lodash.bindkey/index.js | 11 ++- lodash.bindkey/package.json | 4 +- lodash.includes/README.md | 4 +- lodash.includes/index.js | 65 +++++++++---- lodash.includes/package.json | 2 +- lodash.isempty/README.md | 4 +- lodash.isempty/index.js | 17 ++-- lodash.isempty/package.json | 4 +- lodash.isequal/LICENSE | 60 ++++++++---- lodash.isequal/README.md | 4 +- lodash.isequal/index.js | 138 +++++++++++++++++++-------- lodash.isequal/package.json | 2 +- lodash.isequalwith/LICENSE | 60 ++++++++---- lodash.isequalwith/README.md | 4 +- lodash.isequalwith/index.js | 138 +++++++++++++++++++-------- lodash.isequalwith/package.json | 2 +- lodash.ismatch/LICENSE | 60 ++++++++---- lodash.ismatch/README.md | 4 +- lodash.ismatch/index.js | 148 +++++++++++++++++++++-------- lodash.ismatch/package.json | 2 +- lodash.ismatchwith/LICENSE | 60 ++++++++---- lodash.ismatchwith/README.md | 4 +- lodash.ismatchwith/index.js | 148 +++++++++++++++++++++-------- lodash.ismatchwith/package.json | 2 +- lodash.keysin/README.md | 4 +- lodash.keysin/index.js | 55 +++++++---- lodash.keysin/package.json | 4 +- lodash.partial/README.md | 4 +- lodash.partial/index.js | 9 +- lodash.partial/package.json | 4 +- lodash.partialright/README.md | 4 +- lodash.partialright/index.js | 5 +- lodash.partialright/package.json | 4 +- lodash.replace/README.md | 4 +- lodash.replace/index.js | 130 ++++++++++++++++++++++++- lodash.replace/package.json | 7 +- lodash.tostring/LICENSE | 60 ++++++++---- lodash.tostring/README.md | 4 +- lodash.tostring/index.js | 41 ++++---- lodash.tostring/package.json | 2 +- lodash.zipobject/LICENSE | 60 ++++++++---- lodash.zipobject/README.md | 4 +- lodash.zipobject/index.js | 28 +++--- lodash.zipobject/package.json | 4 +- 67 files changed, 1121 insertions(+), 546 deletions(-) diff --git a/README.md b/README.md index 514f1c695..e084a2d26 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# lodash v4.1.2 +# lodash v4.1.3 The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method. diff --git a/lodash._baseeach/README.md b/lodash._baseeach/README.md index 305a27066..c5b9d0809 100644 --- a/lodash._baseeach/README.md +++ b/lodash._baseeach/README.md @@ -1,4 +1,4 @@ -# lodash._baseeach v4.1.2 +# lodash._baseeach v4.1.3 The internal [lodash](https://lodash.com/) function `baseEach` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var baseEach = require('lodash._baseeach'); ``` -See the [package source](https://github.com/lodash/lodash/blob/4.1.2-npm-packages/lodash._baseeach) for more details. +See the [package source](https://github.com/lodash/lodash/blob/4.1.3-npm-packages/lodash._baseeach) for more details. diff --git a/lodash._baseeach/index.js b/lodash._baseeach/index.js index d01c26427..9ea3bdbf6 100644 --- a/lodash._baseeach/index.js +++ b/lodash._baseeach/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.1.2 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors * Released under MIT license @@ -38,20 +38,6 @@ function baseTimes(n, iteratee) { return result; } -/** - * 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; @@ -140,7 +126,7 @@ function baseKeys(object) { * * @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) { @@ -242,6 +228,21 @@ function indexKeys(object) { return null; } +/** + * 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 `value` is likely a prototype object. * diff --git a/lodash._baseeach/package.json b/lodash._baseeach/package.json index 27f800d63..0ae32e9fe 100644 --- a/lodash._baseeach/package.json +++ b/lodash._baseeach/package.json @@ -1,6 +1,6 @@ { "name": "lodash._baseeach", - "version": "4.1.2", + "version": "4.1.3", "description": "The internal lodash function `baseEach` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash._baseeachright/README.md b/lodash._baseeachright/README.md index 2a13cf7cf..67dd219f2 100644 --- a/lodash._baseeachright/README.md +++ b/lodash._baseeachright/README.md @@ -1,4 +1,4 @@ -# lodash._baseeachright v4.1.2 +# lodash._baseeachright v4.1.3 The internal [lodash](https://lodash.com/) function `baseEachRight` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var baseEachRight = require('lodash._baseeachright'); ``` -See the [package source](https://github.com/lodash/lodash/blob/4.1.2-npm-packages/lodash._baseeachright) for more details. +See the [package source](https://github.com/lodash/lodash/blob/4.1.3-npm-packages/lodash._baseeachright) for more details. diff --git a/lodash._baseeachright/index.js b/lodash._baseeachright/index.js index 76054fa7d..cdea49911 100644 --- a/lodash._baseeachright/index.js +++ b/lodash._baseeachright/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.1.2 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors * Released under MIT license @@ -38,20 +38,6 @@ function baseTimes(n, iteratee) { return result; } -/** - * 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; @@ -139,7 +125,7 @@ function baseKeys(object) { * * @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) { @@ -241,6 +227,21 @@ function indexKeys(object) { return null; } +/** + * 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 `value` is likely a prototype object. * diff --git a/lodash._baseeachright/package.json b/lodash._baseeachright/package.json index 97fee26b1..d61b416db 100644 --- a/lodash._baseeachright/package.json +++ b/lodash._baseeachright/package.json @@ -1,6 +1,6 @@ { "name": "lodash._baseeachright", - "version": "4.1.2", + "version": "4.1.3", "description": "The internal lodash function `baseEachRight` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash._baseset/README.md b/lodash._baseset/README.md index 7ce8875e5..0a518f6a3 100644 --- a/lodash._baseset/README.md +++ b/lodash._baseset/README.md @@ -1,4 +1,4 @@ -# lodash._baseset v4.1.2 +# lodash._baseset v4.1.3 The internal [lodash](https://lodash.com/) function `baseSet` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var baseSet = require('lodash._baseset'); ``` -See the [package source](https://github.com/lodash/lodash/blob/4.1.2-npm-packages/lodash._baseset) for more details. +See the [package source](https://github.com/lodash/lodash/blob/4.1.3-npm-packages/lodash._baseset) for more details. diff --git a/lodash._baseset/index.js b/lodash._baseset/index.js index f9b03b4ca..095bb08ab 100644 --- a/lodash._baseset/index.js +++ b/lodash._baseset/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.1.2 (Custom Build) + * lodash 4.1.3 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -54,8 +54,7 @@ var hasOwnProperty = objectProto.hasOwnProperty; */ function assignValue(object, key, value) { var objValue = object[key]; - if ((!eq(objValue, value) || - (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) || + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || (value === undefined && !(key in object))) { object[key] = value; } diff --git a/lodash._baseset/package.json b/lodash._baseset/package.json index 81f48eec8..f8571e2d4 100644 --- a/lodash._baseset/package.json +++ b/lodash._baseset/package.json @@ -1,6 +1,6 @@ { "name": "lodash._baseset", - "version": "4.1.2", + "version": "4.1.3", "description": "The internal lodash function `baseSet` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash._mapcache/README.md b/lodash._mapcache/README.md index 3eaada072..e3487bbf0 100644 --- a/lodash._mapcache/README.md +++ b/lodash._mapcache/README.md @@ -1,4 +1,4 @@ -# lodash._mapcache v4.1.2 +# lodash._mapcache v4.1.3 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.2-npm-packages/lodash._mapcache) for more details. +See the [package source](https://github.com/lodash/lodash/blob/4.1.3-npm-packages/lodash._mapcache) for more details. diff --git a/lodash._mapcache/index.js b/lodash._mapcache/index.js index 1b22a032f..693d3926b 100644 --- a/lodash._mapcache/index.js +++ b/lodash._mapcache/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.1.2 (Custom Build) + * lodash 4.1.3 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -376,7 +376,7 @@ function assocSet(array, key, value) { * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { - var value = object == null ? undefined : object[key]; + var value = object[key]; return isNative(value) ? value : undefined; } @@ -445,8 +445,8 @@ function eq(value, other) { */ 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._mapcache/package.json b/lodash._mapcache/package.json index 93b0ded89..cf9e7ff0b 100644 --- a/lodash._mapcache/package.json +++ b/lodash._mapcache/package.json @@ -1,6 +1,6 @@ { "name": "lodash._mapcache", - "version": "4.1.2", + "version": "4.1.3", "description": "The internal lodash function `MapCache` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -8,7 +8,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._setcache/README.md b/lodash._setcache/README.md index e51fcc8af..866338833 100644 --- a/lodash._setcache/README.md +++ b/lodash._setcache/README.md @@ -1,4 +1,4 @@ -# lodash._setcache v4.1.2 +# lodash._setcache v4.1.3 The internal [lodash](https://lodash.com/) function `SetCache` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var SetCache = require('lodash._setcache'); ``` -See the [package source](https://github.com/lodash/lodash/blob/4.1.2-npm-packages/lodash._setcache) for more details. +See the [package source](https://github.com/lodash/lodash/blob/4.1.3-npm-packages/lodash._setcache) for more details. diff --git a/lodash._setcache/index.js b/lodash._setcache/index.js index 2644aad83..4b0094a19 100644 --- a/lodash._setcache/index.js +++ b/lodash._setcache/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.1.2 (Custom Build) + * lodash 4.1.3 (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 @@ -444,6 +448,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) @@ -507,8 +530,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 _ @@ -535,34 +559,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. * @@ -582,14 +578,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 = SetCache; diff --git a/lodash._setcache/package.json b/lodash._setcache/package.json index a6bfe0fcf..1bc27ae22 100644 --- a/lodash._setcache/package.json +++ b/lodash._setcache/package.json @@ -1,6 +1,6 @@ { "name": "lodash._setcache", - "version": "4.1.2", + "version": "4.1.3", "description": "The internal lodash function `SetCache` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash._stack/README.md b/lodash._stack/README.md index 089f78245..67adec5d3 100644 --- a/lodash._stack/README.md +++ b/lodash._stack/README.md @@ -1,4 +1,4 @@ -# lodash._stack v4.1.2 +# lodash._stack v4.1.3 The internal [lodash](https://lodash.com/) function `Stack` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var Stack = require('lodash._stack'); ``` -See the [package source](https://github.com/lodash/lodash/blob/4.1.2-npm-packages/lodash._stack) for more details. +See the [package source](https://github.com/lodash/lodash/blob/4.1.3-npm-packages/lodash._stack) for more details. diff --git a/lodash._stack/index.js b/lodash._stack/index.js index 354713d10..9e54beec2 100644 --- a/lodash._stack/index.js +++ b/lodash._stack/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.1.2 (Custom Build) + * lodash 4.1.3 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors * Released under MIT license @@ -17,7 +17,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). */ @@ -102,7 +105,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; @@ -121,7 +125,7 @@ var Map = getNative(root, 'Map'), nativeCreate = getNative(Object, 'create'); /** - * Creates an hash object. + * Creates a hash object. * * @private * @constructor @@ -518,6 +522,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) @@ -581,8 +604,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 _ @@ -609,34 +633,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. * @@ -656,14 +652,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 = Stack; diff --git a/lodash._stack/package.json b/lodash._stack/package.json index e85643dff..0605d2c1e 100644 --- a/lodash._stack/package.json +++ b/lodash._stack/package.json @@ -1,6 +1,6 @@ { "name": "lodash._stack", - "version": "4.1.2", + "version": "4.1.3", "description": "The internal lodash function `Stack` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.bind/README.md b/lodash.bind/README.md index a56b66597..e54749411 100644 --- a/lodash.bind/README.md +++ b/lodash.bind/README.md @@ -1,4 +1,4 @@ -# lodash.bind v4.1.2 +# lodash.bind v4.1.3 The [lodash](https://lodash.com/) method `_.bind` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var bind = require('lodash.bind'); ``` -See the [documentation](https://lodash.com/docs#bind) or [package source](https://github.com/lodash/lodash/blob/4.1.2-npm-packages/lodash.bind) for more details. +See the [documentation](https://lodash.com/docs#bind) or [package source](https://github.com/lodash/lodash/blob/4.1.3-npm-packages/lodash.bind) for more details. diff --git a/lodash.bind/index.js b/lodash.bind/index.js index ce654116e..ad534bf72 100644 --- a/lodash.bind/index.js +++ b/lodash.bind/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.1.2 (Custom Build) + * lodash 4.1.3 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -55,8 +55,7 @@ function getPlaceholder(func) { /** * Creates a function that invokes `func` with the `this` binding of `thisArg` - * and prepends any additional `_.bind` arguments to those provided to the - * bound function. + * and `partials` prepended to the arguments it receives. * * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, * may be used as a placeholder for partially applied arguments. @@ -66,6 +65,7 @@ function getPlaceholder(func) { * * @static * @memberOf _ + * @since 0.1.0 * @category Function * @param {Function} func The function to bind. * @param {*} thisArg The `this` binding of `func`. diff --git a/lodash.bind/package.json b/lodash.bind/package.json index 348c66469..d15cfdc86 100644 --- a/lodash.bind/package.json +++ b/lodash.bind/package.json @@ -1,6 +1,6 @@ { "name": "lodash.bind", - "version": "4.1.2", + "version": "4.1.3", "description": "The lodash method `_.bind` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -15,7 +15,7 @@ "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._createwrapper": "^4.0.0", + "lodash._createwrapper": "~4.0.0", "lodash.rest": "^4.0.0" } } diff --git a/lodash.bindkey/README.md b/lodash.bindkey/README.md index 843dfc96a..dd2d16309 100644 --- a/lodash.bindkey/README.md +++ b/lodash.bindkey/README.md @@ -1,4 +1,4 @@ -# lodash.bindkey v4.1.2 +# lodash.bindkey v4.1.3 The [lodash](https://lodash.com/) method `_.bindKey` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var bindKey = require('lodash.bindkey'); ``` -See the [documentation](https://lodash.com/docs#bindKey) or [package source](https://github.com/lodash/lodash/blob/4.1.2-npm-packages/lodash.bindkey) for more details. +See the [documentation](https://lodash.com/docs#bindKey) or [package source](https://github.com/lodash/lodash/blob/4.1.3-npm-packages/lodash.bindkey) for more details. diff --git a/lodash.bindkey/index.js b/lodash.bindkey/index.js index 9857cef10..7408be267 100644 --- a/lodash.bindkey/index.js +++ b/lodash.bindkey/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.1.2 (Custom Build) + * lodash 4.1.3 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -55,12 +55,12 @@ function getPlaceholder(func) { } /** - * Creates a function that invokes the method at `object[key]` and prepends - * any additional `_.bindKey` arguments to those provided to the bound function. + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. * * This method differs from `_.bind` by allowing bound functions to reference - * methods that may be redefined or don't yet exist. - * See [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * methods that may be redefined or don't yet exist. See + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) * for more details. * * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic @@ -68,6 +68,7 @@ function getPlaceholder(func) { * * @static * @memberOf _ + * @since 0.10.0 * @category Function * @param {Object} object The object to invoke the method on. * @param {string} key The key of the method. diff --git a/lodash.bindkey/package.json b/lodash.bindkey/package.json index 2f86655b7..7ec138e5a 100644 --- a/lodash.bindkey/package.json +++ b/lodash.bindkey/package.json @@ -1,6 +1,6 @@ { "name": "lodash.bindkey", - "version": "4.1.2", + "version": "4.1.3", "description": "The lodash method `_.bindKey` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -15,7 +15,7 @@ "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._createwrapper": "^4.0.0", + "lodash._createwrapper": "~4.0.0", "lodash.rest": "^4.0.0" } } diff --git a/lodash.includes/README.md b/lodash.includes/README.md index 20b7f348b..a71b50019 100644 --- a/lodash.includes/README.md +++ b/lodash.includes/README.md @@ -1,4 +1,4 @@ -# lodash.includes v4.1.2 +# lodash.includes v4.1.3 The [lodash](https://lodash.com/) method `_.includes` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var includes = require('lodash.includes'); ``` -See the [documentation](https://lodash.com/docs#includes) or [package source](https://github.com/lodash/lodash/blob/4.1.2-npm-packages/lodash.includes) for more details. +See the [documentation](https://lodash.com/docs#includes) or [package source](https://github.com/lodash/lodash/blob/4.1.3-npm-packages/lodash.includes) for more details. diff --git a/lodash.includes/index.js b/lodash.includes/index.js index a36563c70..51df6e613 100644 --- a/lodash.includes/index.js +++ b/lodash.includes/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.1.2 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors * Released under MIT license @@ -135,7 +135,7 @@ var nativeMax = Math.max; * * @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) { @@ -417,6 +417,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. * @@ -431,7 +466,7 @@ function isSymbol(value) { * @returns {number} Returns the converted integer. * @example * - * _.toInteger(3); + * _.toInteger(3.2); * // => 3 * * _.toInteger(Number.MIN_VALUE); @@ -440,20 +475,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; } /** @@ -467,8 +496,8 @@ function toInteger(value) { * @returns {number} Returns the number. * @example * - * _.toNumber(3); - * // => 3 + * _.toNumber(3.2); + * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 @@ -476,8 +505,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.includes/package.json b/lodash.includes/package.json index e05a28aee..aaa141f97 100644 --- a/lodash.includes/package.json +++ b/lodash.includes/package.json @@ -1,6 +1,6 @@ { "name": "lodash.includes", - "version": "4.1.2", + "version": "4.1.3", "description": "The lodash method `_.includes` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.isempty/README.md b/lodash.isempty/README.md index a32b23d8c..05cb517dc 100644 --- a/lodash.isempty/README.md +++ b/lodash.isempty/README.md @@ -1,4 +1,4 @@ -# lodash.isempty v4.1.2 +# lodash.isempty v4.1.3 The [lodash](https://lodash.com/) method `_.isEmpty` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var isEmpty = require('lodash.isempty'); ``` -See the [documentation](https://lodash.com/docs#isEmpty) or [package source](https://github.com/lodash/lodash/blob/4.1.2-npm-packages/lodash.isempty) for more details. +See the [documentation](https://lodash.com/docs#isEmpty) or [package source](https://github.com/lodash/lodash/blob/4.1.3-npm-packages/lodash.isempty) for more details. diff --git a/lodash.isempty/index.js b/lodash.isempty/index.js index 4dabf7fe8..f4224f151 100644 --- a/lodash.isempty/index.js +++ b/lodash.isempty/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.1.2 (Custom Build) + * lodash 4.1.3 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -128,8 +128,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); } /** @@ -160,14 +159,14 @@ function isArrayLikeObject(value) { } /** - * Checks if `value` is empty. A value is considered empty unless it's an - * `arguments` object, array, string, or jQuery-like collection with a length - * greater than `0` or an object with own enumerable properties. + * Checks if `value` is an empty collection or object. A value is considered + * empty if it's an `arguments` object, array, string, or jQuery-like collection + * with a length of `0` or has no own enumerable properties. * * @static * @memberOf _ * @category Lang - * @param {Array|Object|string} value The value to inspect. + * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is empty, else `false`. * @example * @@ -218,8 +217,8 @@ function isEmpty(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.isempty/package.json b/lodash.isempty/package.json index 1681c1b8b..1155a66dc 100644 --- a/lodash.isempty/package.json +++ b/lodash.isempty/package.json @@ -1,6 +1,6 @@ { "name": "lodash.isempty", - "version": "4.1.2", + "version": "4.1.3", "description": "The lodash method `_.isEmpty` 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.isequal/LICENSE b/lodash.isequal/LICENSE index bcbe13d67..e0c69d560 100644 --- a/lodash.isequal/LICENSE +++ b/lodash.isequal/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.isequal/README.md b/lodash.isequal/README.md index e0ca0f910..166947697 100644 --- a/lodash.isequal/README.md +++ b/lodash.isequal/README.md @@ -1,4 +1,4 @@ -# lodash.isequal v4.1.2 +# lodash.isequal v4.1.3 The [lodash](https://lodash.com/) method `_.isEqual` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var isEqual = require('lodash.isequal'); ``` -See the [documentation](https://lodash.com/docs#isEqual) or [package source](https://github.com/lodash/lodash/blob/4.1.2-npm-packages/lodash.isequal) for more details. +See the [documentation](https://lodash.com/docs#isEqual) or [package source](https://github.com/lodash/lodash/blob/4.1.3-npm-packages/lodash.isequal) for more details. diff --git a/lodash.isequal/index.js b/lodash.isequal/index.js index a11b513d9..073b0b254 100644 --- a/lodash.isequal/index.js +++ b/lodash.isequal/index.js @@ -1,10 +1,10 @@ /** - * lodash 4.1.2 (Custom Build) + * lodash 4.1.3 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation + * Copyright jQuery Foundation and other contributors + * Released under MIT license * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ var Stack = require('lodash._stack'), keys = require('lodash.keys'), @@ -28,6 +28,7 @@ var argsTag = '[object Arguments]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', + promiseTag = '[object Promise]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', @@ -35,6 +36,7 @@ var argsTag = '[object Arguments]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', @@ -48,7 +50,7 @@ var arrayBufferTag = '[object ArrayBuffer]', /** 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 > 5). */ +/** Used to detect host constructors (Safari). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used to identify `toStringTag` values of typed arrays. */ @@ -60,11 +62,12 @@ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = -typedArrayTags[dateTag] = typedArrayTags[errorTag] = -typedArrayTags[funcTag] = typedArrayTags[mapTag] = -typedArrayTags[numberTag] = typedArrayTags[objectTag] = -typedArrayTags[regexpTag] = typedArrayTags[setTag] = -typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; /** * A specialized version of `_.some` for arrays without support for iteratee @@ -73,7 +76,8 @@ typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; * @private * @param {Array} array The array to iterate over. * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, else `false`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. */ function arraySome(array, predicate) { var index = -1, @@ -163,16 +167,22 @@ var reIsNative = RegExp('^' + /** Built-in value references. */ var Symbol = root.Symbol, - Uint8Array = root.Uint8Array, - getPrototypeOf = Object.getPrototypeOf; + Uint8Array = root.Uint8Array; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetPrototype = Object.getPrototypeOf; /* Built-in method references that are verified to be native. */ -var Map = getNative(root, 'Map'), +var DataView = getNative(root, 'DataView'), + Map = getNative(root, 'Map'), + Promise = getNative(root, 'Promise'), Set = getNative(root, 'Set'), WeakMap = getNative(root, 'WeakMap'); /** Used to detect maps, sets, and weakmaps. */ -var mapCtorString = Map ? funcToString.call(Map) : '', +var dataViewCtorString = DataView ? (DataView + '') : '', + mapCtorString = Map ? funcToString.call(Map) : '', + promiseCtorString = Promise ? funcToString.call(Promise) : '', setCtorString = Set ? funcToString.call(Set) : '', weakMapCtorString = WeakMap ? funcToString.call(WeakMap) : ''; @@ -193,7 +203,7 @@ function baseHas(object, key) { // that are composed entirely of index properties, return `false` for // `hasOwnProperty` checks of them. return hasOwnProperty.call(object, key) || - (typeof object == 'object' && key in object && getPrototypeOf(object) === null); + (typeof object == 'object' && key in object && getPrototype(object) === null); } /** @@ -231,7 +241,8 @@ function baseIsEqual(value, other, customizer, bitmask, stack) { * @param {Object} other The other object to compare. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Function} [customizer] The function to customize comparisons. - * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` + * for more details. * @param {Object} [stack] Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ @@ -264,8 +275,11 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) { othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + stack || (stack = new Stack); - return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, bitmask, stack); + return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack); } } if (!isSameTag) { @@ -284,7 +298,8 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) { * @param {Array} other The other array to compare. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Function} customizer The function to customize comparisons. - * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` + * for more details. * @param {Object} stack Tracks traversed `array` and `other` objects. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ @@ -326,12 +341,16 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { // Recursively compare arrays (susceptible to call stack limits). if (isUnordered) { if (!arraySome(other, function(othValue) { - return arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack); + return arrValue === othValue || + equalFunc(arrValue, othValue, customizer, bitmask, stack); })) { result = false; break; } - } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) { + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, customizer, bitmask, stack) + )) { result = false; break; } @@ -353,12 +372,21 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { * @param {string} tag The `toStringTag` of the objects to compare. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Function} customizer The function to customize comparisons. - * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` + * for more details. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + case arrayBufferTag: if ((object.byteLength != other.byteLength) || !equalFunc(new Uint8Array(object), new Uint8Array(other))) { @@ -368,8 +396,9 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { case boolTag: case dateTag: - // Coerce dates and booleans to numbers, dates to milliseconds and booleans - // to `1` or `0` treating invalid dates coerced to `NaN` as not equal. + // Coerce dates and booleans to numbers, dates to milliseconds and + // booleans to `1` or `0` treating invalid dates coerced to `NaN` as + // not equal. return +object == +other; case errorTag: @@ -381,8 +410,8 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { case regexpTag: case stringTag: - // Coerce regexes to strings and treat strings primitives and string - // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details. + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See https://es5.github.io/#x15.10.6.4 for more details. return object == (other + ''); case mapTag: @@ -400,8 +429,11 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { if (stacked) { return stacked == other; } + bitmask |= UNORDERED_COMPARE_FLAG; + stack.set(object, other); + // Recursively compare objects (susceptible to call stack limits). - return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask | UNORDERED_COMPARE_FLAG, stack.set(object, other)); + return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack); case symbolTag: if (symbolValueOf) { @@ -420,7 +452,8 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { * @param {Object} other The other object to compare. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Function} customizer The function to customize comparisons. - * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` + * for more details. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ @@ -499,6 +532,17 @@ function getNative(object, key) { return isNative(value) ? value : undefined; } +/** + * 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)); +} + /** * Gets the `toStringTag` of `value`. * @@ -510,8 +554,11 @@ function getTag(value) { return objectToString.call(value); } -// Fallback for IE 11 providing `toStringTag` values for maps, sets, and weakmaps. -if ((Map && getTag(new Map) != mapTag) || +// Fallback for data views, maps, sets, and weak maps in IE 11, +// for data views in Edge, and promises in Node.js. +if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || (Set && getTag(new Set) != setTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { @@ -521,7 +568,9 @@ if ((Map && getTag(new Map) != mapTag) || if (ctorString) { switch (ctorString) { + case dataViewCtorString: return dataViewTag; case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; case setCtorString: return setTag; case weakMapCtorString: return weakMapTag; } @@ -535,10 +584,12 @@ if ((Map && getTag(new Map) != mapTag) || * * @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 correctly classified, + * else `false`. * @example * * _.isArray([1, 2, 3]); @@ -567,10 +618,12 @@ var isArray = Array.isArray; * * @static * @memberOf _ + * @since 0.1.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @returns {boolean} Returns `true` if the values are equivalent, + * else `false`. * @example * * var object = { 'user': 'fred' }; @@ -591,9 +644,11 @@ function isEqual(value, other) { * * @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(_); @@ -613,13 +668,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); @@ -645,6 +703,7 @@ function isLength(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`. @@ -673,6 +732,7 @@ function isObject(value) { * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. @@ -699,9 +759,11 @@ function isObjectLike(value) { * * @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`. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. * @example * * _.isNative(Array.prototype.push); @@ -726,9 +788,11 @@ function isNative(value) { * * @static * @memberOf _ + * @since 3.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 correctly classified, + * else `false`. * @example * * _.isTypedArray(new Uint8Array); diff --git a/lodash.isequal/package.json b/lodash.isequal/package.json index c19460dd6..80450d766 100644 --- a/lodash.isequal/package.json +++ b/lodash.isequal/package.json @@ -1,6 +1,6 @@ { "name": "lodash.isequal", - "version": "4.1.2", + "version": "4.1.3", "description": "The lodash method `_.isEqual` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.isequalwith/LICENSE b/lodash.isequalwith/LICENSE index bcbe13d67..e0c69d560 100644 --- a/lodash.isequalwith/LICENSE +++ b/lodash.isequalwith/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.isequalwith/README.md b/lodash.isequalwith/README.md index 9de2a01b4..cdc844867 100644 --- a/lodash.isequalwith/README.md +++ b/lodash.isequalwith/README.md @@ -1,4 +1,4 @@ -# lodash.isequalwith v4.1.2 +# lodash.isequalwith v4.1.3 The [lodash](https://lodash.com/) method `_.isEqualWith` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var isEqualWith = require('lodash.isequalwith'); ``` -See the [documentation](https://lodash.com/docs#isEqualWith) or [package source](https://github.com/lodash/lodash/blob/4.1.2-npm-packages/lodash.isequalwith) for more details. +See the [documentation](https://lodash.com/docs#isEqualWith) or [package source](https://github.com/lodash/lodash/blob/4.1.3-npm-packages/lodash.isequalwith) for more details. diff --git a/lodash.isequalwith/index.js b/lodash.isequalwith/index.js index efcb1c8b4..7a62bf9d0 100644 --- a/lodash.isequalwith/index.js +++ b/lodash.isequalwith/index.js @@ -1,10 +1,10 @@ /** - * lodash 4.1.2 (Custom Build) + * lodash 4.1.3 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation + * Copyright jQuery Foundation and other contributors + * Released under MIT license * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ var Stack = require('lodash._stack'), keys = require('lodash.keys'), @@ -28,6 +28,7 @@ var argsTag = '[object Arguments]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', + promiseTag = '[object Promise]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', @@ -35,6 +36,7 @@ var argsTag = '[object Arguments]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', @@ -48,7 +50,7 @@ var arrayBufferTag = '[object ArrayBuffer]', /** 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 > 5). */ +/** Used to detect host constructors (Safari). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used to identify `toStringTag` values of typed arrays. */ @@ -60,11 +62,12 @@ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = -typedArrayTags[dateTag] = typedArrayTags[errorTag] = -typedArrayTags[funcTag] = typedArrayTags[mapTag] = -typedArrayTags[numberTag] = typedArrayTags[objectTag] = -typedArrayTags[regexpTag] = typedArrayTags[setTag] = -typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; /** * A specialized version of `_.some` for arrays without support for iteratee @@ -73,7 +76,8 @@ typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; * @private * @param {Array} array The array to iterate over. * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, else `false`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. */ function arraySome(array, predicate) { var index = -1, @@ -163,16 +167,22 @@ var reIsNative = RegExp('^' + /** Built-in value references. */ var Symbol = root.Symbol, - Uint8Array = root.Uint8Array, - getPrototypeOf = Object.getPrototypeOf; + Uint8Array = root.Uint8Array; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetPrototype = Object.getPrototypeOf; /* Built-in method references that are verified to be native. */ -var Map = getNative(root, 'Map'), +var DataView = getNative(root, 'DataView'), + Map = getNative(root, 'Map'), + Promise = getNative(root, 'Promise'), Set = getNative(root, 'Set'), WeakMap = getNative(root, 'WeakMap'); /** Used to detect maps, sets, and weakmaps. */ -var mapCtorString = Map ? funcToString.call(Map) : '', +var dataViewCtorString = DataView ? (DataView + '') : '', + mapCtorString = Map ? funcToString.call(Map) : '', + promiseCtorString = Promise ? funcToString.call(Promise) : '', setCtorString = Set ? funcToString.call(Set) : '', weakMapCtorString = WeakMap ? funcToString.call(WeakMap) : ''; @@ -193,7 +203,7 @@ function baseHas(object, key) { // that are composed entirely of index properties, return `false` for // `hasOwnProperty` checks of them. return hasOwnProperty.call(object, key) || - (typeof object == 'object' && key in object && getPrototypeOf(object) === null); + (typeof object == 'object' && key in object && getPrototype(object) === null); } /** @@ -231,7 +241,8 @@ function baseIsEqual(value, other, customizer, bitmask, stack) { * @param {Object} other The other object to compare. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Function} [customizer] The function to customize comparisons. - * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` + * for more details. * @param {Object} [stack] Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ @@ -264,8 +275,11 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) { othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + stack || (stack = new Stack); - return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, bitmask, stack); + return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack); } } if (!isSameTag) { @@ -284,7 +298,8 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) { * @param {Array} other The other array to compare. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Function} customizer The function to customize comparisons. - * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` + * for more details. * @param {Object} stack Tracks traversed `array` and `other` objects. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ @@ -326,12 +341,16 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { // Recursively compare arrays (susceptible to call stack limits). if (isUnordered) { if (!arraySome(other, function(othValue) { - return arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack); + return arrValue === othValue || + equalFunc(arrValue, othValue, customizer, bitmask, stack); })) { result = false; break; } - } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) { + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, customizer, bitmask, stack) + )) { result = false; break; } @@ -353,12 +372,21 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { * @param {string} tag The `toStringTag` of the objects to compare. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Function} customizer The function to customize comparisons. - * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` + * for more details. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + case arrayBufferTag: if ((object.byteLength != other.byteLength) || !equalFunc(new Uint8Array(object), new Uint8Array(other))) { @@ -368,8 +396,9 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { case boolTag: case dateTag: - // Coerce dates and booleans to numbers, dates to milliseconds and booleans - // to `1` or `0` treating invalid dates coerced to `NaN` as not equal. + // Coerce dates and booleans to numbers, dates to milliseconds and + // booleans to `1` or `0` treating invalid dates coerced to `NaN` as + // not equal. return +object == +other; case errorTag: @@ -381,8 +410,8 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { case regexpTag: case stringTag: - // Coerce regexes to strings and treat strings primitives and string - // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details. + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See https://es5.github.io/#x15.10.6.4 for more details. return object == (other + ''); case mapTag: @@ -400,8 +429,11 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { if (stacked) { return stacked == other; } + bitmask |= UNORDERED_COMPARE_FLAG; + stack.set(object, other); + // Recursively compare objects (susceptible to call stack limits). - return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask | UNORDERED_COMPARE_FLAG, stack.set(object, other)); + return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack); case symbolTag: if (symbolValueOf) { @@ -420,7 +452,8 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { * @param {Object} other The other object to compare. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Function} customizer The function to customize comparisons. - * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` + * for more details. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ @@ -499,6 +532,17 @@ function getNative(object, key) { return isNative(value) ? value : undefined; } +/** + * 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)); +} + /** * Gets the `toStringTag` of `value`. * @@ -510,8 +554,11 @@ function getTag(value) { return objectToString.call(value); } -// Fallback for IE 11 providing `toStringTag` values for maps, sets, and weakmaps. -if ((Map && getTag(new Map) != mapTag) || +// Fallback for data views, maps, sets, and weak maps in IE 11, +// for data views in Edge, and promises in Node.js. +if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || (Set && getTag(new Set) != setTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { @@ -521,7 +568,9 @@ if ((Map && getTag(new Map) != mapTag) || if (ctorString) { switch (ctorString) { + case dataViewCtorString: return dataViewTag; case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; case setCtorString: return setTag; case weakMapCtorString: return weakMapTag; } @@ -535,10 +584,12 @@ if ((Map && getTag(new Map) != mapTag) || * * @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 correctly classified, + * else `false`. * @example * * _.isArray([1, 2, 3]); @@ -563,11 +614,13 @@ var isArray = Array.isArray; * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @returns {boolean} Returns `true` if the values are equivalent, + * else `false`. * @example * * function isGreeting(value) { @@ -597,9 +650,11 @@ function isEqualWith(value, other, customizer) { * * @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(_); @@ -619,13 +674,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); @@ -651,6 +709,7 @@ function isLength(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`. @@ -679,6 +738,7 @@ function isObject(value) { * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. @@ -705,9 +765,11 @@ function isObjectLike(value) { * * @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`. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. * @example * * _.isNative(Array.prototype.push); @@ -732,9 +794,11 @@ function isNative(value) { * * @static * @memberOf _ + * @since 3.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 correctly classified, + * else `false`. * @example * * _.isTypedArray(new Uint8Array); diff --git a/lodash.isequalwith/package.json b/lodash.isequalwith/package.json index c6832d4cb..cb385318a 100644 --- a/lodash.isequalwith/package.json +++ b/lodash.isequalwith/package.json @@ -1,6 +1,6 @@ { "name": "lodash.isequalwith", - "version": "4.1.2", + "version": "4.1.3", "description": "The lodash method `_.isEqualWith` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.ismatch/LICENSE b/lodash.ismatch/LICENSE index bcbe13d67..e0c69d560 100644 --- a/lodash.ismatch/LICENSE +++ b/lodash.ismatch/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.ismatch/README.md b/lodash.ismatch/README.md index c5d17814f..294338bc2 100644 --- a/lodash.ismatch/README.md +++ b/lodash.ismatch/README.md @@ -1,4 +1,4 @@ -# lodash.ismatch v4.1.2 +# lodash.ismatch v4.1.3 The [lodash](https://lodash.com/) method `_.isMatch` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var isMatch = require('lodash.ismatch'); ``` -See the [documentation](https://lodash.com/docs#isMatch) or [package source](https://github.com/lodash/lodash/blob/4.1.2-npm-packages/lodash.ismatch) for more details. +See the [documentation](https://lodash.com/docs#isMatch) or [package source](https://github.com/lodash/lodash/blob/4.1.3-npm-packages/lodash.ismatch) for more details. diff --git a/lodash.ismatch/index.js b/lodash.ismatch/index.js index e3e65476f..79a382b7f 100644 --- a/lodash.ismatch/index.js +++ b/lodash.ismatch/index.js @@ -1,10 +1,10 @@ /** - * lodash 4.1.2 (Custom Build) + * lodash 4.1.3 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation + * Copyright jQuery Foundation and other contributors + * Released under MIT license * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ var Stack = require('lodash._stack'), keys = require('lodash.keys'), @@ -28,6 +28,7 @@ var argsTag = '[object Arguments]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', + promiseTag = '[object Promise]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', @@ -35,6 +36,7 @@ var argsTag = '[object Arguments]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', @@ -48,7 +50,7 @@ var arrayBufferTag = '[object ArrayBuffer]', /** 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 > 5). */ +/** Used to detect host constructors (Safari). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used to identify `toStringTag` values of typed arrays. */ @@ -60,11 +62,12 @@ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = -typedArrayTags[dateTag] = typedArrayTags[errorTag] = -typedArrayTags[funcTag] = typedArrayTags[mapTag] = -typedArrayTags[numberTag] = typedArrayTags[objectTag] = -typedArrayTags[regexpTag] = typedArrayTags[setTag] = -typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; /** * A specialized version of `_.map` for arrays without support for iteratee @@ -93,7 +96,8 @@ function arrayMap(array, iteratee) { * @private * @param {Array} array The array to iterate over. * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, else `false`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. */ function arraySome(array, predicate) { var index = -1, @@ -198,16 +202,22 @@ var reIsNative = RegExp('^' + /** Built-in value references. */ var Symbol = root.Symbol, - Uint8Array = root.Uint8Array, - getPrototypeOf = Object.getPrototypeOf; + Uint8Array = root.Uint8Array; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetPrototype = Object.getPrototypeOf; /* Built-in method references that are verified to be native. */ -var Map = getNative(root, 'Map'), +var DataView = getNative(root, 'DataView'), + Map = getNative(root, 'Map'), + Promise = getNative(root, 'Promise'), Set = getNative(root, 'Set'), WeakMap = getNative(root, 'WeakMap'); /** Used to detect maps, sets, and weakmaps. */ -var mapCtorString = Map ? funcToString.call(Map) : '', +var dataViewCtorString = DataView ? (DataView + '') : '', + mapCtorString = Map ? funcToString.call(Map) : '', + promiseCtorString = Promise ? funcToString.call(Promise) : '', setCtorString = Set ? funcToString.call(Set) : '', weakMapCtorString = WeakMap ? funcToString.call(WeakMap) : ''; @@ -228,7 +238,7 @@ function baseHas(object, key) { // that are composed entirely of index properties, return `false` for // `hasOwnProperty` checks of them. return hasOwnProperty.call(object, key) || - (typeof object == 'object' && key in object && getPrototypeOf(object) === null); + (typeof object == 'object' && key in object && getPrototype(object) === null); } /** @@ -266,7 +276,8 @@ function baseIsEqual(value, other, customizer, bitmask, stack) { * @param {Object} other The other object to compare. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Function} [customizer] The function to customize comparisons. - * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` + * for more details. * @param {Object} [stack] Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ @@ -299,8 +310,11 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) { othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + stack || (stack = new Stack); - return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, bitmask, stack); + return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack); } } if (!isSameTag) { @@ -349,9 +363,10 @@ function baseIsMatch(object, source, matchData, customizer) { return false; } } else { - var stack = new Stack, - result = customizer ? customizer(objValue, srcValue, key, object, source, stack) : undefined; - + var stack = new Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack) : result @@ -372,7 +387,8 @@ function baseIsMatch(object, source, matchData, customizer) { * @param {Array} other The other array to compare. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Function} customizer The function to customize comparisons. - * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` + * for more details. * @param {Object} stack Tracks traversed `array` and `other` objects. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ @@ -414,12 +430,16 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { // Recursively compare arrays (susceptible to call stack limits). if (isUnordered) { if (!arraySome(other, function(othValue) { - return arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack); + return arrValue === othValue || + equalFunc(arrValue, othValue, customizer, bitmask, stack); })) { result = false; break; } - } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) { + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, customizer, bitmask, stack) + )) { result = false; break; } @@ -441,12 +461,21 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { * @param {string} tag The `toStringTag` of the objects to compare. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Function} customizer The function to customize comparisons. - * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` + * for more details. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + case arrayBufferTag: if ((object.byteLength != other.byteLength) || !equalFunc(new Uint8Array(object), new Uint8Array(other))) { @@ -456,8 +485,9 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { case boolTag: case dateTag: - // Coerce dates and booleans to numbers, dates to milliseconds and booleans - // to `1` or `0` treating invalid dates coerced to `NaN` as not equal. + // Coerce dates and booleans to numbers, dates to milliseconds and + // booleans to `1` or `0` treating invalid dates coerced to `NaN` as + // not equal. return +object == +other; case errorTag: @@ -469,8 +499,8 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { case regexpTag: case stringTag: - // Coerce regexes to strings and treat strings primitives and string - // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details. + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See https://es5.github.io/#x15.10.6.4 for more details. return object == (other + ''); case mapTag: @@ -488,8 +518,11 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { if (stacked) { return stacked == other; } + bitmask |= UNORDERED_COMPARE_FLAG; + stack.set(object, other); + // Recursively compare objects (susceptible to call stack limits). - return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask | UNORDERED_COMPARE_FLAG, stack.set(object, other)); + return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack); case symbolTag: if (symbolValueOf) { @@ -508,7 +541,8 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { * @param {Object} other The other object to compare. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Function} customizer The function to customize comparisons. - * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` + * for more details. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ @@ -604,6 +638,17 @@ function getNative(object, key) { return isNative(value) ? value : undefined; } +/** + * 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)); +} + /** * Gets the `toStringTag` of `value`. * @@ -615,8 +660,11 @@ function getTag(value) { return objectToString.call(value); } -// Fallback for IE 11 providing `toStringTag` values for maps, sets, and weakmaps. -if ((Map && getTag(new Map) != mapTag) || +// Fallback for data views, maps, sets, and weak maps in IE 11, +// for data views in Edge, and promises in Node.js. +if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || (Set && getTag(new Set) != setTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { @@ -626,7 +674,9 @@ if ((Map && getTag(new Map) != mapTag) || if (ctorString) { switch (ctorString) { + case dataViewCtorString: return dataViewTag; case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; case setCtorString: return setTag; case weakMapCtorString: return weakMapTag; } @@ -652,10 +702,12 @@ function isStrictComparable(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 correctly classified, + * else `false`. * @example * * _.isArray([1, 2, 3]); @@ -677,9 +729,11 @@ var isArray = Array.isArray; * * @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(_); @@ -699,13 +753,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); @@ -731,6 +788,7 @@ function isLength(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`. @@ -759,6 +817,7 @@ function isObject(value) { * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. @@ -789,6 +848,7 @@ function isObjectLike(value) { * * @static * @memberOf _ + * @since 3.0.0 * @category Lang * @param {Object} object The object to inspect. * @param {Object} source The object of property values to match. @@ -812,9 +872,11 @@ function isMatch(object, source) { * * @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`. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. * @example * * _.isNative(Array.prototype.push); @@ -839,9 +901,11 @@ function isNative(value) { * * @static * @memberOf _ + * @since 3.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 correctly classified, + * else `false`. * @example * * _.isTypedArray(new Uint8Array); @@ -856,11 +920,13 @@ function isTypedArray(value) { } /** - * Creates an array of own enumerable key-value pairs for `object` which - * can be consumed by `_.fromPairs`. + * Creates an array of own enumerable string keyed-value pairs for `object` + * which can be consumed by `_.fromPairs`. * * @static * @memberOf _ + * @since 4.0.0 + * @alias entries * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the new array of key-value pairs. diff --git a/lodash.ismatch/package.json b/lodash.ismatch/package.json index 7a05fa3e1..b0c2b1c52 100644 --- a/lodash.ismatch/package.json +++ b/lodash.ismatch/package.json @@ -1,6 +1,6 @@ { "name": "lodash.ismatch", - "version": "4.1.2", + "version": "4.1.3", "description": "The lodash method `_.isMatch` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.ismatchwith/LICENSE b/lodash.ismatchwith/LICENSE index bcbe13d67..e0c69d560 100644 --- a/lodash.ismatchwith/LICENSE +++ b/lodash.ismatchwith/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.ismatchwith/README.md b/lodash.ismatchwith/README.md index 5b7f5e0cd..ba893c710 100644 --- a/lodash.ismatchwith/README.md +++ b/lodash.ismatchwith/README.md @@ -1,4 +1,4 @@ -# lodash.ismatchwith v4.1.2 +# lodash.ismatchwith v4.1.3 The [lodash](https://lodash.com/) method `_.isMatchWith` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var isMatchWith = require('lodash.ismatchwith'); ``` -See the [documentation](https://lodash.com/docs#isMatchWith) or [package source](https://github.com/lodash/lodash/blob/4.1.2-npm-packages/lodash.ismatchwith) for more details. +See the [documentation](https://lodash.com/docs#isMatchWith) or [package source](https://github.com/lodash/lodash/blob/4.1.3-npm-packages/lodash.ismatchwith) for more details. diff --git a/lodash.ismatchwith/index.js b/lodash.ismatchwith/index.js index 39eb8d505..880657827 100644 --- a/lodash.ismatchwith/index.js +++ b/lodash.ismatchwith/index.js @@ -1,10 +1,10 @@ /** - * lodash 4.1.2 (Custom Build) + * lodash 4.1.3 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation + * Copyright jQuery Foundation and other contributors + * Released under MIT license * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ var Stack = require('lodash._stack'), keys = require('lodash.keys'), @@ -28,6 +28,7 @@ var argsTag = '[object Arguments]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', + promiseTag = '[object Promise]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', @@ -35,6 +36,7 @@ var argsTag = '[object Arguments]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', @@ -48,7 +50,7 @@ var arrayBufferTag = '[object ArrayBuffer]', /** 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 > 5). */ +/** Used to detect host constructors (Safari). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used to identify `toStringTag` values of typed arrays. */ @@ -60,11 +62,12 @@ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = -typedArrayTags[dateTag] = typedArrayTags[errorTag] = -typedArrayTags[funcTag] = typedArrayTags[mapTag] = -typedArrayTags[numberTag] = typedArrayTags[objectTag] = -typedArrayTags[regexpTag] = typedArrayTags[setTag] = -typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; /** * A specialized version of `_.map` for arrays without support for iteratee @@ -93,7 +96,8 @@ function arrayMap(array, iteratee) { * @private * @param {Array} array The array to iterate over. * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, else `false`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. */ function arraySome(array, predicate) { var index = -1, @@ -198,16 +202,22 @@ var reIsNative = RegExp('^' + /** Built-in value references. */ var Symbol = root.Symbol, - Uint8Array = root.Uint8Array, - getPrototypeOf = Object.getPrototypeOf; + Uint8Array = root.Uint8Array; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetPrototype = Object.getPrototypeOf; /* Built-in method references that are verified to be native. */ -var Map = getNative(root, 'Map'), +var DataView = getNative(root, 'DataView'), + Map = getNative(root, 'Map'), + Promise = getNative(root, 'Promise'), Set = getNative(root, 'Set'), WeakMap = getNative(root, 'WeakMap'); /** Used to detect maps, sets, and weakmaps. */ -var mapCtorString = Map ? funcToString.call(Map) : '', +var dataViewCtorString = DataView ? (DataView + '') : '', + mapCtorString = Map ? funcToString.call(Map) : '', + promiseCtorString = Promise ? funcToString.call(Promise) : '', setCtorString = Set ? funcToString.call(Set) : '', weakMapCtorString = WeakMap ? funcToString.call(WeakMap) : ''; @@ -228,7 +238,7 @@ function baseHas(object, key) { // that are composed entirely of index properties, return `false` for // `hasOwnProperty` checks of them. return hasOwnProperty.call(object, key) || - (typeof object == 'object' && key in object && getPrototypeOf(object) === null); + (typeof object == 'object' && key in object && getPrototype(object) === null); } /** @@ -266,7 +276,8 @@ function baseIsEqual(value, other, customizer, bitmask, stack) { * @param {Object} other The other object to compare. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Function} [customizer] The function to customize comparisons. - * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` + * for more details. * @param {Object} [stack] Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ @@ -299,8 +310,11 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) { othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + stack || (stack = new Stack); - return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, bitmask, stack); + return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack); } } if (!isSameTag) { @@ -349,9 +363,10 @@ function baseIsMatch(object, source, matchData, customizer) { return false; } } else { - var stack = new Stack, - result = customizer ? customizer(objValue, srcValue, key, object, source, stack) : undefined; - + var stack = new Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack) : result @@ -372,7 +387,8 @@ function baseIsMatch(object, source, matchData, customizer) { * @param {Array} other The other array to compare. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Function} customizer The function to customize comparisons. - * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` + * for more details. * @param {Object} stack Tracks traversed `array` and `other` objects. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ @@ -414,12 +430,16 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { // Recursively compare arrays (susceptible to call stack limits). if (isUnordered) { if (!arraySome(other, function(othValue) { - return arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack); + return arrValue === othValue || + equalFunc(arrValue, othValue, customizer, bitmask, stack); })) { result = false; break; } - } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) { + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, customizer, bitmask, stack) + )) { result = false; break; } @@ -441,12 +461,21 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { * @param {string} tag The `toStringTag` of the objects to compare. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Function} customizer The function to customize comparisons. - * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` + * for more details. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + case arrayBufferTag: if ((object.byteLength != other.byteLength) || !equalFunc(new Uint8Array(object), new Uint8Array(other))) { @@ -456,8 +485,9 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { case boolTag: case dateTag: - // Coerce dates and booleans to numbers, dates to milliseconds and booleans - // to `1` or `0` treating invalid dates coerced to `NaN` as not equal. + // Coerce dates and booleans to numbers, dates to milliseconds and + // booleans to `1` or `0` treating invalid dates coerced to `NaN` as + // not equal. return +object == +other; case errorTag: @@ -469,8 +499,8 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { case regexpTag: case stringTag: - // Coerce regexes to strings and treat strings primitives and string - // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details. + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See https://es5.github.io/#x15.10.6.4 for more details. return object == (other + ''); case mapTag: @@ -488,8 +518,11 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { if (stacked) { return stacked == other; } + bitmask |= UNORDERED_COMPARE_FLAG; + stack.set(object, other); + // Recursively compare objects (susceptible to call stack limits). - return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask | UNORDERED_COMPARE_FLAG, stack.set(object, other)); + return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack); case symbolTag: if (symbolValueOf) { @@ -508,7 +541,8 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { * @param {Object} other The other object to compare. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Function} customizer The function to customize comparisons. - * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` + * for more details. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ @@ -604,6 +638,17 @@ function getNative(object, key) { return isNative(value) ? value : undefined; } +/** + * 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)); +} + /** * Gets the `toStringTag` of `value`. * @@ -615,8 +660,11 @@ function getTag(value) { return objectToString.call(value); } -// Fallback for IE 11 providing `toStringTag` values for maps, sets, and weakmaps. -if ((Map && getTag(new Map) != mapTag) || +// Fallback for data views, maps, sets, and weak maps in IE 11, +// for data views in Edge, and promises in Node.js. +if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || (Set && getTag(new Set) != setTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { @@ -626,7 +674,9 @@ if ((Map && getTag(new Map) != mapTag) || if (ctorString) { switch (ctorString) { + case dataViewCtorString: return dataViewTag; case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; case setCtorString: return setTag; case weakMapCtorString: return weakMapTag; } @@ -652,10 +702,12 @@ function isStrictComparable(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 correctly classified, + * else `false`. * @example * * _.isArray([1, 2, 3]); @@ -677,9 +729,11 @@ var isArray = Array.isArray; * * @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(_); @@ -699,13 +753,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); @@ -731,6 +788,7 @@ function isLength(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`. @@ -759,6 +817,7 @@ function isObject(value) { * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. @@ -788,6 +847,7 @@ function isObjectLike(value) { * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {Object} object The object to inspect. * @param {Object} source The object of property values to match. @@ -821,9 +881,11 @@ function isMatchWith(object, source, customizer) { * * @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`. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. * @example * * _.isNative(Array.prototype.push); @@ -848,9 +910,11 @@ function isNative(value) { * * @static * @memberOf _ + * @since 3.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 correctly classified, + * else `false`. * @example * * _.isTypedArray(new Uint8Array); @@ -865,11 +929,13 @@ function isTypedArray(value) { } /** - * Creates an array of own enumerable key-value pairs for `object` which - * can be consumed by `_.fromPairs`. + * Creates an array of own enumerable string keyed-value pairs for `object` + * which can be consumed by `_.fromPairs`. * * @static * @memberOf _ + * @since 4.0.0 + * @alias entries * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the new array of key-value pairs. diff --git a/lodash.ismatchwith/package.json b/lodash.ismatchwith/package.json index b4b6a1dc6..7cb816559 100644 --- a/lodash.ismatchwith/package.json +++ b/lodash.ismatchwith/package.json @@ -1,6 +1,6 @@ { "name": "lodash.ismatchwith", - "version": "4.1.2", + "version": "4.1.3", "description": "The lodash method `_.isMatchWith` 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 3f8e26fa9..1bd03d0a2 100644 --- a/lodash.keysin/README.md +++ b/lodash.keysin/README.md @@ -1,4 +1,4 @@ -# lodash.keysin v4.1.2 +# lodash.keysin v4.1.3 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.2-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.3-npm-packages/lodash.keysin) for more details. diff --git a/lodash.keysin/index.js b/lodash.keysin/index.js index e6133247d..8c23a1bc3 100644 --- a/lodash.keysin/index.js +++ b/lodash.keysin/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.1.2 (Custom Build) + * lodash 4.1.3 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -125,7 +125,8 @@ var objectProto = Object.prototype; 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; @@ -176,8 +177,9 @@ function baseProperty(key) { /** * Gets the "length" property value of `object`. * - * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) - * that affects Safari on at least iOS 8.1-8.3 ARM64. + * **Note:** This function is used to avoid a + * [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects + * Safari on at least iOS 8.1-8.3 ARM64. * * @private * @param {Object} object The object to query. @@ -211,7 +213,7 @@ function indexKeys(object) { */ function isPrototype(value) { var Ctor = value && value.constructor, - proto = (isFunction(Ctor) && Ctor.prototype) || objectProto; + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; return value === proto; } @@ -221,9 +223,11 @@ function isPrototype(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 * * _.isArguments(function() { return arguments; }()); @@ -243,10 +247,12 @@ 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 correctly classified, + * else `false`. * @example * * _.isArray([1, 2, 3]); @@ -270,6 +276,7 @@ var isArray = Array.isArray; * * @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`. @@ -288,8 +295,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); } /** @@ -298,9 +304,11 @@ function isArrayLike(value) { * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, else `false`. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. * @example * * _.isArrayLikeObject([1, 2, 3]); @@ -324,9 +332,11 @@ function isArrayLikeObject(value) { * * @static * @memberOf _ + * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. * @example * * _.isFunction(_); @@ -337,8 +347,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; } @@ -346,13 +356,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); @@ -373,11 +386,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`. @@ -406,6 +421,7 @@ function isObject(value) { * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. @@ -431,10 +447,12 @@ function isObjectLike(value) { * Checks if `value` is classified as a `String` primitive or object. * * @static + * @since 0.1.0 * @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 correctly classified, + * else `false`. * @example * * _.isString('abc'); @@ -455,6 +473,7 @@ function isString(value) { * * @static * @memberOf _ + * @since 3.0.0 * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. diff --git a/lodash.keysin/package.json b/lodash.keysin/package.json index e6355dc61..0743f0587 100644 --- a/lodash.keysin/package.json +++ b/lodash.keysin/package.json @@ -1,6 +1,6 @@ { "name": "lodash.keysin", - "version": "4.1.2", + "version": "4.1.3", "description": "The lodash method `_.keysIn` 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.partial/README.md b/lodash.partial/README.md index fb0980c65..5ea8cbe2d 100644 --- a/lodash.partial/README.md +++ b/lodash.partial/README.md @@ -1,4 +1,4 @@ -# lodash.partial v4.1.2 +# lodash.partial v4.1.3 The [lodash](https://lodash.com/) method `_.partial` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var partial = require('lodash.partial'); ``` -See the [documentation](https://lodash.com/docs#partial) or [package source](https://github.com/lodash/lodash/blob/4.1.2-npm-packages/lodash.partial) for more details. +See the [documentation](https://lodash.com/docs#partial) or [package source](https://github.com/lodash/lodash/blob/4.1.3-npm-packages/lodash.partial) for more details. diff --git a/lodash.partial/index.js b/lodash.partial/index.js index 28659725d..e21c2e2bc 100644 --- a/lodash.partial/index.js +++ b/lodash.partial/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.1.2 (Custom Build) + * lodash 4.1.3 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -53,9 +53,9 @@ function getPlaceholder(func) { } /** - * Creates a function that invokes `func` with `partial` arguments prepended - * to those provided to the new function. This method is like `_.bind` except - * it does **not** alter the `this` binding. + * Creates a function that invokes `func` with `partials` prepended to the + * arguments it receives. This method is like `_.bind` except it does **not** + * alter the `this` binding. * * The `_.partial.placeholder` value, which defaults to `_` in monolithic * builds, may be used as a placeholder for partially applied arguments. @@ -65,6 +65,7 @@ function getPlaceholder(func) { * * @static * @memberOf _ + * @since 0.2.0 * @category Function * @param {Function} func The function to partially apply arguments to. * @param {...*} [partials] The arguments to be partially applied. diff --git a/lodash.partial/package.json b/lodash.partial/package.json index 9d93504fc..9abc5691d 100644 --- a/lodash.partial/package.json +++ b/lodash.partial/package.json @@ -1,6 +1,6 @@ { "name": "lodash.partial", - "version": "4.1.2", + "version": "4.1.3", "description": "The lodash method `_.partial` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -15,7 +15,7 @@ "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._createwrapper": "^4.0.0", + "lodash._createwrapper": "~4.0.0", "lodash.rest": "^4.0.0" } } diff --git a/lodash.partialright/README.md b/lodash.partialright/README.md index b1c127ca2..8ba7cff26 100644 --- a/lodash.partialright/README.md +++ b/lodash.partialright/README.md @@ -1,4 +1,4 @@ -# lodash.partialright v4.1.2 +# lodash.partialright v4.1.3 The [lodash](https://lodash.com/) method `_.partialRight` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var partialRight = require('lodash.partialright'); ``` -See the [documentation](https://lodash.com/docs#partialRight) or [package source](https://github.com/lodash/lodash/blob/4.1.2-npm-packages/lodash.partialright) for more details. +See the [documentation](https://lodash.com/docs#partialRight) or [package source](https://github.com/lodash/lodash/blob/4.1.3-npm-packages/lodash.partialright) for more details. diff --git a/lodash.partialright/index.js b/lodash.partialright/index.js index 302d7a3a2..2a2974a10 100644 --- a/lodash.partialright/index.js +++ b/lodash.partialright/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.1.2 (Custom Build) + * lodash 4.1.3 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -54,7 +54,7 @@ function getPlaceholder(func) { /** * This method is like `_.partial` except that partially applied arguments - * are appended to those provided to the new function. + * are appended to the arguments it receives. * * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic * builds, may be used as a placeholder for partially applied arguments. @@ -64,6 +64,7 @@ function getPlaceholder(func) { * * @static * @memberOf _ + * @since 1.0.0 * @category Function * @param {Function} func The function to partially apply arguments to. * @param {...*} [partials] The arguments to be partially applied. diff --git a/lodash.partialright/package.json b/lodash.partialright/package.json index cba7aff83..be7ca1a84 100644 --- a/lodash.partialright/package.json +++ b/lodash.partialright/package.json @@ -1,6 +1,6 @@ { "name": "lodash.partialright", - "version": "4.1.2", + "version": "4.1.3", "description": "The lodash method `_.partialRight` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -15,7 +15,7 @@ "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._createwrapper": "^4.0.0", + "lodash._createwrapper": "~4.0.0", "lodash.rest": "^4.0.0" } } diff --git a/lodash.replace/README.md b/lodash.replace/README.md index 74a614d90..8950615d4 100644 --- a/lodash.replace/README.md +++ b/lodash.replace/README.md @@ -1,4 +1,4 @@ -# lodash.replace v4.1.2 +# lodash.replace v4.1.3 The [lodash](https://lodash.com/) method `_.replace` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var replace = require('lodash.replace'); ``` -See the [documentation](https://lodash.com/docs#replace) or [package source](https://github.com/lodash/lodash/blob/4.1.2-npm-packages/lodash.replace) for more details. +See the [documentation](https://lodash.com/docs#replace) or [package source](https://github.com/lodash/lodash/blob/4.1.3-npm-packages/lodash.replace) for more details. diff --git a/lodash.replace/index.js b/lodash.replace/index.js index 01432aede..ce66c317e 100644 --- a/lodash.replace/index.js +++ b/lodash.replace/index.js @@ -1,19 +1,143 @@ /** - * lodash 4.1.2 (Custom Build) + * 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 */ -var toString = require('lodash.tostring'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); /** Used for built-in method references. */ -var stringProto = String.prototype; +var objectProto = Object.prototype, + stringProto = String.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 nativeReplace = stringProto.replace; +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * 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 a symbol, 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 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); +} + /** * Replaces matches for `pattern` in `string` with `replacement`. * diff --git a/lodash.replace/package.json b/lodash.replace/package.json index d3fac4d5b..da289f834 100644 --- a/lodash.replace/package.json +++ b/lodash.replace/package.json @@ -1,6 +1,6 @@ { "name": "lodash.replace", - "version": "4.1.2", + "version": "4.1.3", "description": "The lodash method `_.replace` 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.tostring/LICENSE b/lodash.tostring/LICENSE index bcbe13d67..e0c69d560 100644 --- a/lodash.tostring/LICENSE +++ b/lodash.tostring/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.tostring/README.md b/lodash.tostring/README.md index b3858fd68..75aa6b069 100644 --- a/lodash.tostring/README.md +++ b/lodash.tostring/README.md @@ -1,4 +1,4 @@ -# lodash.tostring v4.1.2 +# lodash.tostring v4.1.3 The [lodash](https://lodash.com/) method `_.toString` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var toString = require('lodash.tostring'); ``` -See the [documentation](https://lodash.com/docs#toString) or [package source](https://github.com/lodash/lodash/blob/4.1.2-npm-packages/lodash.tostring) for more details. +See the [documentation](https://lodash.com/docs#toString) or [package source](https://github.com/lodash/lodash/blob/4.1.3-npm-packages/lodash.tostring) for more details. diff --git a/lodash.tostring/index.js b/lodash.tostring/index.js index dd5dee63c..8a2cde392 100644 --- a/lodash.tostring/index.js +++ b/lodash.tostring/index.js @@ -1,10 +1,10 @@ /** - * lodash 4.1.2 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation + * Copyright jQuery Foundation and other contributors + * Released under MIT license * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ /** Used as references for various `Number` constants. */ @@ -79,6 +79,26 @@ var Symbol = root.Symbol; var symbolProto = Symbol ? Symbol.prototype : undefined, symbolToString = symbolProto ? symbolProto.toString : undefined; +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". @@ -152,18 +172,7 @@ function isSymbol(value) { * // => '1,2,3' */ function toString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (value == null) { - return ''; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + return value == null ? '' : baseToString(value); } module.exports = toString; diff --git a/lodash.tostring/package.json b/lodash.tostring/package.json index 781c53dc4..ac7bc4fb8 100644 --- a/lodash.tostring/package.json +++ b/lodash.tostring/package.json @@ -1,6 +1,6 @@ { "name": "lodash.tostring", - "version": "4.1.2", + "version": "4.1.3", "description": "The lodash method `_.toString` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.zipobject/LICENSE b/lodash.zipobject/LICENSE index bcbe13d67..e0c69d560 100644 --- a/lodash.zipobject/LICENSE +++ b/lodash.zipobject/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.zipobject/README.md b/lodash.zipobject/README.md index 456c55676..6de622cfc 100644 --- a/lodash.zipobject/README.md +++ b/lodash.zipobject/README.md @@ -1,4 +1,4 @@ -# lodash.zipobject v4.1.2 +# lodash.zipobject v4.1.3 The [lodash](https://lodash.com/) method `_.zipObject` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var zipObject = require('lodash.zipobject'); ``` -See the [documentation](https://lodash.com/docs#zipObject) or [package source](https://github.com/lodash/lodash/blob/4.1.2-npm-packages/lodash.zipobject) for more details. +See the [documentation](https://lodash.com/docs#zipObject) or [package source](https://github.com/lodash/lodash/blob/4.1.3-npm-packages/lodash.zipobject) for more details. diff --git a/lodash.zipobject/index.js b/lodash.zipobject/index.js index 50863c954..75da410fc 100644 --- a/lodash.zipobject/index.js +++ b/lodash.zipobject/index.js @@ -1,10 +1,10 @@ /** - * lodash 4.1.2 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation + * Copyright jQuery Foundation and other contributors + * Released under MIT license * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ /** Used for built-in method references. */ @@ -15,7 +15,7 @@ var hasOwnProperty = objectProto.hasOwnProperty; /** * 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 @@ -35,7 +35,7 @@ function assignValue(object, key, value) { * This base implementation of `_.zipObject` which assigns values using `assignFunc`. * * @private - * @param {Array} props The property names. + * @param {Array} props The property identifiers. * @param {Array} values The property values. * @param {Function} assignFunc The function to assign values. * @returns {Object} Returns the new object. @@ -47,19 +47,21 @@ function baseZipObject(props, values, assignFunc) { result = {}; while (++index < length) { - assignFunc(result, props[index], index < valsLength ? values[index] : undefined); + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); } return result; } /** * This method is like `_.fromPairs` except that it accepts two arrays, - * one of property names and one of corresponding values. + * one of property identifiers and one of corresponding values. * * @static * @memberOf _ + * @since 0.4.0 * @category Array - * @param {Array} [props=[]] The property names. + * @param {Array} [props=[]] The property identifiers. * @param {Array} [values=[]] The property values. * @returns {Object} Returns the new object. * @example @@ -72,19 +74,21 @@ function zipObject(props, values) { } /** - * Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * - * var object = { 'user': 'fred' }; - * var other = { 'user': 'fred' }; + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; * * _.eq(object, object); * // => true diff --git a/lodash.zipobject/package.json b/lodash.zipobject/package.json index 36835b76a..06f831aef 100644 --- a/lodash.zipobject/package.json +++ b/lodash.zipobject/package.json @@ -1,6 +1,6 @@ { "name": "lodash.zipobject", - "version": "4.1.2", + "version": "4.1.3", "description": "The lodash method `_.zipObject` 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",