Bump to v3.6.0.

This commit is contained in:
John-David Dalton
2015-12-16 17:49:07 -08:00
parent 707fe171fc
commit 9724afd7a6
193 changed files with 2191 additions and 1764 deletions

View File

@@ -1,11 +1,11 @@
define(['../internal/baseFlatten', '../internal/bindCallback', '../internal/pickByArray', '../internal/pickByCallback'], function(baseFlatten, bindCallback, pickByArray, pickByCallback) {
define(['../internal/baseFlatten', '../internal/bindCallback', '../internal/pickByArray', '../internal/pickByCallback', '../function/restParam'], function(baseFlatten, bindCallback, pickByArray, pickByCallback, restParam) {
/**
* Creates an object composed of the picked `object` properties. Property
* names may be specified as individual arguments or as arrays of property
* names. If `predicate` is provided it is invoked for each property of `object`
* picking the properties `predicate` returns truthy for. The predicate is
* bound to `thisArg` and invoked with three arguments; (value, key, object).
* bound to `thisArg` and invoked with three arguments: (value, key, object).
*
* @static
* @memberOf _
@@ -26,14 +26,14 @@ define(['../internal/baseFlatten', '../internal/bindCallback', '../internal/pick
* _.pick(object, _.isString);
* // => { 'user': 'fred' }
*/
function pick(object, predicate, thisArg) {
var pick = restParam(function(object, props) {
if (object == null) {
return {};
}
return typeof predicate == 'function'
? pickByCallback(object, bindCallback(predicate, thisArg, 3))
: pickByArray(object, baseFlatten(arguments, false, false, 1));
}
return typeof props[0] == 'function'
? pickByCallback(object, bindCallback(props[0], props[1], 3))
: pickByArray(object, baseFlatten(props));
});
return pick;
});