mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 02:47:50 +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.
|
* @returns {Array} Returns the new array of filtered property names.
|
||||||
*/
|
*/
|
||||||
function baseFunctions(object, props) {
|
function baseFunctions(object, props) {
|
||||||
var index = -1,
|
return arrayFilter(props, function(key) {
|
||||||
length = props.length,
|
return isFunction(object[key]);
|
||||||
resIndex = -1,
|
});
|
||||||
result = [];
|
|
||||||
|
|
||||||
while (++index < length) {
|
|
||||||
var key = props[index];
|
|
||||||
if (isFunction(object[key])) {
|
|
||||||
result[++resIndex] = key;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user