Files
ETS/PROJ-ETS/PROJ-ETS/Scripts/src/utils/isFunction.js
T
Samuele Locatelli 55c8ef0d5f Refresh componentei
2021-10-15 15:35:31 +02:00

15 lines
377 B
JavaScript

/**
* Check if the given variable is a function
* @method
* @memberof Popper.Utils
* @argument {Any} functionToCheck - variable to check
* @returns {Boolean} answer to: is a function?
*/
export default function isFunction(functionToCheck) {
const getType = {};
return (
functionToCheck &&
getType.toString.call(functionToCheck) === '[object Function]'
);
}