Avoid sort() use in baseFunctions.

This commit is contained in:
John-David Dalton
2014-06-18 21:53:52 -07:00
parent 9a9b17d38d
commit 36bcced355

View File

@@ -1714,8 +1714,8 @@
} }
/** /**
* The base implementation of `_.functions` which creates a sorted array of * The base implementation of `_.functions` that creates an array of function
* function property names from those returned by `keysFunc`. * property names from those returned by `keysFunc`.
* *
* @private * @private
* @param {Object} object The object to inspect. * @param {Object} object The object to inspect.
@@ -1734,7 +1734,7 @@
result.push(key); result.push(key);
} }
} }
return result.sort(); return result;
} }
/** /**
@@ -5293,7 +5293,7 @@
function bindAll(object) { function bindAll(object) {
return baseBindAll(object, arguments.length > 1 return baseBindAll(object, arguments.length > 1
? baseFlatten(arguments, false, false, 1) ? baseFlatten(arguments, false, false, 1)
: functions(object)); : baseFunctions(object, keysIn));
} }
/** /**
@@ -6365,7 +6365,7 @@
* // => ['all', 'any', 'bind', 'bindAll', 'clone', 'compact', 'compose', ...] * // => ['all', 'any', 'bind', 'bindAll', 'clone', 'compact', 'compose', ...]
*/ */
function functions(object) { function functions(object) {
return baseFunctions(object, keysIn); return baseFunctions(object, keysIn).sort();
} }
/** /**