'use strict';

// MODULES //

var typeOf = require( '@stdlib/utils/type-of' );


// IS FUNCTION //

/**
* Tests if a value is a function.
*
* @param {*} value - value to test
* @returns {boolean} boolean indicating whether value is a function
*
* @example
* var value = function beep(){};
*
* var bool = isFunction( value );
* // returns true
*/
function isFunction( value ) {
	return ( typeOf( value ) === 'function' );
} // end FUNCTION isFunction()


// EXPORTS //

module.exports = isFunction;

'use strict';

// IS FUNCTION //

/**
* Tests if a value is a function.
*
* @param {*} value - value to test
* @returns {boolean} boolean indicating whether value is a function
*
* @example
* var value = function beep(){};
*
* var bool = isFunction( value );
* // returns true
*/
function isFunction( value ) {
	return ( typeof value === 'function' );
} // end FUNCTION isFunction()


// EXPORTS //

module.exports = isFunction;

Simplify utility to test if a value is a function
Simplify utility to test if a value is a function

By using the typeof operator directly, we prevent possible race
conditions during module loading.
