From fcbe4620cd2c1f530c6e1d94f5e118d384d96908 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 28 Aug 2015 01:35:50 -0700 Subject: [PATCH] Simplify `baseFunctions`. --- lodash.js | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/lodash.js b/lodash.js index c98d7caca..261a2debb 100644 --- a/lodash.js +++ b/lodash.js @@ -1906,18 +1906,9 @@ * @returns {Array} Returns the new array of filtered property names. */ function baseFunctions(object, props) { - var index = -1, - length = props.length, - resIndex = -1, - result = []; - - while (++index < length) { - var key = props[index]; - if (isFunction(object[key])) { - result[++resIndex] = key; - } - } - return result; + return arrayFilter(props, function(key) { + return isFunction(object[key]); + }); } /**