Remove _.isObject use from _.omit and _.pick.

This commit is contained in:
John-David Dalton
2014-06-20 11:59:40 -07:00
parent fe5aff0c72
commit 73429e7779

View File

@@ -7176,7 +7176,7 @@
* // => { 'name': 'fred' } * // => { 'name': 'fred' }
*/ */
function omit(object, predicate, thisArg) { function omit(object, predicate, thisArg) {
if (!isObject(object)) { if (object == null) {
return {}; return {};
} }
if (typeof predicate == 'function') { if (typeof predicate == 'function') {
@@ -7241,7 +7241,7 @@
* // => { 'name': 'fred' } * // => { 'name': 'fred' }
*/ */
function pick(object, predicate, thisArg) { function pick(object, predicate, thisArg) {
if (!isObject(object)) { if (object == null) {
return {}; return {};
} }
return basePick(object, typeof predicate == 'function' return basePick(object, typeof predicate == 'function'