src/util.js
function firstFunction(args) {
  for (var i = 0, len = args.length; i < len; i++) {
    if (typeof args[i] === 'function') {
      return args[i];
    }
  }

  return null;
}
function firstFunction(args) {
  for (var i = 0, len = args.length; i < len; i++) {
    if (typeof args[i] === 'function') {
      return args[i];
    }
  }

  return null;
}
function firstFunction ( args ) { for ( var i = 0 , len = args . length ; i < len ; i ++ ) { if ( typeof args [ i ] === 'function' ) { return args [ i ] ; } } return null ; }
Returns the first function in an array.

@param  {Array}     args  The array to take the function from.
@return {Function}        The resulting function, or null.
Returns the first function in an array .