Bump to v4.14.0.

This commit is contained in:
John-David Dalton
2016-07-24 09:52:22 -07:00
parent 6b3e0da93c
commit 51ed7e7707
231 changed files with 1136 additions and 820 deletions

View File

@@ -1,9 +1,9 @@
import baseDifference from './_baseDifference.js';
import baseFlatten from './_baseFlatten.js';
import baseIteratee from './_baseIteratee.js';
import baseRest from './_baseRest.js';
import isArrayLikeObject from './isArrayLikeObject.js';
import last from './last.js';
import rest from './rest.js';
/**
* This method is like `_.difference` except that it accepts `iteratee` which
@@ -11,14 +11,15 @@ import rest from './rest.js';
* by which they're compared. Result values are chosen from the first array.
* The iteratee is invoked with one argument: (value).
*
* **Note:** Unlike `_.pullAllBy`, this method returns a new array.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to inspect.
* @param {...Array} [values] The values to exclude.
* @param {Array|Function|Object|string} [iteratee=_.identity]
* The iteratee invoked per element.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {Array} Returns the new array of filtered values.
* @example
*
@@ -29,13 +30,13 @@ import rest from './rest.js';
* _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
* // => [{ 'x': 2 }]
*/
var differenceBy = rest(function(array, values) {
var differenceBy = baseRest(function(array, values) {
var iteratee = last(values);
if (isArrayLikeObject(iteratee)) {
iteratee = undefined;
}
return isArrayLikeObject(array)
? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), baseIteratee(iteratee))
? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2))
: [];
});