mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 01:57:50 +00:00
Bump to v4.5.1.
This commit is contained in:
@@ -2,9 +2,10 @@ import baseIteratee from './_baseIteratee';
|
||||
import basePickBy from './_basePickBy';
|
||||
|
||||
/**
|
||||
* The opposite of `_.pickBy`; this method creates an object composed of the
|
||||
* own and inherited enumerable properties of `object` that `predicate`
|
||||
* doesn't return truthy for.
|
||||
* The opposite of `_.pickBy`; this method creates an object composed of
|
||||
* the own and inherited enumerable properties of `object` that `predicate`
|
||||
* doesn't return truthy for. The predicate is invoked with two arguments:
|
||||
* (value, key).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -20,7 +21,7 @@ import basePickBy from './_basePickBy';
|
||||
* // => { 'b': '2' }
|
||||
*/
|
||||
function omitBy(object, predicate) {
|
||||
predicate = baseIteratee(predicate, 2);
|
||||
predicate = baseIteratee(predicate);
|
||||
return basePickBy(object, function(value, key) {
|
||||
return !predicate(value, key);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user