mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 23:57:49 +00:00
Simplify baseFunctions.
This commit is contained in:
15
lodash.js
15
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]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user