You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
import _filter from "./_filter.js";
|
|
/**
|
|
* @private
|
|
* @param {Function} fn The strategy for extracting function names from an object
|
|
* @return {Function} A function that takes an object and returns an array of function names.
|
|
*/
|
|
|
|
export default function _functionsWith(fn) {
|
|
return function (obj) {
|
|
return _filter(function (key) {
|
|
return typeof obj[key] === 'function';
|
|
}, fn(obj));
|
|
};
|
|
}
|