mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 10:27:49 +00:00
Avoid sort() use in baseFunctions.
This commit is contained in:
10
lodash.js
10
lodash.js
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user