Ensure fp pickBy and omitBy provide value and key arguments.

This commit is contained in:
John-David Dalton
2016-02-18 01:08:19 -08:00
parent 23768398c5
commit 48dbf203a5
3 changed files with 30 additions and 9 deletions

View File

@@ -11684,7 +11684,7 @@
* // => { 'b': '2' }
*/
function omitBy(object, predicate) {
predicate = getIteratee(predicate, 2);
predicate = getIteratee(predicate);
return basePickBy(object, function(value, key) {
return !predicate(value, key);
});
@@ -11729,7 +11729,7 @@
* // => { 'a': 1, 'c': 3 }
*/
function pickBy(object, predicate) {
return object == null ? {} : basePickBy(object, getIteratee(predicate, 2));
return object == null ? {} : basePickBy(object, getIteratee(predicate));
}
/**