Comparing version 3.9.1 to 3.9.2
@@ -7,4 +7,4 @@ var baseDifference = require('../internal/baseDifference'), | ||
/** | ||
* Creates an array excluding all values of the provided arrays using | ||
* [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) | ||
* Creates an array of unique `array` values not included in the other | ||
* provided arrays using [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) | ||
* for equality comparisons. | ||
@@ -11,0 +11,0 @@ * |
@@ -8,4 +8,4 @@ var baseIndexOf = require('../internal/baseIndexOf'), | ||
/** | ||
* Creates an array of unique values in all provided arrays using | ||
* [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) | ||
* Creates an array of unique values that are included in all of the provided | ||
* arrays using [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) | ||
* for equality comparisons. | ||
@@ -12,0 +12,0 @@ * |
@@ -6,4 +6,4 @@ var baseFlatten = require('../internal/baseFlatten'), | ||
/** | ||
* Creates an array of unique values, in order, of the provided arrays using | ||
* [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) | ||
* Creates an array of unique values, in order, from all of the provided arrays | ||
* using [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) | ||
* for equality comparisons. | ||
@@ -10,0 +10,0 @@ * |
@@ -6,3 +6,3 @@ var baseDifference = require('../internal/baseDifference'), | ||
/** | ||
* Creates an array that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) | ||
* Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) | ||
* of the provided arrays. | ||
@@ -9,0 +9,0 @@ * |
var baseRandom = require('../internal/baseRandom'), | ||
isIterateeCall = require('../internal/isIterateeCall'), | ||
shuffle = require('./shuffle'), | ||
toArray = require('../lang/toArray'), | ||
toIterable = require('../internal/toIterable'); | ||
@@ -33,4 +33,16 @@ | ||
} | ||
var result = shuffle(collection); | ||
result.length = nativeMin(n < 0 ? 0 : (+n || 0), result.length); | ||
var index = -1, | ||
result = toArray(collection), | ||
length = result.length, | ||
lastIndex = length - 1; | ||
n = nativeMin(n < 0 ? 0 : (+n || 0), length); | ||
while (++index < n) { | ||
var rand = baseRandom(index, lastIndex), | ||
value = result[rand]; | ||
result[rand] = result[index]; | ||
result[index] = value; | ||
} | ||
result.length = n; | ||
return result; | ||
@@ -37,0 +49,0 @@ } |
@@ -1,4 +0,6 @@ | ||
var baseRandom = require('../internal/baseRandom'), | ||
toIterable = require('../internal/toIterable'); | ||
var sample = require('./sample'); | ||
/** Used as references for `-Infinity` and `Infinity`. */ | ||
var POSITIVE_INFINITY = Number.POSITIVE_INFINITY; | ||
/** | ||
@@ -19,18 +21,5 @@ * Creates an array of shuffled values, using a version of the | ||
function shuffle(collection) { | ||
collection = toIterable(collection); | ||
var index = -1, | ||
length = collection.length, | ||
result = Array(length); | ||
while (++index < length) { | ||
var rand = baseRandom(0, index); | ||
if (index != rand) { | ||
result[index] = result[rand]; | ||
} | ||
result[rand] = collection[index]; | ||
} | ||
return result; | ||
return sample(collection, POSITIVE_INFINITY); | ||
} | ||
module.exports = shuffle; |
/** | ||
* A specialized version of `baseExtremum` for arrays whichs invokes `iteratee` | ||
* A specialized version of `baseExtremum` for arrays which invokes `iteratee` | ||
* with one argument: (value). | ||
@@ -4,0 +4,0 @@ * |
var baseIsEqualDeep = require('./baseIsEqualDeep'), | ||
isObject = require('../lang/isObject'); | ||
isObject = require('../lang/isObject'), | ||
isObjectLike = require('./isObjectLike'); | ||
@@ -21,3 +22,3 @@ /** | ||
} | ||
if (value == null || other == null || (!isObject(value) && !isObject(other))) { | ||
if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) { | ||
return value !== value && other !== other; | ||
@@ -24,0 +25,0 @@ } |
@@ -12,4 +12,3 @@ var baseGet = require('./baseGet'), | ||
/** | ||
* The base implementation of `_.matchesProperty` which does not which does | ||
* not clone `value`. | ||
* The base implementation of `_.matchesProperty` which does not clone `srcValue`. | ||
* | ||
@@ -16,0 +15,0 @@ * @private |
var LazyWrapper = require('./LazyWrapper'), | ||
getData = require('./getData'), | ||
getFuncName = require('./getFuncName'), | ||
@@ -14,5 +15,13 @@ lodash = require('../chain/lodash'); | ||
var funcName = getFuncName(func); | ||
return !!funcName && func === lodash[funcName] && funcName in LazyWrapper.prototype; | ||
if (!(funcName in LazyWrapper.prototype)) { | ||
return false; | ||
} | ||
var other = lodash[funcName]; | ||
if (func === other) { | ||
return true; | ||
} | ||
var data = getData(other); | ||
return !!data && func === data[0]; | ||
} | ||
module.exports = isLaziable; |
var createExtremum = require('../internal/createExtremum'), | ||
gt = require('../lang/gt'); | ||
/** Used as references for `-Infinity` and `Infinity`. */ | ||
var NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY; | ||
/** | ||
@@ -51,4 +54,4 @@ * Gets the maximum value of `collection`. If `collection` is empty or falsey | ||
*/ | ||
var max = createExtremum(gt, -Infinity); | ||
var max = createExtremum(gt, NEGATIVE_INFINITY); | ||
module.exports = max; |
var createExtremum = require('../internal/createExtremum'), | ||
lt = require('../lang/lt'); | ||
/** Used as references for `-Infinity` and `Infinity`. */ | ||
var POSITIVE_INFINITY = Number.POSITIVE_INFINITY; | ||
/** | ||
@@ -51,4 +54,4 @@ * Gets the minimum value of `collection`. If `collection` is empty or falsey | ||
*/ | ||
var min = createExtremum(lt, Infinity); | ||
var min = createExtremum(lt, POSITIVE_INFINITY); | ||
module.exports = min; |
@@ -38,3 +38,3 @@ var isIndex = require('../internal/isIndex'), | ||
length = path.length, | ||
endIndex = length - 1, | ||
lastIndex = length - 1, | ||
nested = object; | ||
@@ -45,3 +45,3 @@ | ||
if (isObject(nested)) { | ||
if (index == endIndex) { | ||
if (index == lastIndex) { | ||
nested[key] = value; | ||
@@ -48,0 +48,0 @@ } else if (nested[key] == null) { |
{ | ||
"name": "lodash", | ||
"version": "3.9.1", | ||
"version": "3.9.2", | ||
"description": "The modern build of lodash modular utilities.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://lodash.com/", |
@@ -1,2 +0,2 @@ | ||
# lodash v3.9.1 | ||
# lodash v3.9.2 | ||
@@ -31,3 +31,3 @@ The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash](https://lodash.com/) exported as [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) modules. | ||
See the [package source](https://github.com/lodash/lodash/tree/3.9.1-npm) for more details. | ||
See the [package source](https://github.com/lodash/lodash/tree/3.9.2-npm) for more details. | ||
@@ -43,4 +43,4 @@ **Note:**<br> | ||
* npm packages for [modern](https://www.npmjs.com/package/lodash), [compatibility](https://www.npmjs.com/package/lodash-compat), & [per method](https://www.npmjs.com/browse/keyword/lodash-modularized) builds | ||
* AMD modules for [modern](https://github.com/lodash/lodash/tree/3.9.1-amd) & [compatibility](https://github.com/lodash/lodash-compat/tree/3.9.1-amd) builds | ||
* ES modules for the [modern](https://github.com/lodash/lodash/tree/3.9.1-es) build | ||
* AMD modules for [modern](https://github.com/lodash/lodash/tree/3.9.2-amd) & [compatibility](https://github.com/lodash/lodash-compat/tree/3.9.2-amd) builds | ||
* ES modules for the [modern](https://github.com/lodash/lodash/tree/3.9.2-es) build | ||
@@ -47,0 +47,0 @@ ## Further Reading |
@@ -5,3 +5,3 @@ var baseClone = require('../internal/baseClone'), | ||
/** | ||
* Creates a function which performs a deep comparison between a given object | ||
* Creates a function that performs a deep comparison between a given object | ||
* and `source`, returning `true` if the given object has equivalent property | ||
@@ -8,0 +8,0 @@ * values, else `false`. |
@@ -5,3 +5,3 @@ var baseClone = require('../internal/baseClone'), | ||
/** | ||
* Creates a function which compares the property value of `path` on a given | ||
* Creates a function that compares the property value of `path` on a given | ||
* object to `value`. | ||
@@ -8,0 +8,0 @@ * |
@@ -5,3 +5,4 @@ var invokePath = require('../internal/invokePath'), | ||
/** | ||
* Creates a function which invokes the method at `path` on a given object. | ||
* Creates a function that invokes the method at `path` on a given object. | ||
* Any additional arguments are provided to the invoked method. | ||
* | ||
@@ -12,2 +13,3 @@ * @static | ||
* @param {Array|string} path The path of the method to invoke. | ||
* @param {...*} [args] The arguments to invoke the method with. | ||
* @returns {Function} Returns the new function. | ||
@@ -14,0 +16,0 @@ * @example |
@@ -5,4 +5,5 @@ var invokePath = require('../internal/invokePath'), | ||
/** | ||
* The opposite of `_.method`; this method creates a function which invokes | ||
* the method at a given path on `object`. | ||
* The opposite of `_.method`; this method creates a function that invokes | ||
* the method at a given path on `object`. Any additional arguments are | ||
* provided to the invoked method. | ||
* | ||
@@ -13,2 +14,3 @@ * @static | ||
* @param {Object} object The object to query. | ||
* @param {...*} [args] The arguments to invoke the method with. | ||
* @returns {Function} Returns the new function. | ||
@@ -15,0 +17,0 @@ * @example |
/** | ||
* A no-operation function which returns `undefined` regardless of the | ||
* A no-operation function that returns `undefined` regardless of the | ||
* arguments it receives. | ||
@@ -4,0 +4,0 @@ * |
@@ -6,3 +6,3 @@ var baseProperty = require('../internal/baseProperty'), | ||
/** | ||
* Creates a function which returns the property value at `path` on a | ||
* Creates a function that returns the property value at `path` on a | ||
* given object. | ||
@@ -9,0 +9,0 @@ * |
@@ -5,3 +5,3 @@ var baseGet = require('../internal/baseGet'), | ||
/** | ||
* The opposite of `_.property`; this method creates a function which returns | ||
* The opposite of `_.property`; this method creates a function that returns | ||
* the property value at a given path on `object`. | ||
@@ -8,0 +8,0 @@ * |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
833706
24118