From 3ae328898d12639d338649bc38f60a8ac57c461d Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 12 Jun 2014 09:11:47 -0700 Subject: [PATCH] Reduce `_.omit`. --- lodash.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lodash.js b/lodash.js index 73911312f..b095f1a28 100644 --- a/lodash.js +++ b/lodash.js @@ -7203,13 +7203,8 @@ if (typeof predicate == 'function') { return basePick(object, negate(lodash.createCallback(predicate, thisArg, 3))); } - var omitProps = baseFlatten(arguments, true, false, 1), - length = omitProps.length; - - while (length--) { - omitProps[length] = String(omitProps[length]); - } - return basePick(object, baseDifference(keysIn(object), omitProps)); + var omitProps = baseFlatten(arguments, true, false, 1); + return basePick(object, baseDifference(keysIn(object), arrayMap(omitProps, String))); } /**