all files / src/util/ definedFunction.js

100% Statements 1/1
100% Branches 2/2
100% Functions 1/1
100% Lines 1/1
1 2 3 4 5 6 7 8 9 10 11 12                     
/**
 * Checks to see if a function is defined.
 *
 * @param  {?Function} func the function to check
 * @return {boolean}        whether or not the funciton is defined
 * @memberOf util
 * @function definedFunction
 */
export default function definedFunction (func) {
  return func !== undefined && func.constructor.name === 'Function'
}