From 36bcced3557293c5a069cf225e79a8d6cf460072 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 18 Jun 2014 21:53:52 -0700 Subject: [PATCH] Avoid `sort()` use in `baseFunctions`. --- lodash.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lodash.js b/lodash.js index 3b7efd5f1..16eab57e1 100644 --- a/lodash.js +++ b/lodash.js @@ -1714,8 +1714,8 @@ } /** - * The base implementation of `_.functions` which creates a sorted array of - * function property names from those returned by `keysFunc`. + * The base implementation of `_.functions` that creates an array of function + * property names from those returned by `keysFunc`. * * @private * @param {Object} object The object to inspect. @@ -1734,7 +1734,7 @@ result.push(key); } } - return result.sort(); + return result; } /** @@ -5293,7 +5293,7 @@ function bindAll(object) { return baseBindAll(object, arguments.length > 1 ? baseFlatten(arguments, false, false, 1) - : functions(object)); + : baseFunctions(object, keysIn)); } /** @@ -6365,7 +6365,7 @@ * // => ['all', 'any', 'bind', 'bindAll', 'clone', 'compact', 'compose', ...] */ function functions(object) { - return baseFunctions(object, keysIn); + return baseFunctions(object, keysIn).sort(); } /**