all files / popper/utils/ isFunction.js

100% Statements 2/2
100% Branches 2/2
100% Functions 1/1
100% Lines 2/2
1 2 3 4 5 6 7 8 9 10 11 12                1826× 1826×    
/**
 * Check if the given variable is a function
 * @method
 * @memberof Popper.Utils
 * @argument {Element} element - Element to check
 * @returns {Boolean} answer to: is a function?
 */
export default function isFunction(functionToCheck) {
    const getType = {};
    return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
}